mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-30 13:17:11 -05:00
output all inner error messages
This commit is contained in:
parent
9cbc9b7170
commit
702cfd69de
@ -25,7 +25,11 @@ type Error struct {
|
||||
|
||||
// Error implements error.Error().
|
||||
func (v Error) Error() string {
|
||||
return v.message
|
||||
msg := v.message
|
||||
if v.inner != nil {
|
||||
msg += " > " + v.inner.Error()
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
||||
// Inner implements hasInnerError.Inner()
|
||||
|
@ -23,4 +23,5 @@ func TestActionRequired(t *testing.T) {
|
||||
err = Base(io.EOF).RequireUserAction().Message("TestError4")
|
||||
err = Base(err).Message("TestError5")
|
||||
assert.Bool(IsActionRequired(err)).IsTrue()
|
||||
assert.String(err.Error()).Contains("EOF")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user