Effect-TS/effect

renaming `Exception`s to `Error`s

Opened this issue · 0 comments

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';
}