@@ -4,8 +4,8 @@ Error handling
4
4
General Overview
5
5
----------------
6
6
The Fabric error handling framework can be found in the Fabric repository under
7
- common/errors. It defines a new type of error, CallStackError, to use in place of
8
- the standard error type provided by Go.
7
+ ** common/errors ** . It defines a new type of error, CallStackError, to use in
8
+ place of the standard error type provided by Go.
9
9
10
10
A CallStackError consists of the following:
11
11
@@ -26,19 +26,17 @@ components for those using an editor with code completion capabilities.
26
26
- Reason code - a short code to help identify the reason the error occurred.
27
27
Reason codes should consist of three numeric values. Letters and special
28
28
characters are not allowed.
29
-
30
29
- Error code - the component code and reason code separated by a colon,
31
30
e.g. PER:404
32
-
33
31
- Error message - the text that describes the error. This is the same as the
34
32
input provided to ``fmt.Errorf() `` and ``Errors.New() ``. If an error has been
35
33
wrapped into the current error, its message will be appended.
36
-
37
34
- Callstack - the callstack at the time the error is created. If an error has
38
35
been wrapped into the current error, its error message and callstack will be
39
36
appended to retain the context of the wrapped error.
40
37
41
38
The CallStackError interface exposes the following functions:
39
+
42
40
- Error() - returns the error message with callstack appended
43
41
- Message() - returns the error message (without callstack appended)
44
42
- GetComponentCode()
0 commit comments