mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 15:43:08 +08:00
Better error messages
This commit is contained in:
parent
9ad742fc22
commit
74ea58f514
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ func ExecuteDSL(args ExecuteDSLArgs) (*models.DNSConfig, error) {
|
|||
|
||||
dnsConfig, err := js.ExecuteJavascript(args.JSFile, args.DevMode)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("executing javascript in %s: %s", args.JSFile, err)
|
||||
return nil, fmt.Errorf("executing %s: %w", args.JSFile, err)
|
||||
}
|
||||
return dnsConfig, nil
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ var currentDirectory string
|
|||
func ExecuteJavascript(file string, devMode bool) (*models.DNSConfig, error) {
|
||||
script, err := ioutil.ReadFile(file)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("reading js file %s: %s", file, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Record the directory path leading up to this file.
|
||||
|
|
Loading…
Reference in a new issue