jcontrol.system
Class ErrorHandler

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