Class 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
    • 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()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProtelisRuntimeException

        public ProtelisRuntimeException​(@Nonnull
                                        java.lang.Throwable javaCause,
                                        ProtelisAST<?> origin)
        Builds a new ProtelisRuntimeException, happening due to the specified Java exception, into the origin node of the Protelis AST.
        Parameters:
        javaCause - the java Throwable generating the exception
        origin - 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 class java.lang.Throwable
      • getProtelisStacktrace

        public java.lang.String getProtelisStacktrace()
        Returns:
        A stringyfied version of the Protelis stack trace that caused the issue