Exception Handling - Example 12 - Re-throwing a throw

// File: eh12.cpp - Re-throwing a throw

#include <iostream>
#include <string>

void funky(void)
{
	try
	{
		throw(std::string("This is a funky booboo"));
	}
	catch(...)
	{
		std::cout << "I don't know how to handle this\n";
		throw;
	}
}

int main()
{
	try
	{
		funky();
	}
	catch(const std::string& x)
	{
		std::cout << "Somebody threw me: " << x << std::endl;
	}
	std::cout << "*** End of Program ***\n";

	return 0;
}

***** Program Output *****
I don't know how to handle this
Somebody threw me: This is a funky booboo
*** End of Program ***