This repository has been archived by the owner on Sep 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
367 changed files
with
31,600 additions
and
2,941 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2015 Conrad Irwin <conrad@bugsnag.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Package errors adds stacktrace support to errors in go. | ||
|
||
This is particularly useful when you want to understand the state of execution | ||
when an error was returned unexpectedly. | ||
|
||
It provides the type \*Error which implements the standard golang error | ||
interface, so you can use this library interchangably with code that is | ||
expecting a normal error return. | ||
|
||
Usage | ||
===== | ||
|
||
Full documentation is available on | ||
[godoc](https://godoc.org/github.com/go-errors/errors), but here's a simple | ||
example: | ||
|
||
```go | ||
package crashy | ||
|
||
import "github.com/go-errors/errors" | ||
|
||
var Crashed = errors.Errorf("oh dear") | ||
|
||
func Crash() error { | ||
return errors.New(Crashed) | ||
} | ||
``` | ||
|
||
This can be called as follows: | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"crashy" | ||
"fmt" | ||
"github.com/go-errors/errors" | ||
) | ||
|
||
func main() { | ||
err := crashy.Crash() | ||
if err != nil { | ||
if errors.Is(err, crashy.Crashed) { | ||
fmt.Println(err.(*errors.Error).ErrorStack()) | ||
} else { | ||
panic(err) | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Meta-fu | ||
======= | ||
|
||
This package was original written to allow reporting to | ||
[Bugsnag](https://bugsnag.com/) from | ||
[bugsnag-go](https://github.com/bugsnag/bugsnag-go), but after I found similar | ||
packages by Facebook and Dropbox, it was moved to one canonical location so | ||
everyone can benefit. | ||
|
||
This package is licensed under the MIT license, see LICENSE.MIT for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
mode: set | ||
github.com/go-errors/errors/stackframe.go:27.51,30.25 2 1 | ||
github.com/go-errors/errors/stackframe.go:33.2,38.8 3 1 | ||
github.com/go-errors/errors/stackframe.go:30.25,32.3 1 0 | ||
github.com/go-errors/errors/stackframe.go:43.47,44.31 1 1 | ||
github.com/go-errors/errors/stackframe.go:47.2,47.48 1 1 | ||
github.com/go-errors/errors/stackframe.go:44.31,46.3 1 1 | ||
github.com/go-errors/errors/stackframe.go:52.42,56.16 3 1 | ||
github.com/go-errors/errors/stackframe.go:60.2,60.60 1 1 | ||
github.com/go-errors/errors/stackframe.go:56.16,58.3 1 0 | ||
github.com/go-errors/errors/stackframe.go:64.55,67.16 2 1 | ||
github.com/go-errors/errors/stackframe.go:71.2,72.61 2 1 | ||
github.com/go-errors/errors/stackframe.go:76.2,76.66 1 1 | ||
github.com/go-errors/errors/stackframe.go:67.16,69.3 1 0 | ||
github.com/go-errors/errors/stackframe.go:72.61,74.3 1 0 | ||
github.com/go-errors/errors/stackframe.go:79.56,91.63 3 1 | ||
github.com/go-errors/errors/stackframe.go:95.2,95.53 1 1 | ||
github.com/go-errors/errors/stackframe.go:100.2,101.18 2 1 | ||
github.com/go-errors/errors/stackframe.go:91.63,94.3 2 1 | ||
github.com/go-errors/errors/stackframe.go:95.53,98.3 2 1 | ||
github.com/go-errors/errors/error.go:70.32,73.23 2 1 | ||
github.com/go-errors/errors/error.go:80.2,85.3 3 1 | ||
github.com/go-errors/errors/error.go:74.2,75.10 1 1 | ||
github.com/go-errors/errors/error.go:76.2,77.28 1 1 | ||
github.com/go-errors/errors/error.go:92.43,95.23 2 1 | ||
github.com/go-errors/errors/error.go:104.2,109.3 3 1 | ||
github.com/go-errors/errors/error.go:96.2,97.11 1 1 | ||
github.com/go-errors/errors/error.go:98.2,99.10 1 1 | ||
github.com/go-errors/errors/error.go:100.2,101.28 1 1 | ||
github.com/go-errors/errors/error.go:115.39,117.19 1 1 | ||
github.com/go-errors/errors/error.go:121.2,121.29 1 1 | ||
github.com/go-errors/errors/error.go:125.2,125.43 1 1 | ||
github.com/go-errors/errors/error.go:129.2,129.14 1 1 | ||
github.com/go-errors/errors/error.go:117.19,119.3 1 1 | ||
github.com/go-errors/errors/error.go:121.29,123.3 1 1 | ||
github.com/go-errors/errors/error.go:125.43,127.3 1 1 | ||
github.com/go-errors/errors/error.go:135.53,137.2 1 1 | ||
github.com/go-errors/errors/error.go:140.34,142.2 1 1 | ||
github.com/go-errors/errors/error.go:146.34,149.42 2 1 | ||
github.com/go-errors/errors/error.go:153.2,153.20 1 1 | ||
github.com/go-errors/errors/error.go:149.42,151.3 1 1 | ||
github.com/go-errors/errors/error.go:158.39,160.2 1 1 | ||
github.com/go-errors/errors/error.go:164.46,165.23 1 1 | ||
github.com/go-errors/errors/error.go:173.2,173.19 1 1 | ||
github.com/go-errors/errors/error.go:165.23,168.32 2 1 | ||
github.com/go-errors/errors/error.go:168.32,170.4 1 1 | ||
github.com/go-errors/errors/error.go:177.37,178.42 1 1 | ||
github.com/go-errors/errors/error.go:181.2,181.41 1 1 | ||
github.com/go-errors/errors/error.go:178.42,180.3 1 1 | ||
github.com/go-errors/errors/parse_panic.go:10.39,12.2 1 1 | ||
github.com/go-errors/errors/parse_panic.go:16.46,24.34 5 1 | ||
github.com/go-errors/errors/parse_panic.go:70.2,70.43 1 1 | ||
github.com/go-errors/errors/parse_panic.go:73.2,73.55 1 0 | ||
github.com/go-errors/errors/parse_panic.go:24.34,27.23 2 1 | ||
github.com/go-errors/errors/parse_panic.go:27.23,28.42 1 1 | ||
github.com/go-errors/errors/parse_panic.go:28.42,31.5 2 1 | ||
github.com/go-errors/errors/parse_panic.go:31.6,33.5 1 0 | ||
github.com/go-errors/errors/parse_panic.go:35.5,35.29 1 1 | ||
github.com/go-errors/errors/parse_panic.go:35.29,36.86 1 1 | ||
github.com/go-errors/errors/parse_panic.go:36.86,38.5 1 1 | ||
github.com/go-errors/errors/parse_panic.go:40.5,40.32 1 1 | ||
github.com/go-errors/errors/parse_panic.go:40.32,41.18 1 1 | ||
github.com/go-errors/errors/parse_panic.go:45.4,46.46 2 1 | ||
github.com/go-errors/errors/parse_panic.go:51.4,53.23 2 1 | ||
github.com/go-errors/errors/parse_panic.go:57.4,58.18 2 1 | ||
github.com/go-errors/errors/parse_panic.go:62.4,63.17 2 1 | ||
github.com/go-errors/errors/parse_panic.go:41.18,43.10 2 1 | ||
github.com/go-errors/errors/parse_panic.go:46.46,49.5 2 1 | ||
github.com/go-errors/errors/parse_panic.go:53.23,55.5 1 0 | ||
github.com/go-errors/errors/parse_panic.go:58.18,60.5 1 0 | ||
github.com/go-errors/errors/parse_panic.go:63.17,65.10 2 1 | ||
github.com/go-errors/errors/parse_panic.go:70.43,72.3 1 1 | ||
github.com/go-errors/errors/parse_panic.go:80.85,82.29 2 1 | ||
github.com/go-errors/errors/parse_panic.go:85.2,85.15 1 1 | ||
github.com/go-errors/errors/parse_panic.go:88.2,90.63 2 1 | ||
github.com/go-errors/errors/parse_panic.go:94.2,94.53 1 1 | ||
github.com/go-errors/errors/parse_panic.go:99.2,101.36 2 1 | ||
github.com/go-errors/errors/parse_panic.go:105.2,106.15 2 1 | ||
github.com/go-errors/errors/parse_panic.go:109.2,112.49 3 1 | ||
github.com/go-errors/errors/parse_panic.go:116.2,117.16 2 1 | ||
github.com/go-errors/errors/parse_panic.go:121.2,126.8 1 1 | ||
github.com/go-errors/errors/parse_panic.go:82.29,84.3 1 0 | ||
github.com/go-errors/errors/parse_panic.go:85.15,87.3 1 1 | ||
github.com/go-errors/errors/parse_panic.go:90.63,93.3 2 1 | ||
github.com/go-errors/errors/parse_panic.go:94.53,97.3 2 1 | ||
github.com/go-errors/errors/parse_panic.go:101.36,103.3 1 0 | ||
github.com/go-errors/errors/parse_panic.go:106.15,108.3 1 0 | ||
github.com/go-errors/errors/parse_panic.go:112.49,114.3 1 1 | ||
github.com/go-errors/errors/parse_panic.go:117.16,119.3 1 0 |
Oops, something went wrong.