Package org.jmol.script
Class ScriptError
- java.lang.Object
-
- org.jmol.script.ScriptError
-
- All Implemented Interfaces:
JmolScriptEvaluator
- Direct Known Subclasses:
ScriptParam
public abstract class ScriptError extends Object implements JmolScriptEvaluator
Error handling for ScriptEvaluator, ScriptProcess, and ScriptParams
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ScriptError()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
bad()
void
error(int iError)
(package private) void
errorMore(int iError, String value, String more, String more2)
private void
errorOrWarn(int iError, String value, String more, String more2, boolean warningOnly)
void
errorStr(int iError, String value)
void
errorStr2(int iError, String value, String more)
(package private) static String
errorString(int iError, String value, String more, String more2, boolean translated)
void
evalError(String message, String strUntranslated)
static String
getErrorLineMessage(String functionName, String filename, int lineCurrent, int pcCurrent, String lineInfo)
String
getErrorMessage()
String
getErrorMessageUntranslated()
void
integerOutOfRange(int min, int max)
void
invArg()
protected void
numberOutOfRange(float min, float max)
void
setCursorWait(boolean TF)
protected void
setErrorMessage(String err)
protected abstract void
showStringPrint(String msg, boolean mustDo)
protected void
warning(int iError, String value, String more)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jmol.api.JmolScriptEvaluator
checkScriptSilent, checkSelect, compileScriptFile, compileScriptString, deleteAtomsInVariables, evalFunctionFloat, evalParallel, evaluateCompiledScript, evaluateExpression, getAllowJSThreads, getAtomBitSet, getNextStatement, getScript, getScriptContext, getThisContext, haltExecution, isExecuting, isPaused, isStateScript, isStepping, isStopped, loadFileResourceAsync, notifyResumeStatus, pauseExecution, pushContextDown, resumeEval, resumePausedExecution, runScript, runScriptBuffer, setCompiler, setDebugging, setObjectPropSafe, setStatic, setViewer, stepPausedExecution, stopScriptThreads
-
-
-
-
Field Detail
-
vwr
public Viewer vwr
-
chk
public boolean chk
-
ignoreError
protected boolean ignoreError
-
error
protected boolean error
-
errorMessage
protected String errorMessage
-
errorMessageUntranslated
protected String errorMessageUntranslated
-
errorType
protected String errorType
-
iCommandError
protected int iCommandError
-
ERROR_axisExpected
static final int ERROR_axisExpected
- See Also:
- Constant Field Values
-
ERROR_backgroundModelError
static final int ERROR_backgroundModelError
- See Also:
- Constant Field Values
-
ERROR_badArgumentCount
public static final int ERROR_badArgumentCount
- See Also:
- Constant Field Values
-
ERROR_badMillerIndices
static final int ERROR_badMillerIndices
- See Also:
- Constant Field Values
-
ERROR_badRGBColor
public static final int ERROR_badRGBColor
- See Also:
- Constant Field Values
-
ERROR_booleanExpected
static final int ERROR_booleanExpected
- See Also:
- Constant Field Values
-
ERROR_booleanOrNumberExpected
static final int ERROR_booleanOrNumberExpected
- See Also:
- Constant Field Values
-
ERROR_booleanOrWhateverExpected
static final int ERROR_booleanOrWhateverExpected
- See Also:
- Constant Field Values
-
ERROR_colorExpected
static final int ERROR_colorExpected
- See Also:
- Constant Field Values
-
ERROR_colorOrPaletteRequired
static final int ERROR_colorOrPaletteRequired
- See Also:
- Constant Field Values
-
ERROR_commandExpected
static final int ERROR_commandExpected
- See Also:
- Constant Field Values
-
ERROR_coordinateOrNameOrExpressionRequired
static final int ERROR_coordinateOrNameOrExpressionRequired
- See Also:
- Constant Field Values
-
ERROR_drawObjectNotDefined
static final int ERROR_drawObjectNotDefined
- See Also:
- Constant Field Values
-
ERROR_endOfStatementUnexpected
public static final int ERROR_endOfStatementUnexpected
- See Also:
- Constant Field Values
-
ERROR_expressionExpected
public static final int ERROR_expressionExpected
- See Also:
- Constant Field Values
-
ERROR_expressionOrIntegerExpected
public static final int ERROR_expressionOrIntegerExpected
- See Also:
- Constant Field Values
-
ERROR_filenameExpected
static final int ERROR_filenameExpected
- See Also:
- Constant Field Values
-
ERROR_fileNotFoundException
public static final int ERROR_fileNotFoundException
- See Also:
- Constant Field Values
-
ERROR_incompatibleArguments
public static final int ERROR_incompatibleArguments
- See Also:
- Constant Field Values
-
ERROR_insufficientArguments
public static final int ERROR_insufficientArguments
- See Also:
- Constant Field Values
-
ERROR_integerExpected
static final int ERROR_integerExpected
- See Also:
- Constant Field Values
-
ERROR_integerOutOfRange
static final int ERROR_integerOutOfRange
- See Also:
- Constant Field Values
-
ERROR_invalidArgument
public static final int ERROR_invalidArgument
- See Also:
- Constant Field Values
-
ERROR_invalidParameterOrder
public static final int ERROR_invalidParameterOrder
- See Also:
- Constant Field Values
-
ERROR_keywordExpected
public static final int ERROR_keywordExpected
- See Also:
- Constant Field Values
-
ERROR_moCoefficients
public static final int ERROR_moCoefficients
- See Also:
- Constant Field Values
-
ERROR_moIndex
public static final int ERROR_moIndex
- See Also:
- Constant Field Values
-
ERROR_moModelError
public static final int ERROR_moModelError
- See Also:
- Constant Field Values
-
ERROR_moOccupancy
public static final int ERROR_moOccupancy
- See Also:
- Constant Field Values
-
ERROR_moOnlyOne
public static final int ERROR_moOnlyOne
- See Also:
- Constant Field Values
-
ERROR_multipleModelsDisplayedNotOK
public static final int ERROR_multipleModelsDisplayedNotOK
- See Also:
- Constant Field Values
-
ERROR_noData
public static final int ERROR_noData
- See Also:
- Constant Field Values
-
ERROR_noPartialCharges
public static final int ERROR_noPartialCharges
- See Also:
- Constant Field Values
-
ERROR_noUnitCell
static final int ERROR_noUnitCell
- See Also:
- Constant Field Values
-
ERROR_numberExpected
public static final int ERROR_numberExpected
- See Also:
- Constant Field Values
-
ERROR_numberMustBe
static final int ERROR_numberMustBe
- See Also:
- Constant Field Values
-
ERROR_numberOutOfRange
static final int ERROR_numberOutOfRange
- See Also:
- Constant Field Values
-
ERROR_objectNameExpected
static final int ERROR_objectNameExpected
- See Also:
- Constant Field Values
-
ERROR_planeExpected
static final int ERROR_planeExpected
- See Also:
- Constant Field Values
-
ERROR_propertyNameExpected
static final int ERROR_propertyNameExpected
- See Also:
- Constant Field Values
-
ERROR_spaceGroupNotFound
static final int ERROR_spaceGroupNotFound
- See Also:
- Constant Field Values
-
ERROR_stringExpected
static final int ERROR_stringExpected
- See Also:
- Constant Field Values
-
ERROR_stringOrIdentifierExpected
static final int ERROR_stringOrIdentifierExpected
- See Also:
- Constant Field Values
-
ERROR_tooManyPoints
static final int ERROR_tooManyPoints
- See Also:
- Constant Field Values
-
ERROR_tooManyScriptLevels
static final int ERROR_tooManyScriptLevels
- See Also:
- Constant Field Values
-
ERROR_unrecognizedAtomProperty
static final int ERROR_unrecognizedAtomProperty
- See Also:
- Constant Field Values
-
ERROR_unrecognizedBondProperty
static final int ERROR_unrecognizedBondProperty
- See Also:
- Constant Field Values
-
ERROR_unrecognizedCommand
static final int ERROR_unrecognizedCommand
- See Also:
- Constant Field Values
-
ERROR_unrecognizedExpression
static final int ERROR_unrecognizedExpression
- See Also:
- Constant Field Values
-
ERROR_unrecognizedObject
static final int ERROR_unrecognizedObject
- See Also:
- Constant Field Values
-
ERROR_unrecognizedParameter
static final int ERROR_unrecognizedParameter
- See Also:
- Constant Field Values
-
ERROR_unrecognizedParameterWarning
static final int ERROR_unrecognizedParameterWarning
- See Also:
- Constant Field Values
-
ERROR_unrecognizedShowParameter
static final int ERROR_unrecognizedShowParameter
- See Also:
- Constant Field Values
-
ERROR_what
public static final int ERROR_what
- See Also:
- Constant Field Values
-
ERROR_writeWhat
public static final int ERROR_writeWhat
- See Also:
- Constant Field Values
-
ERROR_multipleModelsNotOK
static final int ERROR_multipleModelsNotOK
- See Also:
- Constant Field Values
-
ERROR_cannotSet
public static final int ERROR_cannotSet
- See Also:
- Constant Field Values
-
-
Method Detail
-
showStringPrint
protected abstract void showStringPrint(String msg, boolean mustDo)
-
getErrorMessage
public String getErrorMessage()
- Specified by:
getErrorMessage
in interfaceJmolScriptEvaluator
-
getErrorMessageUntranslated
public String getErrorMessageUntranslated()
- Specified by:
getErrorMessageUntranslated
in interfaceJmolScriptEvaluator
-
invArg
public void invArg() throws ScriptException
- Throws:
ScriptException
-
bad
public void bad() throws ScriptException
- Throws:
ScriptException
-
integerOutOfRange
public void integerOutOfRange(int min, int max) throws ScriptException
- Throws:
ScriptException
-
numberOutOfRange
protected void numberOutOfRange(float min, float max) throws ScriptException
- Throws:
ScriptException
-
error
public void error(int iError) throws ScriptException
- Throws:
ScriptException
-
errorStr
public void errorStr(int iError, String value) throws ScriptException
- Throws:
ScriptException
-
errorStr2
public void errorStr2(int iError, String value, String more) throws ScriptException
- Throws:
ScriptException
-
errorMore
void errorMore(int iError, String value, String more, String more2) throws ScriptException
- Throws:
ScriptException
-
warning
protected void warning(int iError, String value, String more) throws ScriptException
- Throws:
ScriptException
-
errorOrWarn
private void errorOrWarn(int iError, String value, String more, String more2, boolean warningOnly) throws ScriptException
- Throws:
ScriptException
-
evalError
public void evalError(String message, String strUntranslated) throws ScriptException
- Throws:
ScriptException
-
setCursorWait
public void setCursorWait(boolean TF)
-
errorString
static String errorString(int iError, String value, String more, String more2, boolean translated)
- Parameters:
iError
-value
-more
-more2
-translated
-- Returns:
- constructed error string
-
getErrorLineMessage
public static String getErrorLineMessage(String functionName, String filename, int lineCurrent, int pcCurrent, String lineInfo)
-
setErrorMessage
protected void setErrorMessage(String err)
-
-