mirror of
https://github.com/tursom/GoCollections.git
synced 2024-12-27 17:10:25 +08:00
update RuntimeException
This commit is contained in:
parent
de50ffca8b
commit
6a6700c811
@ -83,3 +83,10 @@ func Print(err error) {
|
||||
PrintStackTraceByArray(os.Stderr, GetStackTrace())
|
||||
}
|
||||
}
|
||||
|
||||
func Package(err error) Exception {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return NewRuntimeException(err, "", true, err)
|
||||
}
|
||||
|
@ -14,14 +14,6 @@ type RuntimeException struct {
|
||||
cause Exception
|
||||
}
|
||||
|
||||
func Package(err error) *RuntimeException {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
runtimeException := NewRuntimeException(err, "", true, err)
|
||||
return &runtimeException
|
||||
}
|
||||
|
||||
func NewRuntimeException(message interface{}, exceptionMessage string, getStackTrace bool, cause interface{}) RuntimeException {
|
||||
var stackTrace []StackTrace = nil
|
||||
if getStackTrace {
|
||||
|
Loading…
Reference in New Issue
Block a user