deno_core icon indicating copy to clipboard operation
deno_core copied to clipboard

`exception_to_err_result` needs a redesign

Open bartlomieju opened this issue 1 year ago • 0 comments

exception_to_err_result grew organically over the years and has become really untenable.

It has two floating boolean arguments, that control important side effect and IMO it's very easy to misuse. The clear_error (the last argument) is especially tricky.

We need to redesign this API, potentially splitting it into several APIs. At minimum we should convert two floating booleans to an options struct.

I also suggest we rename it to v8_exception_to_err.

bartlomieju avatar Jan 11 '24 00:01 bartlomieju