Search code examples
cexceptioncallbackcrash-dumps

catch exception on pure C without try-catch mechanism


I need to create a dump file when there is an exception.

Is it possible to do so without using __try{...} and __except(e){...} ?

Is there a way to create a callback function or register an action waiting for a system crash?

Thanks in advance.


Solution

  • Yes, you can use signal to register a callback for a specific signal, including exceptions.