question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support get detail error info for parse

See original GitHub issue

Feature 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:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Oct 8, 2022

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.

0reactions
chakkk309commented, Aug 5, 2022

@chakkk309 hi, is there any progress for this issue?

Hi, this issue is still in progress, if there is any progress I will keep you updated.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found