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

Feature request: adding error type prefix to error formatting #1985

Open
alexveden opened this issue Feb 18, 2025 · 5 comments
Open

Feature request: adding error type prefix to error formatting #1985

alexveden opened this issue Feb 18, 2025 · 5 comments
Assignees
Labels
Accepted Accepted Request Enhancement Request New feature or request Implemented Needs Verification Check if this issue is resolved
Milestone

Comments

@alexveden
Copy link
Contributor

Currently, io::printfn("err: %s", err) printout only constant part err: SOME_ERROR, maybe alter formatting of error with type prefix err: MyError.SOME_ERROR ?

@lerno
Copy link
Collaborator

lerno commented Feb 18, 2025

I am not sure. Is this really a source of confusion?

@alexveden
Copy link
Contributor Author

Sometimes, yes. I'd be fine with possibility of accessing type name: io::printfn("err: %s.%s", err.typeof, err). Is it possible with current version of the language?

@lerno
Copy link
Collaborator

lerno commented Mar 11, 2025

I am thinking of instead prefixing with the first module path, so io::EOF for example, what do you think?

@alexveden
Copy link
Contributor Author

alexveden commented Mar 11, 2025 via email

@lerno lerno self-assigned this Mar 11, 2025
@lerno lerno added Accepted Accepted Request Implemented Needs Verification Check if this issue is resolved labels Mar 11, 2025
@lerno
Copy link
Collaborator

lerno commented Mar 11, 2025

Please try now,

@lerno lerno added this to the 0.7.0 milestone Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted Request Enhancement Request New feature or request Implemented Needs Verification Check if this issue is resolved
Projects
None yet
Development

No branches or pull requests

2 participants