From 53e670ca313e16acf18f79fef37ff72d66687520 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Thu, 24 Jan 2019 17:46:39 +0800 Subject: 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. --- core/vm/sqlvm/cmd/ast-printer/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/vm/sqlvm/cmd') 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) } -- cgit v1.2.3