Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jcontrol.system
Class ErrorHandler

    java.lang.Object
      jcontrol.system.ErrorHandler

    public class ErrorHandler

extends Object

The JControl Error-Handler. The method `onError()` of this class is automatically invoked by the JControl virtual machine if an error happened. If the Error-Handler does not provide a textual error message, the error code can be decoded using the table below.

Error code | Eror description
--- | ---
1 | HandleError, internal VM-error
2 | NullPointerException
3 | OutOfMemoryError, internal VM-error
4 | BytecodeNotAvailableError, internal VM-error
5 | BytecodeNotSupportedError, internal VM-error due to VM limitations
6 | BytecodeNotDefinedError, internal VM-error
7 | ArithmeticException, e.g. Divide by zero
8 | NegativeArraySizeException
9 | UnsuppordedArrayTypeError
10 | ArrayIndexOutOfBoundsException
11 | ClassCastException
12 | NoCodeError, invoke of a method with no body
13 | WaitForMonitorSignal, used internally by VM
14 | ExternalNativeError, executing native code from external memory is forbidden
15 | FatalStackFrameOverflowError, internal VM-error on deep recusion
16 | InstantiationException on interface or abstract
17 | IllegalMonitorStateException on monitorexit
18 | UnsatisfiedPrelinkError, classloader error, compile again
19 | ClassFormatError, classloader error, compile again
20 | ClassTooBigError, classloader error due to VM limitations
21 | PreLinkError, classloader error, compile again
22 | PreLinkedUnresolvedError, classloader error, compile again
23 | UnsuppordedConstantTypeError, classloader error due to VM limitations
24 | MalformatedDescriptorError, classloader error, compile again
25 | RuntimeRefTableOverrunError, internal VM-error
26 | NoSuchFieldError, reference error, compile again
27 | IllegalAccessError, private reference error, compile again
28 | NoSuchMethodError, reference error, compile again
29 | TooMuchParametersError, invokation error due to VM limitations
30 | ThrowFinalError, uncatched java runtime exception in some thread
31 | NoClassDefFoundError, upload missing classes
32 | ArrayIndexOutOfBoundsException
33 | ArrayDimensionError, max. 2 dimensions are supported
34 | DeadlockError, two or more Threads are locking each other
35 | IncompatibleClassChangeError
36 | NotImplementedError
37 | WatchdogError
38 | DoubleDIDError, there are two devices with the same DID on CAN bus

Author:
  Helge Böhme
Available on JControl Devices:

  all

Constructor Summary
`ErrorHandler()`

Method Summary
`static void` | `onError(int code, String message, int jpc, int npc, boolean jpcext)` Just display the error message

Methods inherited from class java.lang.Object
`clone, equals, notifyAll, wait`

Constructor Detail

### ErrorHandler

    public ErrorHandler()

Method Detail

### onError

    public static void onError(int code,
                               String message,
                               int jpc,
                               int npc,
                               boolean jpcext)

  Just display the error message

  Parameters:
    `code` - the error code
    `message` - the error message (textual error description)
    `jpc` - points to the last bytecode to be executed when the error occured
    `npc` - points to the machine instruction that was producing the error
    `jpcext` - set if jpc points to external memory (e.g. flash)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD