From 6ca1c8ee64bf7268d194eb15e72d3024a335039d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 Sep 2009 08:20:12 +0200 Subject: Add root exception class Derive all other exceptions from it. --- cutl/exception.hxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cutl/exception.hxx (limited to 'cutl/exception.hxx') diff --git a/cutl/exception.hxx b/cutl/exception.hxx new file mode 100644 index 0000000..242057b --- /dev/null +++ b/cutl/exception.hxx @@ -0,0 +1,22 @@ +// file : cutl/exception.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef CUTL_EXCEPTION_HXX +#define CUTL_EXCEPTION_HXX + +#include + +namespace cutl +{ + struct exception: std::exception + { + // By default return the exception type name ( typeid (*this).name () ). + // + virtual char const* + what () const throw (); + }; +} + +#endif // CUTL_EXCEPTION_HXX -- cgit v1.1