/**
 * @file
 * @brief Exception Handling support header
 * @date 11.07.12
 * @author Ilia Vaprol
 */

#ifndef THIRD_PARTY_LIB_LIBSUPCXX_TOOLCHAIN_EXCEPTION_
#define THIRD_PARTY_LIB_LIBSUPCXX_TOOLCHAIN_EXCEPTION_

extern "C++" {

namespace std {

	class exception {
	public:
		exception() throw() { }
		virtual ~exception() throw() { }
		virtual const char* what() const throw() { return "std::exception"; }
	};

	class bad_exception : public exception {
	public:
		bad_exception() throw() { }
		virtual ~bad_exception() throw() { }
		virtual const char* what() const throw() { return "std::bad_exception"; }
	};

	bool uncaught_exception() throw();

	typedef void (*terminate_handler)();

	typedef void (*unexpected_handler)();

	terminate_handler set_terminate(terminate_handler) throw();

	void terminate();

	unexpected_handler set_unexpected(unexpected_handler) throw();

	void unexpected();

} // namespace std

} // extern "C++"

#endif // THIRD_PARTY_LIB_LIBSUPCXX_TOOLCHAIN_EXCEPTION_
