From f6d11835b89548755dc5d64ff1bd5703f5753584 Mon Sep 17 00:00:00 2001 From: pgdurand Date: Fri, 12 May 2017 09:07:27 +0200 Subject: [PATCH 1/2] fine tune program return code --- tools/PlastCmd.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/PlastCmd.cpp b/tools/PlastCmd.cpp index 19eb22a..d6d817b 100755 --- a/tools/PlastCmd.cpp +++ b/tools/PlastCmd.cpp @@ -104,6 +104,7 @@ using namespace launcher::core; int main (int argc, char* argv[]) { PlastOptionsParser parser; + int retcode = 0; try { /** We create a Properties instance for collecting both init properties file and user command line options. */ IProperties* props = new Properties (); @@ -147,20 +148,23 @@ int main (int argc, char* argv[]) catch (OptionFailure& e) { if (parser.saw(STR_OPTION_HELP)) { parser.displayHelp (stdout); } - else { parser.displayErrors (stdout); parser.displayHelpShort();} + else { parser.displayErrors (stdout); parser.displayHelpShort(); retcode = 2;} } catch (statistics::GlobalParametersFailure& e) { fprintf (stderr, MSG_MAIN_MSG2, e.getMessage()); + retcode = 3; } catch (const char* e) { fprintf (stderr, MSG_MAIN_MSG3, e); + retcode = 4; } catch (...) { fprintf (stderr, "%s", MSG_MAIN_MSG4); + retcode = 5; } - return 0; + return retcode; } From fa02be137aff404aae0042aebf9c781de2bc45fb Mon Sep 17 00:00:00 2001 From: pgdurand Date: Fri, 12 May 2017 14:49:40 +0200 Subject: [PATCH 2/2] fix order in XML element Parameters --- src/alignment/visitors/impl/XmlOutputVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alignment/visitors/impl/XmlOutputVisitor.cpp b/src/alignment/visitors/impl/XmlOutputVisitor.cpp index 3411b11..eac5a6f 100755 --- a/src/alignment/visitors/impl/XmlOutputVisitor.cpp +++ b/src/alignment/visitors/impl/XmlOutputVisitor.cpp @@ -144,8 +144,8 @@ void XmlOutputVisitor::visitQuerySequence ( printline (1, "not specified"); printline (1, ""); printline (2, ""); - printParameter(STR_OPTION_EVALUE, "expect"); printParameter(STR_OPTION_SCORE_MATRIX, "matrix"); + printParameter(STR_OPTION_EVALUE, "expect"); printParameter(STR_OPTION_OPEN_GAP_COST, "gap-open"); printParameter(STR_OPTION_EXTEND_GAP_COST, "gap-extend"); printParameter(STR_OPTION_FILTER_QUERY, "filter");