Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: Change syntax error log #33

Merged
merged 2 commits into from
Sep 7, 2015
Merged

parser: Change syntax error log #33

merged 2 commits into from
Sep 7, 2015

Conversation

shenli
Copy link
Member

@shenli shenli commented Sep 7, 2015

Make syntax log easy to read.

#25

Make syntax log easy to read.

#25
@ngaut
Copy link
Member

ngaut commented Sep 7, 2015

LGTM

@@ -118,7 +118,7 @@ func (l *lexer) next() int {
}

func (l *lexer) err0(ln, c int, s string, args ...interface{}) {
err := errors.Errorf(fmt.Sprintf("%d:%d ", ln, c)+s, args...)
err := errors.Errorf(fmt.Sprintf("line %d column %d near \"%s\"", ln, c, l.val), args...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can variable s be removed from err0 function?

@unknwon
Copy link
Contributor

unknwon commented Sep 7, 2015

Much better, thanks!

Address comment
@shenli
Copy link
Member Author

shenli commented Sep 7, 2015

PTAL @qiuyesuifeng

@qiuyesuifeng
Copy link
Member

LGTM

shenli added a commit that referenced this pull request Sep 7, 2015
@shenli shenli merged commit 46e8bdc into master Sep 7, 2015
@shenli shenli deleted the shenli/syntax-error branch September 7, 2015 09:44
lzmhhh123 pushed a commit to lzmhhh123/tidb that referenced this pull request Oct 21, 2020
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
guoshouyan pushed a commit to guoshouyan/tidb that referenced this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants