Closed dtolnay closed 2 years ago
This implements the last suggestion in https://github.com/brson/wasm-opt-rs/issues/95#issue-1408530390.
Avoids needing to wrap every function that might throw wasm::ParseException in its own individual try { ... } catch (const wasm::ParseException &e) { throw parse_exception_to_runtime_error(e); }.
wasm::ParseException
try { ... } catch (const wasm::ParseException &e) { throw parse_exception_to_runtime_error(e); }
I included an update to cxx 1.0.79 to pull in https://github.com/dtolnay/cxx/pull/1114 for a slight convenience.
Neat. Thanks again. I'll have to update my blog post to talk about this now!
This implements the last suggestion in https://github.com/brson/wasm-opt-rs/issues/95#issue-1408530390.
Avoids needing to wrap every function that might throw
wasm::ParseException
in its own individualtry { ... } catch (const wasm::ParseException &e) { throw parse_exception_to_runtime_error(e); }
.I included an update to cxx 1.0.79 to pull in https://github.com/dtolnay/cxx/pull/1114 for a slight convenience.