-
- Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Make the HandlerBuilder class extend the CallableObject class.
This will make it easier to use.
e.g.
const handler = new HandlerBuilder() .on(ValueError, () => { ... }) .on(SyntaxError, () => { ... }) .default(() => { ... }); // example 1 try { ... } catch (error) { handler(error); } // example 2 new Promise([...]) .catch(handler);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels