saker.build Documentation TaskDoc JavaDoc Packages
public class ScriptPositionedExceptionView extends ExceptionView
ExceptionView subclass that holds invormation about the script trace of the exceptions.

The script trace specifies the origin of an exception that occurred during a task execution. The script trace is constructed by examining which tasks created the exception that occurred during a task execution, and tracing it back to the root task.

Use create(Throwable, Function<super TaskIdentifier, ? extends ScriptPositionStackTraceElement[]>) to create a new instance.

Nested types
public static class
Data class holding information of a script trace element.
Constructors
public
protected
Creates a new instance initialized with the argument exception and no script trace.
protected
Creates a new instance with the argument exception and script trace.
public
Creats a new exception view by copying the data from the argument.
public
Creates a new exception view by copying the data from the argument and assigning a new script trace.
Methods
public static ScriptPositionedExceptionView
Creates a new exception view based on the argument exception.
public static ScriptPositionedExceptionView
create(Throwable e, Function<super TaskIdentifier, ? extends ScriptPositionStackTraceElement[]> stacktraceresolver)
Creates a new exception view based on the argument exception and uses the passed function to look up the script traces.
public ScriptPositionStackTraceElement[]
Gets the backing script trace of 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.
Creates a new instance initialized with the argument exception and no script trace.
eThe exception.
NullPointerExceptionIf the exception is null.
Creates a new instance with the argument exception and script trace.
eThe exception.
positionScriptTraceThe script trace.
NullPointerExceptionIf any of the arguments are null.
Creats a new exception view by copying the data from the argument.

The cause and suppressed exceptions are not copied recursively.

copyThe exception view to copy the attributes from.
NullPointerExceptionIf the argument is null.
Creates a new exception view by copying the data from the argument and assigning a new script trace.

The cause and suppressed exceptions are not copied recursively.

copyThe exception view to copy the attributes from.
newscripttraceThe script trace to assign to this instance. The array is not copied.
NullPointerExceptionIf any of the arguments are null.
Creates a new exception view based on the argument exception.

All script traces will be initialized to empty arrays in the created view.

eThe exception.
The created exception view.
NullPointerExceptionIf the exception is null.
Creates a new exception view based on the argument exception and uses the passed function to look up the script traces.

If the lookup function is null, this method is same as calling create(Throwable).

eThe exception.
stacktraceresolverThe function to use to look up a script trace for a given task identifier.
The created exception view.
NullPointerExceptionIf the exception is null.
Gets the backing script trace of this exception view.

The returned array is not copied. Do not modify it.

The script trace.
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.
public void writeExternal(ObjectOutput out) throws IOException
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