summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/JavaUtil.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2009-01-12 14:38:58 -0330
committerMatthew Newhook <matthew@zeroc.com>2009-01-12 14:38:58 -0330
commitde2673ba7e839a39615aba05aa86bc62f6abd246 (patch)
tree2fa7a91274d639222f6b49e30c54925516a4f89f /cpp/src/Slice/JavaUtil.cpp
parent- Added test/IceGrid/admin test for icegridadmin (diff)
downloadice-de2673ba7e839a39615aba05aa86bc62f6abd246.tar.bz2
ice-de2673ba7e839a39615aba05aa86bc62f6abd246.tar.xz
ice-de2673ba7e839a39615aba05aa86bc62f6abd246.zip
another fix for 3396.
Diffstat (limited to 'cpp/src/Slice/JavaUtil.cpp')
-rw-r--r--cpp/src/Slice/JavaUtil.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 725e5e60268..e4ee4d6c392 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -223,6 +223,12 @@ Slice::JavaGenerator::JavaGenerator(const string& dir, Slice::FeatureProfile pro
Slice::JavaGenerator::~JavaGenerator()
{
+ // If open throws an exception other generators could be left open
+ // during the stack unwind.
+ if(_out != 0)
+ {
+ close();
+ }
assert(_out == 0);
}