Err holds a description of an error along with information about where the error was created. It may be embedded in custom error types to add extra information that this errors package can understand.
| 14 | // It may be embedded in custom error types to add extra information that |
| 15 | // this errors package can understand. |
| 16 | type Err struct { |
| 17 | // message holds an annotation of the error. |
| 18 | message string |
| 19 | |
| 20 | // cause holds the cause of the error as returned |
| 21 | // by the Cause method. |
| 22 | cause error |
| 23 | |
| 24 | // previous holds the previous error in the error stack, if any. |
| 25 | previous error |
| 26 | |
| 27 | // function is the package path-qualified function name where the |
| 28 | // error was created. |
| 29 | function string |
| 30 | |
| 31 | // line is the line number the error was created on inside of function |
| 32 | line int |
| 33 | } |
| 34 | |
| 35 | // Locationer is an interface that represents a certain class of errors that |
| 36 | // contain the location information from where they were raised. |
nothing calls this directly
no outgoing calls
no test coverage detected