public class LuaRuntimeException extends LuaException
This exception is thrown if a Lua runtime error occurs, such as indexing a
nil
value. The class provides access to the Lua stack trace by
means of the getLuaStackTrace()
method.
Constructor and Description |
---|
LuaRuntimeException(String msg)
Creates a new instance.
|
LuaRuntimeException(String msg,
Throwable cause)
Creates a new instance.
|
LuaRuntimeException(Throwable cause)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
LuaStackTraceElement[] |
getLuaStackTrace()
Returns the Lua stack trace of this runtime exception.
|
void |
printLuaStackTrace()
Prints this exception and its Lua stack trace to the standard error
stream.
|
void |
printLuaStackTrace(PrintStream s)
Prints this exception and its Lua stack trace to the specified print
stream.
|
void |
printLuaStackTrace(PrintWriter s)
Prints this exception and its Lua stack trace to the specified print
writer.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public LuaRuntimeException(String msg)
msg
- the messagepublic LuaRuntimeException(String msg, Throwable cause)
msg
- the messagecause
- the cause of this exceptionpublic LuaRuntimeException(Throwable cause)
cause
- the cause of this exceptionpublic LuaStackTraceElement[] getLuaStackTrace()
public void printLuaStackTrace()
public void printLuaStackTrace(PrintStream s)
s
- the print streampublic void printLuaStackTrace(PrintWriter s)
s
- the print writer