Exception type used by the mwArray
API
and the C++ interface functions
The mwException
class is the basic exception
type used by the mwArray
API and the C++ interface
functions. All errors created during calls to the mwArray
API
and to generated C++ interface functions are thrown as mwExceptions
.
mclcppclass.h
mclmcrrt.h
Tip MATLAB® Compiler SDK™ automatically includes these header files in the header file generated for your MATLAB functions. |
Construct new mwException
with default error
message.
Create an mwException
with a specified error
message.
char* msg | Null terminated character buffer to use as the error message |
Create a copy of an mwException
.
mwException& e | Initialized mwException instance to copy |
Create new mwException
from existing std::exception
.
std::exception& e | std::exception to copy |
Return the error message contained in this exception.
try { ... } catch (const std::exception& e) { std::cout << e.what() << std::endl; }
Print the stack trace to std::cerr
.
Copy the contents of one exception into a new exception.
mwException& e | An initialized mwException instance to copy |
try { ... } catch (const mwException& e) { mwException e2 = e; throw e2; }
Copy the contents of one exception into a new exception.
std::exception& e | std::exception to copy |
try { ... } catch (const std::exception& e) { mwException e2 = e; throw e2; }