All pastes #74435 Raw Edit

Unnamed

public cpp v1 · immutable
#74435 ·published 2006-06-29 00:38 UTC
rendered paste body
#include <exception>#include <iostream>class Exception : public std::exception {    public:	Exception() { }	virtual ~Exception() throw() { }	virtual const char *what() {	    return _message.c_str();	}    protected:	const std::string _message;};class FooException : public Exception {    public:	FooException() : _message("FooException") { }	virtual ~FooException() throw() { }    protected:	const std::string _message;};void throw_foo() {    throw FooException();}int main() {    throw_foo();    return 0;}