#include <iostream>

class ExceptionBase {
};

class MyException : public ExceptionBase {
};

int main()
{
	try
	{
		throw MyException();
	}
	catch (MyException const& e) {
		std::cout<<"catch 1"<<std::endl;
	}
	catch (ExceptionBase const& e) {
		std::cout<<"should not catch 1"<<std::endl;
	}
	
	////////
	try
	{
		throw MyException();
	}
	catch (ExceptionBase const& e) {
		std::cout<<"catch 2"<<std::endl;
	}
	catch (...) {
		std::cout<<"should not catch 2"<<std::endl;
	}

	return 0;
}