sleep.error

Class ScriptWarning

public class ScriptWarning extends Object

A package for all information related to a runtime script warning. A runtime script warning occurs whenever something bad happens while executing a script. Something bad could include an exception being thrown by a bridge, a script trying to execute a non-existant function, a script trying to make a comparison with a non-existant predicate etc.

See Also: RuntimeWarningWatcher

Field Summary
protected intline
protected Stringmessage
protected ScriptInstancescript
protected Stringsource
protected booleantrace
Constructor Summary
ScriptWarning(ScriptInstance _script, String _message, int _line)
ScriptWarning(ScriptInstance _script, String _message, int _line, boolean _trace)
Method Summary
intgetLineNumber()
returns the line number in the source script where the runtime error/warning occured
StringgetMessage()
returns a short synopsis of what the warnng is
StringgetNameShort()
returns just the filename of the source script
StringgetScriptName()
returns the full path for the source script
ScriptInstancegetSource()
returns the ScriptInstance object that was the source of this runtime error
booleanisDebugTrace()
is this a trace message for one of the trace debug options
StringtoString()
returns a nicely formatted string representation of this runtime warning.

Field Detail

line

protected int line

message

protected String message

script

protected ScriptInstance script

source

protected String source

trace

protected boolean trace

Constructor Detail

ScriptWarning

public ScriptWarning(ScriptInstance _script, String _message, int _line)

ScriptWarning

public ScriptWarning(ScriptInstance _script, String _message, int _line, boolean _trace)

Method Detail

getLineNumber

public int getLineNumber()
returns the line number in the source script where the runtime error/warning occured

getMessage

public String getMessage()
returns a short synopsis of what the warnng is

getNameShort

public String getNameShort()
returns just the filename of the source script

getScriptName

public String getScriptName()
returns the full path for the source script

getSource

public ScriptInstance getSource()
returns the ScriptInstance object that was the source of this runtime error

isDebugTrace

public boolean isDebugTrace()
is this a trace message for one of the trace debug options

toString

public String toString()
returns a nicely formatted string representation of this runtime warning.