Table of Contents

Class UnhandledException

Namespace
GLib
Assembly
GLib-2.0.dll

Allows handling exceptions which can't cross the native code boundary and would terminate the application.

public static class UnhandledException
Inheritance
UnhandledException
Inherited Members

Methods

Raise(Exception)

Call this method to invoke the exception handler. If there is no exception handler registered the application is terminated.

public static void Raise(Exception e)

Parameters

e Exception

Remarks

This method is not intended to be called by application code, and should only be called by code which catches an exception that would otherwise terminate the application by unwinding to the native code boundary.

SetHandler(Action<Exception>?)

Sets an action which is invoked if an exception is raised which reaches the native code boundary. This can be used by applications to handle these exceptions gracefully without terminating the application.

public static void SetHandler(Action<Exception>? handler)

Parameters

handler Action<Exception>

Invoked if an unhandled exception occurs