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

renaming Exceptions to Errors #4056

Open
MrOxMasTer opened this issue Dec 2, 2024 · 0 comments
Open

renaming Exceptions to Errors #4056

MrOxMasTer opened this issue Dec 2, 2024 · 0 comments
Labels
4.0 enhancement New feature or request

Comments

@MrOxMasTer
Copy link

MrOxMasTer commented Dec 2, 2024

What is the problem this feature would solve?

Lack of unified naming in js

I don't understand why the java thing. Errors in js are called - Error, not Exception and that's what almost all libraries do, except nest.js, but they have their own atmosphere there.
Even your error creation is called Data.TaggedError, not Data.TaggedException.
It looks weird when you have Error mixed with Exception
image

What is the feature you are proposing to solve the problem?

TimeoutException -> TimeoutError
UnknownException -> UnknownError

etc...

What alternatives have you considered?

Creating custom errors:

export class UnknownError extends Data.TaggedError('UnknownError')<{
  message?: string;
}> {
  message = 'An unknown error occurred';
}
@MrOxMasTer MrOxMasTer added the enhancement New feature or request label Dec 2, 2024
@mikearnaldi mikearnaldi added the 4.0 label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants