All pastes #74440 Raw Edit

Mine

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