|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83952 - trunk/tools/auto_index/src
From: john_at_[hidden]
Date: 2013-04-18 08:26:24
Author: johnmaddock
Date: 2013-04-18 08:26:23 EDT (Thu, 18 Apr 2013)
New Revision: 83952
URL: http://svn.boost.org/trac/boost/changeset/83952
Log:
Throw exception on precondition failure.
Fixes #7967.
Text files modified:
trunk/tools/auto_index/src/auto_index.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Modified: trunk/tools/auto_index/src/auto_index.cpp
==============================================================================
--- trunk/tools/auto_index/src/auto_index.cpp (original)
+++ trunk/tools/auto_index/src/auto_index.cpp 2013-04-18 08:26:23 EDT (Thu, 18 Apr 2013)
@@ -94,6 +94,8 @@
{
while((id->id == 0) && (id->prev))
id = id->prev;
+ if(!id->id)
+ BOOST_THROW_EXCEPTION(std::runtime_error("Current XML block has no enclosing ID: XML is not valid Boostbook?"));
return id->id;
}
//
@@ -762,6 +764,7 @@
catch(boost::exception& e)
{
std::cerr << diagnostic_information(e);
+ return 1;
}
catch(const std::exception& e)
{
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