File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ func (f UAST) String() string {
115115}
116116
117117// Eval implements the Expression interface.
118- func (f UAST ) Eval (ctx * sql.Context , row sql.Row ) (interface {}, error ) {
118+ func (f UAST ) Eval (ctx * sql.Context , row sql.Row ) (out interface {}, err error ) {
119+ defer func () {
120+ if r := recover (); r != nil {
121+ err = fmt .Errorf ("uast: unknown error: %s" , r )
122+ }
123+ }()
124+
119125 span , ctx := ctx .Span ("gitbase.UAST" )
120126 defer span .Finish ()
121127
@@ -246,7 +252,13 @@ func (UASTXPath) Type() sql.Type {
246252}
247253
248254// Eval implements the Expression interface.
249- func (f * UASTXPath ) Eval (ctx * sql.Context , row sql.Row ) (interface {}, error ) {
255+ func (f * UASTXPath ) Eval (ctx * sql.Context , row sql.Row ) (out interface {}, err error ) {
256+ defer func () {
257+ if r := recover (); r != nil {
258+ err = fmt .Errorf ("uastxpath: unknown error: %s" , r )
259+ }
260+ }()
261+
250262 span , ctx := ctx .Span ("gitbase.UASTXPath" )
251263 defer span .Finish ()
252264
You can’t perform that action at this time.
0 commit comments