|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70989 - trunk/boost/exception
From: emil_at_[hidden]
Date: 2011-04-04 20:26:00
Author: emildotchevski
Date: 2011-04-04 20:25:59 EDT (Mon, 04 Apr 2011)
New Revision: 70989
URL: http://svn.boost.org/trac/boost/changeset/70989
Log:
issue #5386
Text files modified:
trunk/boost/exception/diagnostic_information.hpp | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
Modified: trunk/boost/exception/diagnostic_information.hpp
==============================================================================
--- trunk/boost/exception/diagnostic_information.hpp (original)
+++ trunk/boost/exception/diagnostic_information.hpp 2011-04-04 20:25:59 EDT (Mon, 04 Apr 2011)
@@ -127,18 +127,26 @@
std::ostringstream tmp;
if( be )
{
- if( char const * const * f=get_error_info<throw_file>(*be) )
+ char const * const * f=get_error_info<throw_file>(*be);
+ int const * l=get_error_info<throw_line>(*be);
+ char const * const * fn=get_error_info<throw_function>(*be);
+ if( !f && !l && !fn )
+ tmp << "Throw location unknown (consider using BOOST_THROW_EXCEPTION)\n";
+ else
{
- tmp << *f;
- if( int const * l=get_error_info<throw_line>(*be) )
- tmp << '(' << *l << "): ";
+ if( f )
+ {
+ tmp << *f;
+ if( int const * l=get_error_info<throw_line>(*be) )
+ tmp << '(' << *l << "): ";
+ }
+ tmp << "Throw in function ";
+ if( char const * const * fn=get_error_info<throw_function>(*be) )
+ tmp << *fn;
+ else
+ tmp << "(unknown)";
+ tmp << '\n';
}
- tmp << "Throw in function ";
- if( char const * const * fn=get_error_info<throw_function>(*be) )
- tmp << *fn;
- else
- tmp << "(unknown)";
- tmp << '\n';
}
#ifndef BOOST_NO_RTTI
tmp << std::string("Dynamic exception type: ") <<
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk