With the massive changes coming in #7, we've added a raise function to more easily allow us to raise errors through null-coalescing, as this is not natively supported by TypeScript at the moment.
However, this issue causes stacktraces to point to the raise function itself rather than the place where raise was called:
const whatever = blablabla.bla ?? raise('Test', BlahError);
error: Uncaught BlahError: Test
const e = new Error(err);
^
at raise (file:///F:/repos/FinlayDaG33k/chomp/error/raise.ts:14:15)
at file:///F:/repos/FinlayDaG33k/chomp/error/raise.ts:23:1
This should be fixed so that stacktraces allow people to more easily find where something goes wrong.
I think Error.captureStackTrace might help for a solution but I'm currently unsure.
With the massive changes coming in #7, we've added a
raisefunction to more easily allow us to raise errors through null-coalescing, as this is not natively supported by TypeScript at the moment.However, this issue causes stacktraces to point to the
raisefunction itself rather than the place whereraisewas called:This should be fixed so that stacktraces allow people to more easily find where something goes wrong.
I think
Error.captureStackTracemight help for a solution but I'm currently unsure.