2

I am trying to load an assembly in Matlab using:

NET.addAssembly(libpath); 

I get an exception with the message:

Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

For this Exception Identifier:

MATLAB:NET:CLRException:AddAssembly

How can I access/get the LoaderExceptions in Matlab? Is it possible? In C# you can do it like this.

Wollmich
  • 1,616
  • 1
  • 18
  • 46
Dzyann
  • 5,062
  • 11
  • 63
  • 95

1 Answers1

2

The following code works for me:

try
  NET.addAssembly(assembly)
catch ex
end

ex.ExceptionObject.LoaderExceptions.Get(0).Message    
Shaedar
  • 393
  • 1
  • 6
  • 14