mirror of
https://github.com/tursom/GoCollections.git
synced 2025-04-02 19:00:12 +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())
|
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
|
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 {
|
func NewRuntimeException(message interface{}, exceptionMessage string, getStackTrace bool, cause interface{}) RuntimeException {
|
||||||
var stackTrace []StackTrace = nil
|
var stackTrace []StackTrace = nil
|
||||||
if getStackTrace {
|
if getStackTrace {
|
||||||
|
Loading…
Reference in New Issue
Block a user