[EH] Rename format_exception.cpp - #17045
Conversation
I think we need a separate file in libc++abi for 'our' EH, meaning both Emscripten EH and Wasm EH. (I think they can be in the same file, as long as we have `ifdef`s) This also adds a file header. I think this method can be in that file, rather than having a separate file for this. I named this `cxa_emscripten.cpp` because it's the name emscripten-core#16627 used and I hope we can put all Emscripten specific stuff there, but maybe @sbc100 had another thought; if so let me know.
|
cc @hoodmane |
|
By the way, I tried at some point to work out how to implement similar features with wasm exception handling but I got stuck -- in particular, |
| 'stdlib_typeinfo.cpp', | ||
| 'private_typeinfo.cpp', | ||
| 'format_exception.cpp', | ||
| 'cxa_emscripten.cpp', |
There was a problem hiding this comment.
How about cxa_exception_emscripten.cpp?
Also I noticed that the error message was change to terminating with uncaught exception.. where as before it could be used to get a description of an exception in general.
It seems like it might be useful to be able to decribe and exception without it being the an uncaught one. So we might need two different functions here.. one can call the other?
There was a problem hiding this comment.
I thought about this, but is there a way to access Wasm exceptions from JS side unless they are uncaught exceptions? Hmm, but yeah, you're right, someone might want to catch them from JS and not actually terminate the program.. Will fix that in another PR.
Renamed the file to cxa_exception_emscripten.cpp.
Sorry for making you wait for so long. My next PR, which I will upload probably today or tomorrow, will address this. The reason you didn't get the right value is in libc++abi what you throw is not really the object pointer itself but |
|
Can we land this? |
No worries, we are not using wasm-exceptions anyways -- Safari support is too recent. |
I think we need a separate file in libc++abi for 'our' EH, meaning both
Emscripten EH and Wasm EH. (I think they can be in the same file, as
long as we have
ifdefs) This also adds a file header.I think this method can be in that file, rather than having a separate
file for this. I named this
cxa_emscripten.cppbecause it's the name#16627 used and I hope we can put all Emscripten specific stuff there,
but maybe @sbc100 had another thought; if so let me know.