Correct log trace for failed script execution.
The function needs to be wrapped by a newLogClosure for the logger to be able to log it.
This commit is contained in:
parent
971fbf8b28
commit
fcd73f75ea
1 changed files with 2 additions and 2 deletions
|
@ -528,12 +528,12 @@ func (s *Script) CheckErrorCondition() (err error) {
|
|||
v, err := s.dstack.PopBool()
|
||||
if err == nil && v == false {
|
||||
// log interesting data.
|
||||
log.Tracef("%v", func() string {
|
||||
log.Tracef("%v", newLogClosure(func() string {
|
||||
dis0, _ := s.DisasmScript(0)
|
||||
dis1, _ := s.DisasmScript(1)
|
||||
return fmt.Sprintf("scripts failed: script0: %s\n"+
|
||||
"script1: %s", dis0, dis1)
|
||||
})
|
||||
}))
|
||||
err = StackErrScriptFailed
|
||||
}
|
||||
if err == nil && len(s.condStack) != 1 {
|
||||
|
|
Loading…
Add table
Reference in a new issue