diff options
Diffstat (limited to 'libcult/cult/eh/exception.cxx')
-rw-r--r-- | libcult/cult/eh/exception.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libcult/cult/eh/exception.cxx b/libcult/cult/eh/exception.cxx new file mode 100644 index 0000000..21494cd --- /dev/null +++ b/libcult/cult/eh/exception.cxx @@ -0,0 +1,27 @@ +// file : cult/eh/exception.cxx +// author : Boris Kolpackov <boris@kolpackov.net> +// copyright : Copyright (c) 2005-2010 Boris Kolpackov +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#include <cult/eh/exception.hxx> + +#include <typeinfo> + +namespace Cult +{ + namespace EH + { + Char const* Exception:: + what () const throw () + { + try + { + return typeid (*this).name (); + } + catch (...) + { + return ""; + } + } + } +} |