bugsnaghandler

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package bugsnaghandler provides Bugsnag integration.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is responsible for sending errors to Bugsnag.

func New

func New(apiKey string) *Handler

New creates a new handler.

Example
package main

import (
	"github.com/goph/emperror/handler/bugsnaghandler"
)

func main() {
	apiKey := "key"

	_ = bugsnaghandler.New(apiKey)

}
Output:

func NewFromNotifier

func NewFromNotifier(notifier *bugsnag.Notifier) *Handler

NewFromNotifier creates a new handler from an existing notifier instance.

Example
apiKey := "key"

_ = bugsnaghandler.NewFromNotifier(bugsnag.New(bugsnag.Configuration{
	APIKey: apiKey,
}))
Output:

func (*Handler) Handle

func (h *Handler) Handle(err error)

Handle sends the error to Bugsnag.

Jump to

Keyboard shortcuts

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