diff options
author | ZeroC Staff <git@zeroc.com> | 2002-10-29 14:39:22 +0000 |
---|---|---|
committer | ZeroC Staff <git@zeroc.com> | 2002-10-29 14:39:22 +0000 |
commit | 8ba8f3937326790d218953ded6c44432866d0e4f (patch) | |
tree | 74b5c186bab78cf111ec3e2af73e20e9de32c8f9 /cpp | |
parent | minor fixes (diff) | |
download | ice-8ba8f3937326790d218953ded6c44432866d0e4f.tar.bz2 ice-8ba8f3937326790d218953ded6c44432866d0e4f.tar.xz ice-8ba8f3937326790d218953ded6c44432866d0e4f.zip |
removed AbortException from IcePatch. Fixed exception cleanup code in
ClientUtil.cpp
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/IcePatch/ClientUtil.h | 9 | ||||
-rw-r--r-- | cpp/src/IcePatch/ClientUtil.cpp | 35 |
2 files changed, 0 insertions, 44 deletions
diff --git a/cpp/include/IcePatch/ClientUtil.h b/cpp/include/IcePatch/ClientUtil.h index 8cdeae3da99..e7ead8c1891 100644 --- a/cpp/include/IcePatch/ClientUtil.h +++ b/cpp/include/IcePatch/ClientUtil.h @@ -22,15 +22,6 @@ namespace IcePatch { -class ICE_PATCH_API AbortException : public IceUtil::Exception -{ -public: - AbortException(const char*, int); - virtual std::string ice_name() const; - virtual IceUtil::Exception* ice_clone() const; - virtual void ice_throw() const; -}; - class ICE_PATCH_API ProgressCB { public: diff --git a/cpp/src/IcePatch/ClientUtil.cpp b/cpp/src/IcePatch/ClientUtil.cpp index 327c0b239f4..235f5cd1d03 100644 --- a/cpp/src/IcePatch/ClientUtil.cpp +++ b/cpp/src/IcePatch/ClientUtil.cpp @@ -21,31 +21,6 @@ using namespace std; using namespace Ice; using namespace IcePatch; -// TODO: ML: Move AbortException out of IcePatch, and into -// WishPatch. It is not used in IcePatch. -AbortException::AbortException(const char* file, int line) : - IceUtil::Exception(file, line) -{ -} - -std::string -AbortException::ice_name() const -{ - return "AbortException"; -} - -Exception* -AbortException::ice_clone() const -{ - return new AbortException(*this); -} - -void -AbortException::ice_throw() const -{ - throw *this; -} - string IcePatch::pathToName(const string& path) { @@ -179,8 +154,6 @@ IcePatch::getRegular(const RegularPrx& regular, ProgressCB& progressCB) { ex.reason += string(": ") + strerror(errno); } - BZ2_bzReadClose(&bzError, bzFile); - fclose(stdioFileBZ2); throw ex; } @@ -191,8 +164,6 @@ IcePatch::getRegular(const RegularPrx& regular, ProgressCB& progressCB) { FileAccessException ex; ex.reason = "cannot get read position for `" + pathBZ2 + "': " + strerror(errno); - BZ2_bzReadClose(&bzError, bzFile); - fclose(stdioFileBZ2); throw ex; } @@ -203,8 +174,6 @@ IcePatch::getRegular(const RegularPrx& regular, ProgressCB& progressCB) { FileAccessException ex; ex.reason = "cannot write `" + path + "': " + strerror(errno); - BZ2_bzReadClose(&bzError, bzFile); - fclose(stdioFileBZ2); throw ex; } } @@ -212,10 +181,6 @@ IcePatch::getRegular(const RegularPrx& regular, ProgressCB& progressCB) progressCB.finishedUncompress(totalBZ2); } - // TODO: ML: The code is broken. If an exception is raised above - // (for example, from the if(!file) {...} block), then - // BZ2_bzReadClose and fclose are called twice! Solution: Only - // close in this block, but not when an exception is raised above. catch(...) { BZ2_bzReadClose(&bzError, bzFile); |