stacktrace

package module
v0.0.0-...-4d3c716 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: MIT Imports: 3 Imported by: 0

README

stacktrace-gcp

Go Errors With Stacktraces for Google Cloud Error Reporting

Documentation

Example

	errorReporter, err := errorreporting.NewClient(ctx, project, config)
	if err != nil {
		panic(err)
	}
	
	// Set up loggerLevels
	
	reporter = &LogReporter{
		errorReporter: errorReporter,
		loggerLevels: loggerLevels,
	}
	
	reporter.errorReporter.Report(WrapError(errors.New('this is an error'), 1))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stacktrace

func Stacktrace(stack []byte, skip int) []byte

func WrapError

func WrapError(err error, skip int) errorreporting.Entry

WrapError creates a stack trace and returns an errorreporting entry TODO: This probably should not be in this repo so that we can keep dependencies out. But it is convenient!

Types

This section is empty.

Jump to

Keyboard shortcuts

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