Browse Source

🔊 Better error message when bad int type

master
n0m1s 6 years ago
parent
commit
8c4f3a1309
Signed by: nomis GPG Key ID: BC0454CAD76FE803
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      jdr/type.go

+ 2
- 1
jdr/type.go View File

@ -3,6 +3,7 @@ package jdr
import( import(
"html/template" "html/template"
"fmt"
"log" "log"
"errors" "errors"
"strings" "strings"
@ -91,7 +92,7 @@ func (self *VariableType_int) ToInt(value JsonValue) (int64, error) {
if isInt { if isInt {
val = int64(val2) val = int64(val2)
} else { } else {
return 0, errors.New("Not int"))
return 0, errors.New("Bad int type: " + fmt.Sprintf("%T", value))
} }
} }


Loading…
Cancel
Save