diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-01-12 13:24:42 -0330 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-01-12 13:24:42 -0330 |
commit | ccd83f8d813ca03a62eff8f2c3c360b3094c3be9 (patch) | |
tree | 11bc670c18a015c4c05184b63749f1a3d4169c87 /cpp/src/slice2java/Main.cpp | |
parent | Squashed commit of the following: (diff) | |
download | ice-ccd83f8d813ca03a62eff8f2c3c360b3094c3be9.tar.bz2 ice-ccd83f8d813ca03a62eff8f2c3c360b3094c3be9.tar.xz ice-ccd83f8d813ca03a62eff8f2c3c360b3094c3be9.zip |
Squashed commit of the following:
commit 0c7025d761813d2e121e8573ba16c14e5a6a4ea5
Author: Matthew Newhook <matthew@zeroc.com>
Date: Mon Jan 12 08:09:36 2009 -0330
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3396 slice2java fails silently if it cannot create dir
Diffstat (limited to 'cpp/src/slice2java/Main.cpp')
-rw-r--r-- | cpp/src/slice2java/Main.cpp | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index e515b95d5b9..b2fff573e39 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -241,32 +241,41 @@ main(int argc, char* argv[]) } else { - Gen gen(argv[0], icecpp.getBaseName(), includePaths, output); - if(!gen) + try { - p->destroy(); - return EXIT_FAILURE; - } - gen.generate(p, stream); - if(tie) - { - gen.generateTie(p); - } - if(impl) - { - gen.generateImpl(p); - } - if(implTie) - { - gen.generateImplTie(p); + Gen gen(argv[0], icecpp.getBaseName(), includePaths, output); + if(!gen) + { + p->destroy(); + return EXIT_FAILURE; + } + gen.generate(p, stream); + if(tie) + { + gen.generateTie(p); + } + if(impl) + { + gen.generateImpl(p); + } + if(implTie) + { + gen.generateImplTie(p); + } + if(!checksumClass.empty()) + { + // + // Calculate checksums for the Slice definitions in the unit. + // + ChecksumMap m = createChecksums(p); + copy(m.begin(), m.end(), inserter(checksums, checksums.begin())); + } } - if(!checksumClass.empty()) + catch(const Slice::FileException& ex) { - // - // Calculate checksums for the Slice definitions in the unit. - // - ChecksumMap m = createChecksums(p); - copy(m.begin(), m.end(), inserter(checksums, checksums.begin())); + p->destroy(); + cerr << ex.reason() << endl; + return EXIT_FAILURE; } } p->destroy(); |