Support get detail error info for parse
See original GitHub issueFeature Request
Is your feature request related to a problem?
No
Describe the feature you would like.
parse error should have detail info. like this sql
CREATE TABLE public.files (id BIGINT NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE, updated_at TIMESTAMP WITHOUT TIME ZONE, created_by BIGINT, updated_by BIGINT, name VARCHAR(255), path VARCHAR(255), CONSTRAINT files_pkey PRIMARY KEY (id))
We can only get this error info
You have an error in your SQL syntax
Actually we can get detail info like this
line 1:184 no viable alternative at input 'path'
How to do
I found if I remove this error listener line. Then, I can get error info . So it’s may be a way to get detail info.
@SneakyThrows(ReflectiveOperationException.class)
private static SQLParser createSQLParser(final TokenStream tokenStream, final Class<? extends SQLParser> parserClass) {
SQLParser result = parserClass.getConstructor(TokenStream.class).newInstance(tokenStream);
((Parser) result).setErrorHandler(new BailErrorStrategy());
// ((Parser) result).removeErrorListener(ConsoleErrorListener.INSTANCE);
return result;
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Parser Error when deploy ASP.NET application - Stack Overflow
See Deploying to web root for detailed instructions. In my case Solution 2 works, while deploying to server some DLL's from bin directory...
Read more >Parse Error: What It Is and How to Fix It - Lifewire
A parse error is an error message you sometimes get on Android devices when an app fails to install. The message itself is...
Read more >An error occurred during the parsing of a resource required to ...
An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details ......
Read more >In rest message getting {"detail":"JSON parse error - ServiceNow
Hi,. I am getting {"detail":"JSON parse error - Invalid \\escape: line 11 column 31 (char 359)\nPossible cause: trailing comma."} error while passing value ......
Read more >Formula Parse Errors In Google Sheets And How To Fix Them
Don't get frustrated. I'll help you understand and fix Google Sheets formula parse errors, including #DIV/0!, #VALUE! #REF! #N/A and more.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello , this issue has not received a reply for several days. This issue is supposed to be closed.
Hi, this issue is still in progress, if there is any progress I will keep you updated.