Skip to content
Raphael Pigulla edited this page Apr 22, 2022 · 1 revision

Frequently Asked Questions

Why can't I use this library with synchronous functions?

Because it is not implemented yet. Technically this is completely straight forward (if anything, the async case is the more complicated one), the main challenge is to do this with proper TypeScript support without duplicating tons of code. Also, there are usually much fewer things that can go wrong in synchronous code since you tend to not have any I/O.

That being said, I am open to implementing this if there is sufficient demand. Feel free to open an issue.

Does this library support throwing non-error objects?

No it does not, and it never will. Throwing anything other than instances of Error is bad practice and should be avoided.