good morning!!!!

Skip to content
Snippets Groups Projects
Commit 26060fc4 authored by Garet Halliday's avatar Garet Halliday
Browse files

catch panics

parent 543d3a68
No related branches found
Tags v0.0.10
No related merge requests found
package lex
import (
"log"
"time"
"unicode/utf8"
)
......@@ -140,6 +142,13 @@ func (c *CompoundBuilder) Reset() {
var _ Builder = (*CompoundBuilder)(nil)
func (L *Lexer) next() Token {
defer func() {
if r := recover(); r != nil {
log.Println("panic in query:", L.str)
log.Println(r)
time.Sleep(5 * time.Second)
}
}()
L.builder.Reset()
first := true
for {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment