Class PcodeExecutionException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccessPcodeExecutionException
,ConcretionError
,DecodePcodeExecutionException
,EmuSystemException
,InjectionErrorPcodeExecutionException
,InterruptPcodeExecutionException
,SuspendedPcodeExecutionException
Exceptions caught by the executor that are not of this type are typically caught and wrapped, so that the frame can be recovered. The frame is important for diagnosing the error, because it records what the executor was doing. It essentially serves as the "line number" of the p-code program within the greater Java stack. Additionally, if execution of p-code is to resume, the frame must be recovered, and possibly stepped back one.
- See Also:
-
Constructor Summary
ConstructorDescriptionPcodeExecutionException
(String message) PcodeExecutionException
(String message, PcodeFrame frame) PcodeExecutionException
(String message, PcodeFrame frame, Throwable cause) Construct an execution exceptionPcodeExecutionException
(String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PcodeExecutionException
Construct an execution exceptionThe frame is often omitted at the throw site. The executor should catch the exception, fill in the frame, and re-throw it.
- Parameters:
message
- the messageframe
- if known, the frame at the time of the exceptioncause
- the exception that caused this one
-
PcodeExecutionException
-
PcodeExecutionException
-
PcodeExecutionException
-
-
Method Details
-
getFrame
Get the frame at the time of the exceptionNote that the frame counter is advanced before execution of the p-code op. Thus, the counter often points to the op following the one which caused the exception. For a frame to be present and meaningful, the executor must intervene between the throw and the catch. In other words, if you're invoking the executor, you should always expect to see a frame. If you are implementing, e.g., a userop, then it is possible to catch an exception without frame information populated. You might instead retrieve the frame from the executor, if you have a handle to it.
- Returns:
- the frame, possibly
null
-