(err error)
| 88 | } |
| 89 | |
| 90 | func convertErrorToAdvice(err error) []*storepb.Advice { |
| 91 | if syntaxErr, ok := err.(*base.SyntaxError); ok { |
| 92 | return []*storepb.Advice{ |
| 93 | { |
| 94 | Status: storepb.Advice_ERROR, |
| 95 | Code: StatementSyntaxErrorCode, |
| 96 | Title: SyntaxErrorTitle, |
| 97 | Content: syntaxErr.Message, |
| 98 | StartPosition: syntaxErr.Position, |
| 99 | }, |
| 100 | } |
| 101 | } |
| 102 | return []*storepb.Advice{ |
| 103 | { |
| 104 | Status: storepb.Advice_ERROR, |
| 105 | Code: InternalErrorCode, |
| 106 | Title: SyntaxErrorTitle, |
| 107 | Content: err.Error(), |
| 108 | StartPosition: nil, |
| 109 | }, |
| 110 | } |
| 111 | } |
no test coverage detected