Y
Hacker News
new
|
ask
|
show
|
jobs
by
fao_
3748 days ago
If you're repeating yourself, then you could possibly abuse higher class functions to automatically generate error handling?
1 comments
doublerebel
3747 days ago
Yes, there are libs like errTo [1] and iced-error/make_esc [2]. Not to mention Promise.promisify(). Long solved problem.
[1]:
https://www.npmjs.com/package/errto
[2]:
https://www.npmjs.com/package/iced-error
link
[1]: https://www.npmjs.com/package/errto
[2]: https://www.npmjs.com/package/iced-error