Skip to content

Add Meta information to Exception Mechanism #965

@TyPh00nCdr

Description

@TyPh00nCdr

Problem Statement

Pull request #606 already added support for a number of non-golang event interfaces. It is, however, missing the meta interface on the exception mechanism. (See Sentry SDK dev docs).

Could this also be added?

Solution Brainstorm

type Meta struct {
	Signal        *Signal        `json:"signal,omitempty"`         // Information on the POSIX signal.
	MachException *MachException `json:"mach_exception,omitempty"` // A Mach Exception on Apple systems comprising a code triple and optional descriptions.
	NSError       *NSError       `json:"ns_error,omitempty"`       // An NSError on Apple systems comprising domain and code.
	ErrNo         *ErrNo         `json:"errno,omitempty"`          // Error codes set by Linux system calls and some library functions.
}

type Signal struct {
	Number   int     `json:"number"`              // POSIX signal number
	Code     *int    `json:"code,omitempty"`      // Optional Apple signal code
	Name     *string `json:"name,omitempty"`      // Optional name of the signal based on the signal number.
	CodeName *string `json:"code_name,omitempty"` // Optional name of the signal code.
}

type MachException struct {
	Code      int     `json:"code"`           // Required numeric exception code.
	SubCode   int64   `json:"subcode"`        // Required numeric exception subcode.
	Exception int     `json:"exception"`      // Required numeric exception number.
	Name      *string `json:"name,omitempty"` // Optional name of the exception constant in iOS / macOS.
}

type NSError struct {
	Code   int    `json:"code"`   // Required numeric error code.
	Domain string `json:"domain"` // Required domain of the NSError as string.
}

type ErrNo struct {
	Number int     `json:"number"`         // The error number
	Name   *string `json:"name,omitempty"` // Optional name of the error
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions