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 {
115
115
}
116
116
117
117
// 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
+
119
125
span , ctx := ctx .Span ("gitbase.UAST" )
120
126
defer span .Finish ()
121
127
@@ -246,7 +252,13 @@ func (UASTXPath) Type() sql.Type {
246
252
}
247
253
248
254
// 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
+
250
262
span , ctx := ctx .Span ("gitbase.UASTXPath" )
251
263
defer span .Finish ()
252
264
You can’t perform that action at this time.
0 commit comments