Package sleep.error
Class ScriptWarning
- java.lang.Object
-
- sleep.error.ScriptWarning
-
public class ScriptWarning extends java.lang.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
-
-
Constructor Summary
Constructors Constructor Description ScriptWarning(ScriptInstance _script, java.lang.String _message, int _line)
ScriptWarning(ScriptInstance _script, java.lang.String _message, int _line, boolean _trace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLineNumber()
returns the line number in the source script where the runtime error/warning occuredjava.lang.String
getMessage()
returns a short synopsis of what the warnng isjava.lang.String
getNameShort()
returns just the filename of the source scriptjava.lang.String
getScriptName()
returns the full path for the source scriptScriptInstance
getSource()
returns the ScriptInstance object that was the source of this runtime errorboolean
isDebugTrace()
is this a trace message for one of the trace debug optionsjava.lang.String
toString()
returns a nicely formatted string representation of this runtime warning.
-
-
-
Field Detail
-
script
protected ScriptInstance script
-
message
protected java.lang.String message
-
line
protected int line
-
trace
protected boolean trace
-
source
protected java.lang.String source
-
-
Constructor Detail
-
ScriptWarning
public ScriptWarning(ScriptInstance _script, java.lang.String _message, int _line)
-
ScriptWarning
public ScriptWarning(ScriptInstance _script, java.lang.String _message, int _line, boolean _trace)
-
-
Method Detail
-
isDebugTrace
public boolean isDebugTrace()
is this a trace message for one of the trace debug options
-
getSource
public ScriptInstance getSource()
returns the ScriptInstance object that was the source of this runtime error
-
toString
public java.lang.String toString()
returns a nicely formatted string representation of this runtime warning.- Overrides:
toString
in classjava.lang.Object
-
getMessage
public java.lang.String getMessage()
returns a short synopsis of what the warnng is
-
getLineNumber
public int getLineNumber()
returns the line number in the source script where the runtime error/warning occured
-
getScriptName
public java.lang.String getScriptName()
returns the full path for the source script
-
getNameShort
public java.lang.String getNameShort()
returns just the filename of the source script
-
-