Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex

public final Class InputError

extends Object
Class Inheritance
Imports
uk.ac.ed.ph.snuggletex.internal.FrozenSlice, uk.ac.ed.ph.snuggletex.utilities.MessageFormatter, java.util.Arrays

Encapsulates an error in the LaTeX input, providing information about what the error is and where it occurred.

See the MessageFormatter for methods formatting instances of this class in various ways.

Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final Object[]
arguments

Any additional arguments about the error.

private final ErrorCode
errorCode

Error code

private final FrozenSlice
slice

Slice the error occurred in. This may be null in certain circumstances

private String

Constructor Summary

AccessConstructor and Description
public
InputError(final ErrorCode errorCode, final FrozenSlice slice, final Object... arguments)

Method Summary

Modifier and TypeMethod and Description
private String
public Object[]
getArguments()

Returns any additional arguments providing information about the error.

public ErrorCode
getErrorCode()

Returns the ErrorCode for this error.

public FrozenSlice
getSlice()

Returns the FrozenSlice indicating where the error occurred in the original SnuggleInput.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

argumentsback to summary
private final Object[] arguments

Any additional arguments about the error. These are passed to MessageFormatter when formatting errors in a readable form.

errorCodeback to summary
private final ErrorCode errorCode

Error code

sliceback to summary
private final FrozenSlice slice

Slice the error occurred in. This may be null in certain circumstances

stringRepresentationback to summary
private String stringRepresentation

Constructor Detail

InputErrorback to summary
public InputError(final ErrorCode errorCode, final FrozenSlice slice, final Object... arguments)

Method Detail

buildStringRepresentationback to summary
private String buildStringRepresentation()
getArgumentsback to summary
public Object[] getArguments()

Returns any additional arguments providing information about the error.

getErrorCodeback to summary
public ErrorCode getErrorCode()

Returns the ErrorCode for this error.

getSliceback to summary
public FrozenSlice getSlice()

Returns the FrozenSlice indicating where the error occurred in the original SnuggleInput.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override