exception-handler

command
v0.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Exception-handler demonstrates observing Objective-C exceptions from Go.

An Objective-C exception raised through a Go-initiated message send is always fatal. On 64-bit Apple platforms the runtime unwinds using DWARF tables that Go frames do not carry, so the search for a handler stops at the first Go frame and the process aborts. recover cannot intercept the result. The hooks below therefore observe an exception on its way out -- reading its name, reason and call stack, writing a report -- and cannot resume execution.

Validate before calling instead: check RespondsToSelector, bounds and nil.

This example shows how to register a custom handler and preprocessor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL