|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51406 - trunk/tools/quickbook/detail
From: daniel_james_at_[hidden]
Date: 2009-02-22 18:49:37
Author: danieljames
Date: 2009-02-22 18:49:36 EST (Sun, 22 Feb 2009)
New Revision: 51406
URL: http://svn.boost.org/trac/boost/changeset/51406
Log:
Better handling of errors without line numbers.
Text files modified:
trunk/tools/quickbook/detail/post_process.cpp | 6 +++---
trunk/tools/quickbook/detail/quickbook.cpp | 10 +++++-----
trunk/tools/quickbook/detail/utils.cpp | 2 +-
trunk/tools/quickbook/detail/utils.hpp | 4 ++--
4 files changed, 11 insertions(+), 11 deletions(-)
Modified: trunk/tools/quickbook/detail/post_process.cpp
==============================================================================
--- trunk/tools/quickbook/detail/post_process.cpp (original)
+++ trunk/tools/quickbook/detail/post_process.cpp 2009-02-22 18:49:36 EST (Sun, 22 Feb 2009)
@@ -442,7 +442,7 @@
else
{
// fallback!
- ::quickbook::detail::outerr("",0)
+ ::quickbook::detail::outerr("")
<< "Warning: Post Processing Failed."
<< std::endl;
out << in;
@@ -453,8 +453,8 @@
catch(...)
{
// fallback!
- ::quickbook::detail::outerr("",0)
- << "Warning: Post Processing Failed."
+ ::quickbook::detail::outerr("")
+ << "Post Processing Failed."
<< std::endl;
out << in;
return 1;
Modified: trunk/tools/quickbook/detail/quickbook.cpp
==============================================================================
--- trunk/tools/quickbook/detail/quickbook.cpp (original)
+++ trunk/tools/quickbook/detail/quickbook.cpp 2009-02-22 18:49:36 EST (Sun, 22 Feb 2009)
@@ -104,7 +104,7 @@
actions actor(filein_, outdir, out);
bool r = parse(filein_, actor);
if (actor.section_level != 0)
- detail::outwarn(filein_,1)
+ detail::outwarn(filein_)
<< "Warning missing [endsect] detected at end of file."
<< std::endl;
return r;
@@ -270,21 +270,21 @@
}
else
{
- quickbook::detail::outerr("",0) << "Error: No filename given\n\n"
- << desc << std::endl;;
+ quickbook::detail::outerr("") << "Error: No filename given\n\n"
+ << desc << std::endl;
return 1;
}
}
catch(std::exception& e)
{
- quickbook::detail::outerr("",0) << "Error: " << e.what() << "\n";
+ quickbook::detail::outerr("") << "Error: " << e.what() << "\n";
return 1;
}
catch(...)
{
- quickbook::detail::outerr("",0) << "Error: Exception of unknown type caught\n";
+ quickbook::detail::outerr("") << "Error: Exception of unknown type caught\n";
return 1;
}
Modified: trunk/tools/quickbook/detail/utils.cpp
==============================================================================
--- trunk/tools/quickbook/detail/utils.cpp (original)
+++ trunk/tools/quickbook/detail/utils.cpp 2009-02-22 18:49:36 EST (Sun, 22 Feb 2009)
@@ -212,7 +212,7 @@
if (!in)
{
- outerr(filename,-1) << "Could not open input file." << endl;
+ outerr(filename) << "Could not open input file." << endl;
return 1;
}
Modified: trunk/tools/quickbook/detail/utils.hpp
==============================================================================
--- trunk/tools/quickbook/detail/utils.hpp (original)
+++ trunk/tools/quickbook/detail/utils.hpp 2009-02-22 18:49:36 EST (Sun, 22 Feb 2009)
@@ -63,8 +63,8 @@
// common IDEs. Uses the ms_errors global to determine if VS format
// or GCC format. Returns the stream to continue ouput of the verbose
// error message.
- std::ostream & outerr(std::string const& file, int line);
- std::ostream & outwarn(std::string const& file, int line);
+ std::ostream & outerr(std::string const& file, int line = -1);
+ std::ostream & outwarn(std::string const& file, int line = -1);
// load file into memory with extra trailing newlines to eliminate
// the need to check for end of file in the grammar.
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