exception

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exception

type Exception = java_exception.Exception

func NewException

func NewException(detailMessage string) *Exception

type Throwabler

type Throwabler = java_exception.Throwabler

func FromError

func FromError(err error) (Throwabler, bool)

FromError extracts Throwabler from passed err.

  • If err is nil, it returns nil and false

  • If err implements Unwrap(), it would unwrap err until getting the real cause. Then it would check cause whether implementing Throwabler. If yes, it returns Throwabler and true.

    If not, it checks err whether implementing Throwabler directly. If yes, it returns Throwabler and true.

Jump to

Keyboard shortcuts

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