mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fixed formatting
This commit is contained in:
parent
98a864634e
commit
b770167db6
2 changed files with 4 additions and 4 deletions
|
|
@ -26,9 +26,9 @@ import (
|
|||
// timeFormat is the go-style time format used to parse string dates.
|
||||
const timeFormat = "2006-01-02T15:04"
|
||||
|
||||
// duplicateArgErrorMessage is used as an error string in the parser.
|
||||
// error strings in the parser
|
||||
const duplicateArgErrorMessage = "duplicate argument provided"
|
||||
const parsingIntErrorMessage = "out of bounds"
|
||||
const outOfBoundsErrorMessage = "out of bounds"
|
||||
|
||||
// parser represents a parser for the PQL language.
|
||||
type parser struct {
|
||||
|
|
@ -72,7 +72,7 @@ func (p *parser) Parse() (*Query, error) {
|
|||
p.Execute()
|
||||
}()
|
||||
if v != nil {
|
||||
if strings.HasPrefix(v.(string), duplicateArgErrorMessage) || strings.HasPrefix(v.(string), parsingIntErrorMessage){
|
||||
if strings.HasPrefix(v.(string), duplicateArgErrorMessage) || strings.HasPrefix(v.(string), outOfBoundsErrorMessage) {
|
||||
return nil, fmt.Errorf("%s", v)
|
||||
} else {
|
||||
panic(v)
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ func TestPEGErrors(t *testing.T) {
|
|||
{
|
||||
name: "RangeTimeOneStamp",
|
||||
input: "Row(a=4, 2010-07-04T00:00)"},
|
||||
{
|
||||
{
|
||||
name: "ArgOutOfBounds",
|
||||
input: "Row(a=9223372036854775808)"},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue