public interface LogHandlerExtension
extends org.graalvm.nativeimage.LogHandler
Modifier and Type | Method and Description |
---|---|
default boolean |
fatalContext(org.graalvm.nativeimage.c.function.CodePointer callerIP,
String msg,
Throwable ex)
This method gets called if the VM finds itself in a fatal, non-recoverable error situation.
|
default boolean fatalContext(org.graalvm.nativeimage.c.function.CodePointer callerIP, String msg, Throwable ex)
LogHandler.log(CCharPointer, UnsignedWord)
. This is requested by returning
true
. Returning false
on the other hand will let the VM know that it can skip
providing this information and immediately proceed with calling LogHandler.fatalError()
from
where it is expected to never return to the VM.
Providing this method allows to implement flood control for fatal errors. The implementor can
rely on LogHandler.fatalError()
getting called soon after this method is called.
callerIP
- the address of the call-site where the fatal error occurredmsg
- provides optional text that was passed to the fatal error callex
- provides optional exception object that was passed to the fatal error callfalse
is returned the VM will skip providing more specific error related
information before calling LogHandler.fatalError()
.