diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-01-24 17:46:39 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-03-26 17:48:21 +0800 |
commit | 53e670ca313e16acf18f79fef37ff72d66687520 (patch) | |
tree | 499812c8c42ca823936bbba815097fbb0be9113a /core/vm/sqlvm/cmd | |
parent | 5cb14ef013c9d4000c6676f1da9b45d268948abf (diff) | |
download | dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar.gz dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar.bz2 dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar.lz dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar.xz dexon-53e670ca313e16acf18f79fef37ff72d66687520.tar.zst dexon-53e670ca313e16acf18f79fef37ff72d66687520.zip |
core: vm: sqlvm: parser: properly handle errors
Instead of ignoring errors, errors returned from external functions are
normalized and reported to users. Errors which should be impossible to
occur are converted to panic calls.
Diffstat (limited to 'core/vm/sqlvm/cmd')
-rw-r--r-- | core/vm/sqlvm/cmd/ast-printer/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/vm/sqlvm/cmd/ast-printer/main.go b/core/vm/sqlvm/cmd/ast-printer/main.go index 200f47173..9cdcc6dd6 100644 --- a/core/vm/sqlvm/cmd/ast-printer/main.go +++ b/core/vm/sqlvm/cmd/ast-printer/main.go @@ -16,7 +16,7 @@ func main() { n, err := parser.ParseString(flag.Arg(0)) fmt.Printf("detail: %t\n", detail) - fmt.Printf("err: %+v\n", err) + fmt.Printf("err:\n%+v\n", err) if err == nil { ast.PrintAST(n, "", detail) } |