From c5725e238ba3b90eb26c6dc4ce54294a30511e1e Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Sun, 10 Nov 2013 18:00:59 +0000 Subject: [PATCH] Bugfix: loader now catches all possible exception and throws IOException with a proper information abount unexpected error. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10887 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../blender/com/jme3/scene/plugins/blender/BlenderLoader.java | 2 ++ .../com/jme3/scene/plugins/blender/BlenderModelLoader.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java index 183abce66..b7219e841 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java @@ -142,6 +142,8 @@ public class BlenderLoader implements AssetLoader { return loadingResults; } catch (BlenderFileException e) { throw new IOException(e.getLocalizedMessage(), e); + } catch (Exception e) { + throw new IOException("Unexpected importer exception occured: " + e.getLocalizedMessage(), e); } finally { this.clear(); } diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java index cfb437794..1a856df6e 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java @@ -96,6 +96,8 @@ public class BlenderModelLoader extends BlenderLoader { return modelRoot; } catch (BlenderFileException e) { throw new IOException(e.getLocalizedMessage(), e); + } catch (Exception e) { + throw new IOException("Unexpected importer exception occured: " + e.getLocalizedMessage(), e); } finally { this.clear(); }