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); + } }