diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-02-11 16:22:31 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-02-11 16:22:31 -0330 |
commit | 12f3a4cca8eb02daf266180dff264637a009ef5f (patch) | |
tree | a389fed00bdb82fd75b8599b21172d0d83b41fd8 /cpp/src/slice2java/Main.cpp | |
parent | Minor Fix to 3715 (diff) | |
download | ice-12f3a4cca8eb02daf266180dff264637a009ef5f.tar.bz2 ice-12f3a4cca8eb02daf266180dff264637a009ef5f.tar.xz ice-12f3a4cca8eb02daf266180dff264637a009ef5f.zip |
Bug 3651 - slice2cpp --depend does not error on bad slice
Diffstat (limited to 'cpp/src/slice2java/Main.cpp')
-rw-r--r-- | cpp/src/slice2java/Main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index cb98ac9823c..c91de6805d3 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -206,10 +206,31 @@ main(int argc, char* argv[]) if(depend || dependxml) { Preprocessor icecpp(argv[0], *i, cppArgs); + + FILE* cppHandle = icecpp.preprocess(false); + if(cppHandle == 0) + { + return EXIT_FAILURE; + } + + UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive); + int parseStatus = u->parse(*i, cppHandle, debug); + u->destroy(); + + if(parseStatus == EXIT_FAILURE) + { + return EXIT_FAILURE; + } + if(!icecpp.printMakefileDependencies(depend ? Preprocessor::Java : Preprocessor::JavaXML, includePaths)) { return EXIT_FAILURE; } + + if(!icecpp.close()) + { + return EXIT_FAILURE; + } } else { |