# 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

Fields
Modifier and Type
Field
Description
`boolean`
`chk`
`protected boolean`
`error`
`static final int`
`ERROR_badArgumentCount`
`static final int`
`ERROR_badRGBColor`
`static final int`
`ERROR_cannotSet`
`static final int`
`ERROR_endOfStatementUnexpected`
`static final int`
`ERROR_expressionExpected`
`static final int`
`ERROR_expressionOrIntegerExpected`
`static final int`
`ERROR_fileNotFoundException`
`static final int`
`ERROR_incompatibleArguments`
`static final int`
`ERROR_insufficientArguments`
`static final int`
`ERROR_invalidArgument`
`static final int`
`ERROR_invalidParameterOrder`
`static final int`
`ERROR_keywordExpected`
`static final int`
`ERROR_moCoefficients`
`static final int`
`ERROR_moIndex`
`static final int`
`ERROR_moModelError`
`static final int`
`ERROR_moOccupancy`
`static final int`
`ERROR_moOnlyOne`
`static final int`
`ERROR_multipleModelsDisplayedNotOK`
`static final int`
`ERROR_noData`
`static final int`
`ERROR_noPartialCharges`
`static final int`
`ERROR_numberExpected`
`static final int`
`ERROR_operationCanceled`
`static final int`
`ERROR_what`
`static final int`
`ERROR_writeWhat`
`protected String`
`errorMessage`
`protected String`
`errorMessageUntranslated`
`protected String`
`errorType`
`protected int`
`iCommandError`
`boolean`
`ignoreError`
`Viewer`
`vwr`

## Constructor Summary

Constructors
Constructor
Description
`ScriptError()`

## Method Summary

Modifier and Type
Method
Description
`void`
`bad()`
`void`
`error(int iError)`
`void`
`errorStr(int iError, String value)`
`void`
`errorStr2(int iError, String value, String more)`
`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()`
`void`
`invArgStr(String msg)`
`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 Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface JmolScriptEvaluator

`checkScriptSilent, checkSelect, 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 Details

### vwr

public Viewer vwr

### chk

public boolean chk

### ignoreError

public boolean ignoreError

### error

protected boolean error

### errorMessage

protected String errorMessage

### errorMessageUntranslated

protected String errorMessageUntranslated

### errorType

protected String errorType

### iCommandError

protected int iCommandError

### ERROR_badArgumentCount

public static final int ERROR_badArgumentCount

See Also:
  - Constant Field Values

### ERROR_badRGBColor

public static final int ERROR_badRGBColor

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_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_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_numberExpected

public static final int ERROR_numberExpected

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_cannotSet

public static final int ERROR_cannotSet

See Also:
  - Constant Field Values

### ERROR_operationCanceled

public static final int ERROR_operationCanceled

See Also:
  - Constant Field Values

## Constructor Details

### ScriptError

public ScriptError()

## Method Details

### showStringPrint

protected abstract void showStringPrint(String msg, boolean mustDo)

### getErrorMessage

public String getErrorMessage()

Specified by:
  `getErrorMessage` in interface `JmolScriptEvaluator`

### getErrorMessageUntranslated

public String getErrorMessageUntranslated()

Specified by:
  `getErrorMessageUntranslated` in interface `JmolScriptEvaluator`

### invArg

public void invArg() throws ScriptException

Throws:
  `ScriptException`

### invArgStr

public void invArgStr(String msg) 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`

### warning

protected void warning(int iError, String value, String more) throws ScriptException

Throws:
  `ScriptException`

### evalError

public void evalError(String message, String strUntranslated) throws ScriptException

Throws:
  `ScriptException`

### setCursorWait

public void setCursorWait(boolean TF)

### getErrorLineMessage

public static String getErrorLineMessage(String functionName, String filename, int lineCurrent, int pcCurrent, String lineInfo)

### setErrorMessage

protected void setErrorMessage(String err)