|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.luaj.vm2.LuaError
public class LuaError
RuntimeException that is thrown and caught in response to a lua error.
LuaError is used wherever a lua call to error()
would be used within a script.
Since it is an unchecked exception inheriting from RuntimeException,
Java method signatures do notdeclare this exception, althoug it can
be thrown on almost any luaj Java operation.
This is analagous to the fact that any lua script can throw a lua error at any time.
| Field Summary | |
|---|---|
protected java.lang.Throwable |
cause
|
protected java.lang.String |
fileline
|
protected int |
level
|
protected java.lang.String |
traceback
|
| Constructor Summary | |
|---|---|
LuaError(java.lang.String message)
Construct a LuaError with a specific message. |
|
LuaError(java.lang.String message,
int level)
Construct a LuaError with a message, and level to draw line number information from. |
|
LuaError(java.lang.Throwable cause)
Construct LuaError when a program exception occurs. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Get the cause, if any. |
java.lang.String |
getMessage()
|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int level
protected java.lang.String fileline
protected java.lang.String traceback
protected java.lang.Throwable cause
| Constructor Detail |
|---|
public LuaError(java.lang.Throwable cause)
All errors generated from lua code should throw LuaError(String) instead.
cause - the Throwable that caused the error, if known.public LuaError(java.lang.String message)
message - message to supply
public LuaError(java.lang.String message,
int level)
message - message to supplylevel - where to supply line info from in call stack| Method Detail |
|---|
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic java.lang.Throwable getCause()
getCause in class java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||