ScriptError
Date: 2019-10-22

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 java.lang.Object
      implements JmolScriptEvaluator

  Error handling for ScriptEvaluator, ScriptProcess, and ScriptParams

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `chk`
    `protected boolean` | `error`
    `(package private) static int` | `ERROR_axisExpected`
    `(package private) static int` | `ERROR_backgroundModelError`
    `static int` | `ERROR_badArgumentCount`
    `(package private) static int` | `ERROR_badMillerIndices`
    `static int` | `ERROR_badRGBColor`
    `(package private) static int` | `ERROR_booleanExpected`
    `(package private) static int` | `ERROR_booleanOrNumberExpected`
    `(package private) static int` | `ERROR_booleanOrWhateverExpected`
    `static int` | `ERROR_cannotSet`
    `(package private) static int` | `ERROR_colorExpected`
    `(package private) static int` | `ERROR_colorOrPaletteRequired`
    `(package private) static int` | `ERROR_commandExpected`
    `(package private) static int` | `ERROR_coordinateOrNameOrExpressionRequired`
    `(package private) static int` | `ERROR_drawObjectNotDefined`
    `static int` | `ERROR_endOfStatementUnexpected`
    `static int` | `ERROR_expressionExpected`
    `static int` | `ERROR_expressionOrIntegerExpected`
    `(package private) static int` | `ERROR_filenameExpected`
    `static int` | `ERROR_fileNotFoundException`
    `static int` | `ERROR_incompatibleArguments`
    `static int` | `ERROR_insufficientArguments`
    `(package private) static int` | `ERROR_integerExpected`
    `(package private) static int` | `ERROR_integerOutOfRange`
    `static int` | `ERROR_invalidArgument`
    `static int` | `ERROR_invalidParameterOrder`
    `static int` | `ERROR_keywordExpected`
    `static int` | `ERROR_moCoefficients`
    `static int` | `ERROR_moIndex`
    `static int` | `ERROR_moModelError`
    `static int` | `ERROR_moOccupancy`
    `static int` | `ERROR_moOnlyOne`
    `static int` | `ERROR_multipleModelsDisplayedNotOK`
    `(package private) static int` | `ERROR_multipleModelsNotOK`
    `static int` | `ERROR_noData`
    `static int` | `ERROR_noPartialCharges`
    `(package private) static int` | `ERROR_noUnitCell`
    `static int` | `ERROR_numberExpected`
    `(package private) static int` | `ERROR_numberMustBe`
    `(package private) static int` | `ERROR_numberOutOfRange`
    `(package private) static int` | `ERROR_objectNameExpected`
    `(package private) static int` | `ERROR_planeExpected`
    `(package private) static int` | `ERROR_propertyNameExpected`
    `(package private) static int` | `ERROR_spaceGroupNotFound`
    `(package private) static int` | `ERROR_stringExpected`
    `(package private) static int` | `ERROR_stringOrIdentifierExpected`
    `(package private) static int` | `ERROR_tooManyPoints`
    `(package private) static int` | `ERROR_tooManyScriptLevels`
    `(package private) static int` | `ERROR_unrecognizedAtomProperty`
    `(package private) static int` | `ERROR_unrecognizedBondProperty`
    `(package private) static int` | `ERROR_unrecognizedCommand`
    `(package private) static int` | `ERROR_unrecognizedExpression`
    `(package private) static int` | `ERROR_unrecognizedObject`
    `(package private) static int` | `ERROR_unrecognizedParameter`
    `(package private) static int` | `ERROR_unrecognizedParameterWarning`
    `(package private) static int` | `ERROR_unrecognizedShowParameter`
    `static int` | `ERROR_what`
    `static int` | `ERROR_writeWhat`
    `protected java.lang.String` | `errorMessage`
    `protected java.lang.String` | `errorMessageUntranslated`
    `protected java.lang.String` | `errorType`
    `protected int` | `iCommandError`
    `protected boolean` | `ignoreError`
    `Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptError()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bad()`
    `void` | `error(int iError)`
    `(package private) void` | `errorMore(int iError, java.lang.String value, java.lang.String more, java.lang.String more2)`
    `private void` | `errorOrWarn(int iError, java.lang.String value, java.lang.String more, java.lang.String more2, boolean warningOnly)`
    `void` | `errorStr(int iError, java.lang.String value)`
    `void` | `errorStr2(int iError, java.lang.String value, java.lang.String more)`
    `(package private) static java.lang.String` | `errorString(int iError, java.lang.String value, java.lang.String more, java.lang.String more2, boolean translated)`
    `void` | `evalError(java.lang.String message, java.lang.String strUntranslated)`
    `static java.lang.String` | `getErrorLineMessage(java.lang.String functionName, java.lang.String filename, int lineCurrent, int pcCurrent, java.lang.String lineInfo)`
    `java.lang.String` | `getErrorMessage()`
    `java.lang.String` | `getErrorMessageUntranslated()`
    `void` | `integerOutOfRange(int min, int max)`
    `void` | `invArg()`
    `protected void` | `numberOutOfRange(float min, float max)`
    `void` | `setCursorWait(boolean TF)`
    `protected void` | `setErrorMessage(java.lang.String err)`
    `protected abstract void` | `showStringPrint(java.lang.String msg, boolean mustDo)`
    `protected void` | `warning(int iError, java.lang.String value, java.lang.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 java.lang.String errorMessage

    - #### errorMessageUntranslated

          protected java.lang.String errorMessageUntranslated

    - #### errorType

          protected java.lang.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

  - ### Constructor Detail

    - #### ScriptError

          public ScriptError()

  - ### Method Detail

    - #### showStringPrint

          protected abstract void showStringPrint(java.lang.String msg,
                                                  boolean mustDo)

    - #### getErrorMessage

          public java.lang.String getErrorMessage()

      Specified by:
        `getErrorMessage` in interface `JmolScriptEvaluator`

    - #### getErrorMessageUntranslated

          public java.lang.String getErrorMessageUntranslated()

      Specified by:
        `getErrorMessageUntranslated` in interface `JmolScriptEvaluator`

    - #### 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,
                               java.lang.String value)
                        throws ScriptException

      Throws:
        `ScriptException`

    - #### errorStr2

          public void errorStr2(int iError,
                                java.lang.String value,
                                java.lang.String more)
                         throws ScriptException

      Throws:
        `ScriptException`

    - #### errorMore

          void errorMore(int iError,
                         java.lang.String value,
                         java.lang.String more,
                         java.lang.String more2)
                  throws ScriptException

      Throws:
        `ScriptException`

    - #### warning

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

      Throws:
        `ScriptException`

    - #### errorOrWarn

          private void errorOrWarn(int iError,
                                   java.lang.String value,
                                   java.lang.String more,
                                   java.lang.String more2,
                                   boolean warningOnly)
                            throws ScriptException

      Throws:
        `ScriptException`

    - #### evalError

          public void evalError(java.lang.String message,
                                java.lang.String strUntranslated)
                         throws ScriptException

      Throws:
        `ScriptException`

    - #### setCursorWait

          public void setCursorWait(boolean TF)

    - #### errorString

          static java.lang.String errorString(int iError,
                                              java.lang.String value,
                                              java.lang.String more,
                                              java.lang.String more2,
                                              boolean translated)

      Parameters:
        `iError` -
        `value` -
        `more` -
        `more2` -
        `translated` -
      Returns:
        constructed error string

    - #### getErrorLineMessage

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

    - #### setErrorMessage

          protected void setErrorMessage(java.lang.String err)