Skip to content

Commit e03a361

Browse files
fix: QueryErrorTypeToString was missing converting some error types
1 parent dd81d9e commit e03a361

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bindings.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,16 +700,20 @@ func QueryErrorTypeToString(errorType QueryErrorType) string {
700700
switch errorType {
701701
case QueryErrorNone:
702702
return "none"
703+
case QueryErrorSyntax:
704+
return "syntax"
703705
case QueryErrorNodeType:
704706
return "node type"
705707
case QueryErrorField:
706708
return "field"
707709
case QueryErrorCapture:
708710
return "capture"
709-
case QueryErrorSyntax:
710-
return "syntax"
711+
case QueryErrorStructure:
712+
return "structure"
713+
case QueryErrorLanguage:
714+
return "language"
711715
default:
712-
return "unknown"
716+
return fmt.Sprintf("unknown(%d)", errorType)
713717
}
714718

715719
}

0 commit comments

Comments
 (0)