Do not get argument again unnecessarily in Arguments.Error()

pull/820/head
Tom Wright 2019-09-18 11:50:27 +01:00 committed by Olivier Mengué
parent edb801534f
commit cab2acc70f
1 changed files with 1 additions and 1 deletions

View File

@ -1092,7 +1092,7 @@ func (args Arguments) Error(index int) error {
return nil
}
if s, ok = obj.(error); !ok {
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index)))
panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj))
}
return s
}