Skip to content

Errors in strconv should return the package name (and function name) #2548

@gopherbot

Description

@gopherbot

by raul.san@sent.com:

Functions in strconv should return "strconv.[function]: " together to the
error message to know where has been got that error.

I had a problem in my code by that. My program exited (some times )with the next error
message:

parsing "in": invalid syntax

but to find that it was by strconv.Atoi was very hard because looking for "in"
into a files with more than 1000 lines is a waste of time ;)
In fact, at the beginning, I thought that it was by the template parser but it didn't,
my second option was looking in code related to flag and nothing.

Resuming, it has been a waste of time that could be solved if that error had:

strconv.[Function] besides of the error message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions