forked from dubbogo/triple
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d4360ee
commit 9fe94d0
Showing
7 changed files
with
53 additions
and
18 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
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,33 @@ | ||
package common | ||
|
||
type TripleError struct { | ||
msg string | ||
stacksTrace string | ||
attachment map[string]string | ||
code int | ||
} | ||
|
||
func NewTripleError(msg string, code int, stacksTrace string, attachment map[string]string) *TripleError { | ||
return &TripleError{ | ||
msg: msg, | ||
code: code, | ||
attachment: attachment, | ||
stacksTrace: stacksTrace, | ||
} | ||
} | ||
|
||
func (e *TripleError) Error() string { | ||
return e.msg | ||
} | ||
|
||
func (e *TripleError) StacksTrace() string { | ||
return e.stacksTrace | ||
} | ||
|
||
func (e *TripleError) Attachment() map[string]string { | ||
return e.attachment | ||
} | ||
|
||
func (e *TripleError) Code() int { | ||
return e.code | ||
} |