package saker.build.exception
ExceptionView subclass that holds task identifier information for the corresponding exceptions.
While creating an instance of this class, if the corresponding exception is an instance of TaskExecutionException, then the associated task identifier will be stored in the exception view.
An instance of this exception view is usually constructed during task execution, to be able to print a script trace after the execution has finished. It will probably be converted to a ScriptPositionedExceptionView, and then it will be printable to user-facing output streams. Although this may be an usual use-case for this class, it may be used in other ways as the user sees fit.
Use create(
protected TaskIdentifier | The task identifier associated with this exception. |
public | For Externalizable. |
protected | TaskIdentifierExceptionView( Creates a new instance for the given exception and task identifier. |
public static TaskIdentifierExceptionView | Creates a new exception view based on the argument exception. |
public TaskIdentifier | Gets the task identifier associated with this exception view. |
public void | The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays. |
public void | The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays. |
From: ExceptionView |
From: Object |
The task identifier associated with this exception.
For Externalizable.
protected TaskIdentifierExceptionView(Throwable e, TaskIdentifier taskId) throws NullPointerException
Creates a new instance for the given exception and task identifier.
eThe exception.
taskIdThe task identifier.
NullPointerExceptionIf the exception is
null
.Creates a new exception view based on the argument exception.
eThe exception.
The created exception view.
NullPointerExceptionIf the exception is
null
.Gets the task identifier associated with this exception view.
The task identifier or
null
if there's none.Overridden from: Externalizable
The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays. The
readExternal method must read the values in the same sequence
and with the same types as were written by writeExternal.
inthe stream to read data from in order to restore the object
IOExceptionif I/O errors occur
ClassNotFoundExceptionIf the class for an object being
restored cannot be found.
Overridden from: Externalizable
The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays.
outthe stream to write the object to
IOExceptionIncludes any I/O exceptions that may occur