mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
added check for unexpected parser error
This commit is contained in:
parent
6ba6218ae4
commit
44088d4f29
1 changed files with 4 additions and 1 deletions
|
|
@ -72,7 +72,10 @@ func (p *parser) Parse() (*Query, error) {
|
|||
p.Execute()
|
||||
}()
|
||||
if v != nil {
|
||||
errorMessage := v.(string)
|
||||
errorMessage, ok := v.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected parser error of type %T: %[1]v", v)
|
||||
}
|
||||
if strings.HasPrefix(errorMessage, duplicateArgErrorMessage) || strings.HasPrefix(errorMessage, intOutOfRangeError) {
|
||||
return nil, fmt.Errorf("%s", v)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue