Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 7531b9b

Browse files
committed
log error in checkInitRootFlags()
1 parent d52dea2 commit 7531b9b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmd/root.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"fmt"
5+
"log"
56
"net/http"
67
"os"
78
"strings"
@@ -85,16 +86,19 @@ func checkInitRootFlags() {
8586
if *rootCcxtRestURL != "" {
8687
*rootCcxtRestURL = strings.TrimSuffix(*rootCcxtRestURL, "/")
8788
if !strings.HasPrefix(*rootCcxtRestURL, "http://") && !strings.HasPrefix(*rootCcxtRestURL, "https://") {
89+
log.Printf("'ccxt-rest-url' argument must start with either `http://` or `https://`")
8890
panic("'ccxt-rest-url' argument must start with either `http://` or `https://`")
8991
}
9092

9193
e := isCcxtUp(*rootCcxtRestURL)
9294
if e != nil {
95+
log.Printf(e.Error())
9396
panic(e)
9497
}
9598

9699
e = sdk.SetBaseURL(*rootCcxtRestURL)
97100
if e != nil {
101+
log.Printf("unable to set CCXT-rest URL to '%s': %s", *rootCcxtRestURL, e)
98102
panic(fmt.Errorf("unable to set CCXT-rest URL to '%s': %s", *rootCcxtRestURL, e))
99103
}
100104
}

0 commit comments

Comments
 (0)