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

Refactor exceptions #23

Open
JJ opened this issue Dec 31, 2019 · 3 comments
Open

Refactor exceptions #23

JJ opened this issue Dec 31, 2019 · 3 comments

Comments

@JJ
Copy link
Collaborator

JJ commented Dec 31, 2019

Right now it looks like...

my %errors =
    # Success
       0 => "",

    # Generic errors
    1000 => "INI - constructor failed", ...

We should probably make some attempt to automatize it, maybe generate X::Text::CSV::Ini names and then generate the message automatically. Refactoring the code, which looks like self!fail(%error<1000>) shouldn't be too difficult either.

@Tux
Copy link
Owner

Tux commented Dec 31, 2019

This is a plain copy from Text::CSV_XS. If there is an easier way, I don't mind simplification. At least I think it should be easy to keep the two in sync as much as possible.

@JJ
Copy link
Collaborator Author

JJ commented Dec 31, 2019 via email

@JJ
Copy link
Collaborator Author

JJ commented Oct 28, 2023

Also, usually exceptions use the X:: namespace; right now they don't even look like exceptions, using the name `CSV::Diag'

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

No branches or pull requests

2 participants