mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
optimizer: show *exec.ExitError
This commit is contained in:
parent
81560746bd
commit
ba74e83552
|
@ -4,12 +4,13 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/cheggaaa/pb/v3"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/cheggaaa/pb/v3"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
|
@ -110,7 +111,11 @@ func (e *LocalProcessExecutor) Run(ctx context.Context, taskC chan BacktestTask,
|
|||
|
||||
report, err := e.execute(task.ConfigJson)
|
||||
if err != nil {
|
||||
log.WithError(err).Errorf("execute error")
|
||||
if err2, ok := err.(*exec.ExitError); ok {
|
||||
log.WithError(err).Errorf("execute error: %s", err2.Stderr)
|
||||
} else {
|
||||
log.WithError(err).Errorf("execute error")
|
||||
}
|
||||
}
|
||||
|
||||
task.Error = err
|
||||
|
|
Loading…
Reference in New Issue
Block a user