Press on the image to return to the main documentation page.
ErrorDetection
Written by F. Leneuf-Magaud, Salomon Brys
List of types:
ANRWatchDog
ErrorDetection
StackTraceElement
ANRWatchDog
Events:
ApplicationNotResponding(StackTraceElements() As StackTraceElement)
Interrupted(ExceptionMsg As String)
Members:
Initialize
(
EvtPrefix
As
String
)
Initialize2
(
TimeoutInterval
As
Int
,
EvtPrefix
As
String
)
Interrupt
IsAlive
As
Boolean
IsInitialized
As
Boolean
IsInterrupted
As
Boolean
Start
Members description:
Initialize
(
EvtPrefix
As
String
)
Constructs a watchdog that checks the UI thread every 5000 milliseconds.
EvtPrefix: Prefix of the ApplicationNotResponding and Interrupted event handlers.
Initialize2
(
TimeoutInterval
As
Int
,
EvtPrefix
As
String
)
Constructs a watchdog that checks the UI thread every given interval.
TimeoutInterval: The interval, in milliseconds, between two checks of the UI thread. It is therefore the maximum time the UI may freeze before being reported as ANR.
EvtPrefix: Prefix of the ApplicationNotResponding and Interrupted event handlers.
Interrupt
IsAlive
As
Boolean
IsInitialized
As
Boolean
IsInterrupted
As
Boolean
Start
ErrorDetection
Events:
None
Members:
ConvertOutOfMemory2Runtime
(
SubToCall
As
String
,
SubParams
()
As
Object
)
ConvertStackOverflow2Runtime
(
SubToCall
As
String
,
SubParams
()
As
Object
)
GetStackTraceElements
As
StackTraceElement
()
OUT_OF_MEMORY
As
String
STACK_OVERFLOW
As
String
ThrowRuntimeException
(
Message
As
String
)
Members description:
ConvertOutOfMemory2Runtime
(
SubToCall
As
String
,
SubParams
()
As
Object
)
Converts an OutOfMemory error to a Runtime exception, allowing to catch it. The error message ends with OUT_OF_MEMORY.
Once this error caught, get the stack trace elements with GetStackTraceElements.
ConvertStackOverflow2Runtime
(
SubToCall
As
String
,
SubParams
()
As
Object
)
Converts a StackOverflow error to a Runtime exception, allowing to catch it. The error message ends with STACK_OVERFLOW.
Once this error caught, get the stack trace elements with GetStackTraceElements.
GetStackTraceElements
As
StackTraceElement
()
Returns an array of stack trace elements after an OutOfMemory or StackOverflow error is thrown.
OUT_OF_MEMORY
As
String
STACK_OVERFLOW
As
String
ThrowRuntimeException
(
Message
As
String
)
Throws a RuntimeException with the given message.
StackTraceElement
Events:
None
Members:
ClassName
As
String
[read
only]
FileName
As
String
[read
only]
IsNativeMethod
As
Boolean
[read
only]
LineNumber
As
Int
[read
only]
MethodName
As
String
[read
only]
toString
As
String
Members description:
ClassName
As
String
[read
only]
FileName
As
String
[read
only]
IsNativeMethod
As
Boolean
[read
only]
LineNumber
As
Int
[read
only]
MethodName
As
String
[read
only]
toString
As
String
Top