Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ catch Unhandled exception

#include <iostream>

#include <exception>
#include <typeinfo>
#include <stdexcept>

int main()
{
    try {
        throw ...; // throw something
    }
    catch(...)
    {
        std::exception_ptr p = std::current_exception();
        std::clog <<(p ? p.__cxa_exception_type()->name() : "null") << std::endl;
    }
    return 1;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: max heap insertion c++ 
Cpp :: c++ for loop syntax 
Cpp :: initialize a vector with same values 
Cpp :: pow without math.h 
Cpp :: STD::ERASE FUNCTION IN C++ 
Cpp :: c++ multiline string 
Cpp :: c++ lambda as variable 
Cpp :: #define in cpp 
Cpp :: how to use power in c++ 
Cpp :: right shift in c++ 
Cpp :: the difference between i++ and ++i 
Cpp :: if in c++ 
Cpp :: c++ copy constructor 
Cpp :: nth fibonacci number 
Cpp :: c++ main function parameters 
Cpp :: virtual function in c++ 
Cpp :: linkedlist in c++ 
Cpp :: how to show constellations in starry night orion special edition 
Cpp :: c++ download 
Cpp :: c++ calling variable constructor 
Cpp :: creating large maps cpp 
Cpp :: c++ online 
Cpp :: variable modulus 5 meaning in c++ 
Cpp :: c++ program to convert fahrenheit to kelvin 
Cpp :: how to create a custom event in ue4 c++ 
Cpp :: why wont a function stop C++ 
Cpp :: array di struct 
Cpp :: how to draw a rectangle with diagonals and axes of symmetry in c ++ in the console? 
Cpp :: c++ system() from variable 
Cpp :: int to string Using boost::lexical_cast 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =