diff options
author | Michi Henning <michi@zeroc.com> | 2009-01-28 06:55:36 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2009-01-28 06:55:36 +1000 |
commit | 09b4a1830989b33d06e7a421dbf197d2aa335b91 (patch) | |
tree | 61a84913028a1d08a3dfa83f5b519ccda3fd1e9b /cpp/src/slice2docbook/Gen.cpp | |
parent | http://bugzilla/bugzilla/show_bug.cgi?id=3483 - Move Freeze to separate Jar file (diff) | |
parent | Squashed commit of the following: (diff) | |
download | ice-09b4a1830989b33d06e7a421dbf197d2aa335b91.tar.bz2 ice-09b4a1830989b33d06e7a421dbf197d2aa335b91.tar.xz ice-09b4a1830989b33d06e7a421dbf197d2aa335b91.zip |
Merge branch 'R3_3_branch'
Diffstat (limited to 'cpp/src/slice2docbook/Gen.cpp')
-rw-r--r-- | cpp/src/slice2docbook/Gen.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index d40b9e1ee75..322ca9a1147 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -9,6 +9,7 @@ #include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> +#include <Slice/FileTracker.h> #include <Gen.h> #include <cstring> @@ -21,8 +22,7 @@ using namespace Slice; using namespace IceUtil; using namespace IceUtilInternal; -Slice::Gen::Gen(const string& name, const string& file, bool standAlone, bool chapter, - bool noIndex, bool sortFields) : +Slice::Gen::Gen(const string& file, bool standAlone, bool chapter, bool noIndex, bool sortFields) : _standAlone(standAlone), _noIndex(noIndex), _sortFields(sortFields) @@ -39,8 +39,9 @@ Slice::Gen::Gen(const string& name, const string& file, bool standAlone, bool ch O.open(file.c_str()); if(!O) { - cerr << name << ": can't open `" << file << "' for writing: " << strerror(errno) << endl; - return; + ostringstream os; + os << "cannot open `" << file << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); } } @@ -48,12 +49,6 @@ Slice::Gen::~Gen() { } -bool -Slice::Gen::operator!() const -{ - return !O; -} - void Slice::Gen::generate(const UnitPtr& p) { |