exception-handler

command
v0.6.21 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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