26 lines
313 B
Go
26 lines
313 B
Go
package hotime
|
|
|
|
//框架层处理错误
|
|
type Error struct {
|
|
error
|
|
err error
|
|
}
|
|
|
|
func (this *Error) GetError() error {
|
|
|
|
return this.error
|
|
|
|
}
|
|
|
|
func (this *Error) SetError(err error, loglevel ...int) {
|
|
|
|
this.error = nil
|
|
if err == nil {
|
|
this.error = err
|
|
this.err = err
|
|
return
|
|
}
|
|
this.error = err
|
|
return
|
|
}
|