]> git.lyx.org Git - lyx.git/blob - boost/boost/exception/diagnostic_information.hpp
update boost to version 1.36
[lyx.git] / boost / boost / exception / diagnostic_information.hpp
1 //Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
2
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef UUID_0552D49838DD11DD90146B8956D89593
7 #define UUID_0552D49838DD11DD90146B8956D89593
8
9 #include <boost/exception/exception.hpp>
10 #include <exception>
11 #include <string>
12
13 namespace
14 boost
15     {
16     inline
17     std::string
18     diagnostic_information( std::exception const & x )
19         {
20         if( exception const * be = dynamic_cast<exception const *>(&x) )
21             return be->diagnostic_information();
22         else
23             return std::string("[ what: ") + x.what() + ", type: " + typeid(x).name() + " ]";
24         }
25     }
26
27 #endif