()
| 98 | } |
| 99 | |
| 100 | func (err BasicError) toJSON() []byte { |
| 101 | b, e := json.Marshal(err) |
| 102 | if e != nil { |
| 103 | logs.Errorf("marshal error failed, err=%v, jsonerr=%s", err, e.Error()) |
| 104 | } |
| 105 | return b |
| 106 | } |
| 107 | |
| 108 | // FinalError preserve the error stack |
| 109 | type FinalError struct { |