From f15dfe301153876cea593a2b1a3059f9694ff306 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sun, 6 Nov 2011 03:19:15 +0000 Subject: [PATCH] * Fixed issue with an exception getting silenced when MTL was loaded for an OBJ file git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8582 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java | 2 +- engine/src/core/com/jme3/asset/AssetNotFoundException.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java b/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java index 32efce2de..7c02dd512 100644 --- a/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java +++ b/engine/src/core-plugins/com/jme3/scene/plugins/OBJLoader.java @@ -327,7 +327,7 @@ public final class OBJLoader implements AssetLoader { try { matList = (MaterialList) assetManager.loadAsset(key.getFolder() + name); } catch (AssetNotFoundException ex){ - throw new AssetNotFoundException("Cannot find material " + name + " for model " + key.getName()); + throw new AssetNotFoundException("Cannot load or find material " + name + " for model " + key.getName(), ex); } if (matList != null){ diff --git a/engine/src/core/com/jme3/asset/AssetNotFoundException.java b/engine/src/core/com/jme3/asset/AssetNotFoundException.java index 25dfba9b1..e04a7fb58 100644 --- a/engine/src/core/com/jme3/asset/AssetNotFoundException.java +++ b/engine/src/core/com/jme3/asset/AssetNotFoundException.java @@ -11,4 +11,7 @@ public class AssetNotFoundException extends RuntimeException { public AssetNotFoundException(String message){ super(message); } + public AssetNotFoundException(String message, Exception ex){ + super(message, ex); + } }