Search
 
SCRIPT & CODE EXAMPLE
 

CPP

SetUnhandledExceptionFilter

bool g_showCrashDialog = false;

LONG WINAPI OurCrashHandler(EXCEPTION_POINTERS * ExceptionInfo)
{
    std::cout << "Gotcha!" << std::endl;

    return g_showCrashDialog ? EXCEPTION_CONTINUE_SEARCH : EXCEPTION_EXECUTE_HANDLER;
}
int main()
{
    ::SetUnhandledExceptionFilter(OurCrashHandler);

    std::cout << "Normal null pointer crash" << std::endl;

    char *p = 0;
    *p = 5;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: flags for g++ compiler 
Cpp :: if vector is empty c++ 
Cpp :: file open cpp 
Cpp :: min heap and max heap using priority queue 
Cpp :: max heap in c++ 
Cpp :: c++ function for checking if a sting is a number 
Cpp :: cpp init multidimensional vector 
Cpp :: c++ segmented sieve primes 
Cpp :: max_element c++ 
Cpp :: header file for unordered_map in c++ 
Cpp :: how to convert string into lowercase in cpp 
Cpp :: how to get the first element of a map in c++ 
Cpp :: c vs c++ 
Cpp :: C++ break and continue 
Cpp :: time_t to int 
Cpp :: c++ friend class 
Cpp :: set clear c++ 
Cpp :: c++ pause linux 
Cpp :: how to find the size of a character array in c++ 
Cpp :: c++ print binary treenode 
Cpp :: sorting using comparator in c++ 
Cpp :: sizeof’ on array function parameter ‘arr’ will return size of ‘int*’ [-Wsizeof-array-argument] 
Cpp :: selection sort c++ algorithm 
Cpp :: arduino xor checksum 
Cpp :: binary search c++ 
Cpp :: Search Insert Position leetcode solution in cpp 
Cpp :: macros in c++ 
Cpp :: reversing a string in c++ 
Cpp :: c++ finding gcd 
Cpp :: return array of string in function c++ 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =