public class MATLABException
extends java.lang.Exception
MWHttpClient
. MATLAB makes the following
information available in case of an error:
MATLABException
acts as a container for this information and provides public API to get to this
information.
NOTE: Users of MATLAB Production Server Java client won't need to create an instance of this exception class from scratch. It will be thrown only in case of MATLAB error on the server
Constructor and Description |
---|
MATLABException(java.lang.String message,
java.lang.String identifier,
java.util.List<MATLABStackFrame> stackList)
Create an instance of
MATLABException using MATLAB error message, error identifier and a list
of MATLABStackFrame representing MATLAB stack trace associated with an error in MATLAB. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMATLABIdentifier()
Returns identifier used when error was thrown in MATLAB
|
java.util.List<MATLABStackFrame> |
getMATLABStackTrace()
Returns MATLAB stack with 0 or more
MATLABStackFrame . |
java.lang.String |
getMessage()
Returns detailed MATLAB message corresponding to an error
|
void |
printMATLABStackTrace()
Print
MATLABException |
void |
printMATLABStackTrace(java.io.PrintStream s)
Prints
MATLABException 's MATLAB back trace to the specified PrintStream . |
void |
printMATLABStackTrace(java.io.PrintWriter s)
Prints
MATLABException 's MATLAB back trace to the specified PrintWriter |
public MATLABException(java.lang.String message, java.lang.String identifier, java.util.List<MATLABStackFrame> stackList)
MATLABException
using MATLAB error message, error identifier and a list
of MATLABStackFrame
representing MATLAB stack trace associated with an error in MATLAB.message
- error message from MATLABidentifier
- error identifier used in MATLABstackList
- list of MATLABStackFrame
representing MATLAB stack trace. An unmodifiable copy of
this list is madepublic java.util.List<MATLABStackFrame> getMATLABStackTrace()
MATLABStackFrame
. Each stack frame provides
information about MATLAB file, function name and line number. The output list of
MATLABStackFrame is unmodifiable
MATLABStackFrame
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getMATLABIdentifier()
public void printMATLABStackTrace()
MATLABException's MATLAB stack trace to the standard error output stream that is the value of the
field System.err
public void printMATLABStackTrace(java.io.PrintStream s)
MATLABException
's MATLAB back trace to the specified PrintStream
.s
- PrintStream to use for outputpublic void printMATLABStackTrace(java.io.PrintWriter s)
MATLABException
's MATLAB back trace to the specified PrintWriter
s
- PrintWriter to use for outputCopyright 2010-2016 The MathWorks, Inc.