#include <iostream>
#include <typeinfo>
#include <exception>
 
 

class MyExcept : public std::exception { };

int main() {

    try {
    	throw std::exception();
    } catch (std::exception &e) {
   	    std::cout <<"case 1: " << typeid(e).name() << std::endl;
    }
     
    try {
    	throw MyExcept();
    } catch (std::exception &e) {
   	    std::cout <<"case 2: "<< typeid(e).name() << std::endl;
    }

}