Class ProtelisRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.protelis.lang.interpreter.util.ProtelisRuntimeException
-
- All Implemented Interfaces:
java.io.Serializable
public final class ProtelisRuntimeException extends java.lang.RuntimeException
This class represents a runtime error in the Protelis interpreter.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProtelisRuntimeException(java.lang.Throwable javaCause, ProtelisAST<?> origin)
Builds a newProtelisRuntimeException
, happening due to the specified Java exception, into the origin node of the Protelis AST.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fillInStackFrame(ProtelisAST<?> element)
Populates the exception stack with a new caller.java.lang.String
getMessage()
java.lang.String
getProtelisStacktrace()
-
-
-
Constructor Detail
-
ProtelisRuntimeException
public ProtelisRuntimeException(@Nonnull java.lang.Throwable javaCause, ProtelisAST<?> origin)
Builds a newProtelisRuntimeException
, happening due to the specified Java exception, into the origin node of the Protelis AST.- Parameters:
javaCause
- the javaThrowable
generating the exceptionorigin
- the point in the Protelis program in which the Java exception was thrown
-
-
Method Detail
-
fillInStackFrame
public void fillInStackFrame(ProtelisAST<?> element)
Populates the exception stack with a new caller.- Parameters:
element
- the Protelis node which called the failing one
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
getProtelisStacktrace
public java.lang.String getProtelisStacktrace()
- Returns:
- A stringyfied version of the Protelis stack trace that caused the issue
-
-