aboutsummaryrefslogtreecommitdiffstats
path: root/internal/sqlparse
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-01-28 19:57:15 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-01-28 19:57:15 -0500
commitfb84192eef75c909d031aa867d407f1b7797e9db (patch)
tree0badb974c62c4fb180d695378c2e9d7f88eaf4df /internal/sqlparse
parentWrap db repo and console errs to give better errors (diff)
downloadcli-fb84192eef75c909d031aa867d407f1b7797e9db.zip
Add more wrapped errors
Diffstat (limited to 'internal/sqlparse')
-rw-r--r--internal/sqlparse/sqlparse.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/sqlparse/sqlparse.go b/internal/sqlparse/sqlparse.go
index 9ded618..25960c5 100644
--- a/internal/sqlparse/sqlparse.go
+++ b/internal/sqlparse/sqlparse.go
@@ -2,6 +2,7 @@ package sqlparse
import (
"bufio"
+ "fmt"
"io"
"strings"
)
@@ -37,7 +38,7 @@ func (sp *SqlParser) Parse() (*ExecutionOptions, error) {
}
if err := scanner.Err(); err != nil {
- return nil, err
+ return nil, fmt.Errorf("parsing sql file encountered an error: %w", err)
}
return options, nil