search for: win_abort_handler

Displaying 1 result from an estimated 1 matches for "win_abort_handler".

2012 Jun 05
0
[LLVMdev] CrashRecoveryContext on Windows
...he process, making CrashRecoveryContext not very useful on Windows for catching abort(), and consequently, assert(). One solution is to create a custom abort() handler that calls RaiseException(), which will be caught by the handler in CrashRecoveryContext. The relevant client-side code is: void win_abort_handler(int) { RaiseException(0, 0, 0, NULL); } void handle_llvm_fatal(void *User, const std::string &Reason) { std::cerr << "Caught LLVM ERROR: " << Reason << "\n"; abort(); // Chains to win_abort_handler on Windows } int main() { install_fatal_error_ha...