From fd4d5cfc28e4ed910a4d374d3b0717d6731370fa Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 9 May 2023 09:19:08 +0100 Subject: [PATCH 1/9] Fixed writer crash with null doc --- src/sbml/SBMLWriter.cpp | 131 +++++++++++++++++--------------- src/sbml/test/TestWriteSBML.cpp | 13 ++++ 2 files changed, 81 insertions(+), 63 deletions(-) diff --git a/src/sbml/SBMLWriter.cpp b/src/sbml/SBMLWriter.cpp index b63f946e69..d1eb750b60 100644 --- a/src/sbml/SBMLWriter.cpp +++ b/src/sbml/SBMLWriter.cpp @@ -140,84 +140,85 @@ bool SBMLWriter::writeSBML (const SBMLDocument* d, const std::string& filename) { std::ostream* stream = NULL; - - try + if (d != NULL) { - // open an uncompressed XML file. - if ( string::npos != filename.find(".xml", filename.length() - 4) ) - { - stream = new(std::nothrow) std::ofstream(filename.c_str()); - } - // open a gzip file - else if ( string::npos != filename.find(".gz", filename.length() - 3) ) - { - stream = OutputCompressor::openGzipOStream(filename); - } - // open a bz2 file - else if ( string::npos != filename.find(".bz2", filename.length() - 4) ) - { - stream = OutputCompressor::openBzip2OStream(filename); - } - // open a zip file - else if ( string::npos != filename.find(".zip", filename.length() - 4) ) + try { - std::string filenameinzip = filename.substr(0, filename.length() - 4); - - if ( ( string::npos == filenameinzip.find(".xml", filenameinzip.length() - 4) ) && - ( string::npos == filenameinzip.find(".sbml", filenameinzip.length() - 5) ) - ) + // open an uncompressed XML file. + if (string::npos != filename.find(".xml", filename.length() - 4)) + { + stream = new(std::nothrow) std::ofstream(filename.c_str()); + } + // open a gzip file + else if (string::npos != filename.find(".gz", filename.length() - 3)) + { + stream = OutputCompressor::openGzipOStream(filename); + } + // open a bz2 file + else if (string::npos != filename.find(".bz2", filename.length() - 4)) { - filenameinzip += ".xml"; + stream = OutputCompressor::openBzip2OStream(filename); } + // open a zip file + else if (string::npos != filename.find(".zip", filename.length() - 4)) + { + std::string filenameinzip = filename.substr(0, filename.length() - 4); + + if ((string::npos == filenameinzip.find(".xml", filenameinzip.length() - 4)) && + (string::npos == filenameinzip.find(".sbml", filenameinzip.length() - 5)) + ) + { + filenameinzip += ".xml"; + } #if defined(WIN32) && !defined(CYGWIN) - char sepr = '\\'; + char sepr = '\\'; #else - char sepr = '/'; + char sepr = '/'; #endif - size_t spos = filenameinzip.rfind(sepr, filenameinzip.length() - 1); - if( spos != string::npos ) + size_t spos = filenameinzip.rfind(sepr, filenameinzip.length() - 1); + if (spos != string::npos) + { + filenameinzip = filenameinzip.substr(spos + 1, filenameinzip.length() - 1); + } + + + stream = OutputCompressor::openZipOStream(filename, filenameinzip); + } + else { - filenameinzip = filenameinzip.substr(spos + 1, filenameinzip.length() - 1); + stream = new(std::nothrow) std::ofstream(filename.c_str()); } - - - stream = OutputCompressor::openZipOStream(filename, filenameinzip); } - else + catch (ZlibNotLinked&) { - stream = new(std::nothrow) std::ofstream(filename.c_str()); + // libSBML is not linked with zlib. + XMLErrorLog *log = (const_cast(d))->getErrorLog(); + std::ostringstream oss; + oss << "Tried to write " << filename << ". Writing a gzip/zip file is not enabled because " + << "underlying libSBML is not linked with zlib."; + log->add(XMLError(XMLFileUnwritable, oss.str(), 0, 0)); + return false; + } + catch (Bzip2NotLinked&) + { + // libSBML is not linked with bzip2. + XMLErrorLog *log = (const_cast(d))->getErrorLog(); + std::ostringstream oss; + oss << "Tried to write " << filename << ". Writing a bzip2 file is not enabled because " + << "underlying libSBML is not linked with bzip2."; + log->add(XMLError(XMLFileUnwritable, oss.str(), 0, 0)); + return false; } - } - catch ( ZlibNotLinked& ) - { - // libSBML is not linked with zlib. - XMLErrorLog *log = (const_cast(d))->getErrorLog(); - std::ostringstream oss; - oss << "Tried to write " << filename << ". Writing a gzip/zip file is not enabled because " - << "underlying libSBML is not linked with zlib."; - log->add(XMLError( XMLFileUnwritable, oss.str(), 0, 0) ); - return false; - } - catch ( Bzip2NotLinked& ) - { - // libSBML is not linked with bzip2. - XMLErrorLog *log = (const_cast(d))->getErrorLog(); - std::ostringstream oss; - oss << "Tried to write " << filename << ". Writing a bzip2 file is not enabled because " - << "underlying libSBML is not linked with bzip2."; - log->add(XMLError( XMLFileUnwritable, oss.str(), 0, 0) ); - return false; - } - - if ( stream == NULL || stream->fail() || stream->bad()) - { - SBMLErrorLog *log = (const_cast(d))->getErrorLog(); - log->logError(XMLFileUnwritable); - delete stream; - return false; + if (stream == NULL || stream->fail() || stream->bad()) + { + SBMLErrorLog *log = (const_cast(d))->getErrorLog(); + log->logError(XMLFileUnwritable); + delete stream; + return false; + } } bool result = writeSBML(d, *stream); @@ -238,6 +239,10 @@ bool SBMLWriter::writeSBML (const SBMLDocument* d, std::ostream& stream) { bool result = false; + if (d == NULL) + { + return result; + } try { diff --git a/src/sbml/test/TestWriteSBML.cpp b/src/sbml/test/TestWriteSBML.cpp index db1f1bb41d..a5f3bb73aa 100644 --- a/src/sbml/test/TestWriteSBML.cpp +++ b/src/sbml/test/TestWriteSBML.cpp @@ -129,6 +129,18 @@ START_TEST (test_WriteSBML_error) END_TEST +START_TEST(test_WriteSBML_NULL_doc) +{ + SBMLDocument *d = NULL; + SBMLWriter *w = new SBMLWriter(); + + fail_unless(!w->writeSBML(d, "/tmp/")); + + delete w; +} +END_TEST + + START_TEST (test_SBMLWriter_create) { SBMLWriter_t *w = SBMLWriter_create(); @@ -3268,6 +3280,7 @@ create_suite_WriteSBML () // Basic writing capability tcase_add_test( tcase, test_WriteSBML_error ); + tcase_add_test(tcase, test_WriteSBML_NULL_doc); // SBMLDocument tcase_add_test( tcase, test_WriteSBML_SBMLDocument_L1v1 ); From 6f14553e6ccb2e5e4c463611fbb458fcca48ce7a Mon Sep 17 00:00:00 2001 From: Sarah Date: Wed, 10 May 2023 11:17:08 +0100 Subject: [PATCH 2/9] missing space in error message --- src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp b/src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp index b9743091b1..37a8740068 100644 --- a/src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp +++ b/src/sbml/validator/constraints/RateOfCompartmentMathCheck.cpp @@ -214,7 +214,7 @@ RateOfCompartmentMathCheck::getMessage (const ASTNode& node, const SBase& object } break; } - oss_msg << "uses the species'" << node.getChild(0)->getName(); + oss_msg << "uses the species '" << node.getChild(0)->getName(); oss_msg << "' whose compartment is referenced as the variable in an assignmentRule."; safe_free(formula); From d52d8f34523227a766506587c560ef39755b6fe6 Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 15 May 2023 15:29:41 +0100 Subject: [PATCH 3/9] validate needs to call plugins --- src/sbml/SBMLDocument.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sbml/SBMLDocument.cpp b/src/sbml/SBMLDocument.cpp index 0469e1eb5b..4a549ffb1d 100644 --- a/src/sbml/SBMLDocument.cpp +++ b/src/sbml/SBMLDocument.cpp @@ -828,6 +828,12 @@ unsigned int SBMLDocument::validateSBML () unsigned int numErrors = mInternalValidator->checkConsistency(); + for (unsigned int i = 0; i < getNumPlugins(); i++) + { + numErrors += static_cast + (getPlugin(i))->checkConsistency(); + } + list::iterator it; for (it = mValidators.begin(); it != mValidators.end(); it++) { From a479b25d3d6efa8e241c4c8d8ceadc1c018f031a Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 15 May 2023 17:10:47 +0100 Subject: [PATCH 4/9] fix unsafe return --- src/sbml/packages/render/sbml/DefaultValues.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbml/packages/render/sbml/DefaultValues.cpp b/src/sbml/packages/render/sbml/DefaultValues.cpp index 12a5add2fb..81354c712f 100644 --- a/src/sbml/packages/render/sbml/DefaultValues.cpp +++ b/src/sbml/packages/render/sbml/DefaultValues.cpp @@ -3777,7 +3777,7 @@ LIBSBML_EXTERN char * DefaultValues_getFillRuleAsString(const DefaultValues_t * dv) { - return (char *)(dv->getFillRuleAsString()).c_str(); + return (char *)(FillRule_toString((FillRule_t)(dv->getFillRule()))); } From e2b6fd06cc3ffbd03965aaf407aa47569867ce3b Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 16 May 2023 10:05:13 +0100 Subject: [PATCH 5/9] make null catch supersafe which hopefully pleases macos --- src/sbml/SBMLWriter.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sbml/SBMLWriter.cpp b/src/sbml/SBMLWriter.cpp index d1eb750b60..c0a85cd5a5 100644 --- a/src/sbml/SBMLWriter.cpp +++ b/src/sbml/SBMLWriter.cpp @@ -140,7 +140,11 @@ bool SBMLWriter::writeSBML (const SBMLDocument* d, const std::string& filename) { std::ostream* stream = NULL; - if (d != NULL) + if (d == NULL) + { + return false; + } + else { try { @@ -221,11 +225,10 @@ SBMLWriter::writeSBML (const SBMLDocument* d, const std::string& filename) } } - bool result = writeSBML(d, *stream); - delete stream; - - return result; + bool result = writeSBML(d, *stream); + delete stream; + return result; } From 380618fedc91f64c3d4df00e4a17c9525b0821a0 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 16 May 2023 11:18:20 +0100 Subject: [PATCH 6/9] Make the copy safe --- src/sbml/packages/render/sbml/DefaultValues.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbml/packages/render/sbml/DefaultValues.cpp b/src/sbml/packages/render/sbml/DefaultValues.cpp index 81354c712f..7bfff15317 100644 --- a/src/sbml/packages/render/sbml/DefaultValues.cpp +++ b/src/sbml/packages/render/sbml/DefaultValues.cpp @@ -3777,7 +3777,7 @@ LIBSBML_EXTERN char * DefaultValues_getFillRuleAsString(const DefaultValues_t * dv) { - return (char *)(FillRule_toString((FillRule_t)(dv->getFillRule()))); + return (char *)safe_strdup(FillRule_toString((FillRule_t)(dv->getFillRule()))); } From 30456b00f4096a5e8655ff7c8ed9c4042809e713 Mon Sep 17 00:00:00 2001 From: Sarah Date: Tue, 16 May 2023 11:31:55 +0100 Subject: [PATCH 7/9] Replace catching exceptions with & --- src/sbml/AlgebraicRule.cpp | 4 ++-- src/sbml/AssignmentRule.cpp | 4 ++-- src/sbml/Compartment.cpp | 6 ++--- src/sbml/CompartmentType.cpp | 6 ++--- src/sbml/Constraint.cpp | 6 ++--- src/sbml/Delay.cpp | 4 ++-- src/sbml/Event.cpp | 12 +++++----- src/sbml/EventAssignment.cpp | 6 ++--- src/sbml/FunctionDefinition.cpp | 6 ++--- src/sbml/InitialAssignment.cpp | 6 ++--- src/sbml/KineticLaw.cpp | 4 ++-- src/sbml/LocalParameter.cpp | 6 ++--- src/sbml/Model.cpp | 4 ++-- src/sbml/ModifierSpeciesReference.cpp | 4 ++-- src/sbml/Parameter.cpp | 6 ++--- src/sbml/Priority.cpp | 4 ++-- src/sbml/RateRule.cpp | 4 ++-- src/sbml/Reaction.cpp | 8 +++---- src/sbml/Rule.cpp | 22 +++++++++---------- src/sbml/SBMLDocument.cpp | 10 ++++----- src/sbml/Species.cpp | 6 ++--- src/sbml/SpeciesReference.cpp | 20 ++++++++--------- src/sbml/SpeciesType.cpp | 6 ++--- src/sbml/StoichiometryMath.cpp | 4 ++-- src/sbml/Trigger.cpp | 4 ++-- src/sbml/Unit.cpp | 6 ++--- src/sbml/UnitDefinition.cpp | 6 ++--- .../extension/MultiListOfReactionsPlugin.cpp | 2 +- 28 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/sbml/AlgebraicRule.cpp b/src/sbml/AlgebraicRule.cpp index 4c138cc3f8..28f10cf277 100644 --- a/src/sbml/AlgebraicRule.cpp +++ b/src/sbml/AlgebraicRule.cpp @@ -371,7 +371,7 @@ AlgebraicRule_create(unsigned int level, unsigned int version) AlgebraicRule* obj = new AlgebraicRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -387,7 +387,7 @@ AlgebraicRule_createWithNS (SBMLNamespaces_t* sbmlns) AlgebraicRule* obj = new AlgebraicRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/AssignmentRule.cpp b/src/sbml/AssignmentRule.cpp index 80e6d4da34..735582d8b3 100644 --- a/src/sbml/AssignmentRule.cpp +++ b/src/sbml/AssignmentRule.cpp @@ -450,7 +450,7 @@ AssignmentRule_create(unsigned int level, unsigned int version) AssignmentRule* obj = new AssignmentRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -466,7 +466,7 @@ AssignmentRule_createWithNS (SBMLNamespaces_t* sbmlns) AssignmentRule* obj = new AssignmentRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Compartment.cpp b/src/sbml/Compartment.cpp index 0fe72009fa..2aca2650a2 100644 --- a/src/sbml/Compartment.cpp +++ b/src/sbml/Compartment.cpp @@ -1999,7 +1999,7 @@ ListOfCompartments::createObject (XMLInputStream& stream) { object = new Compartment(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Compartment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2029,7 +2029,7 @@ Compartment_create (unsigned int level, unsigned int version) Compartment* obj = new Compartment(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2045,7 +2045,7 @@ Compartment_createWithNS (SBMLNamespaces_t* sbmlns) Compartment* obj = new Compartment(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/CompartmentType.cpp b/src/sbml/CompartmentType.cpp index ed6c114b80..cbec2c4c65 100644 --- a/src/sbml/CompartmentType.cpp +++ b/src/sbml/CompartmentType.cpp @@ -807,7 +807,7 @@ ListOfCompartmentTypes::createObject (XMLInputStream& stream) { object = new CompartmentType(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { // compartment type does not exist in L3 object = new CompartmentType(2,4); @@ -837,7 +837,7 @@ CompartmentType_create (unsigned int level, unsigned int version) CompartmentType* obj = new CompartmentType(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -853,7 +853,7 @@ CompartmentType_createWithNS (SBMLNamespaces_t* sbmlns) CompartmentType* obj = new CompartmentType(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Constraint.cpp b/src/sbml/Constraint.cpp index 7aa649e9f7..cc67297ba7 100644 --- a/src/sbml/Constraint.cpp +++ b/src/sbml/Constraint.cpp @@ -1076,7 +1076,7 @@ ListOfConstraints::createObject (XMLInputStream& stream) { object = new Constraint(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Constraint(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1107,7 +1107,7 @@ Constraint_create (unsigned int level, unsigned int version) Constraint* obj = new Constraint(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1123,7 +1123,7 @@ Constraint_createWithNS (SBMLNamespaces_t* sbmlns) Constraint* obj = new Constraint(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Delay.cpp b/src/sbml/Delay.cpp index 30e10bc74e..55a8841d47 100644 --- a/src/sbml/Delay.cpp +++ b/src/sbml/Delay.cpp @@ -856,7 +856,7 @@ Delay_create (unsigned int level, unsigned int version) Delay* obj = new Delay(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -872,7 +872,7 @@ Delay_createWithNS (SBMLNamespaces_t* sbmlns) Delay* obj = new Delay(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Event.cpp b/src/sbml/Event.cpp index 410b457af8..61ddb2a195 100644 --- a/src/sbml/Event.cpp +++ b/src/sbml/Event.cpp @@ -1281,7 +1281,7 @@ Event::createObject (XMLInputStream& stream) { mTrigger = new Trigger(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { mTrigger = new Trigger(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1310,7 +1310,7 @@ Event::createObject (XMLInputStream& stream) { mDelay = new Delay(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { mDelay = new Delay(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1341,7 +1341,7 @@ Event::createObject (XMLInputStream& stream) { mPriority = new Priority(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { mPriority = new Priority(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2293,7 +2293,7 @@ ListOfEvents::createObject (XMLInputStream& stream) { object = new Event(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Event(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2324,7 +2324,7 @@ Event_create (unsigned int level, unsigned int version) Event* obj = new Event(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2340,7 +2340,7 @@ Event_createWithNS (SBMLNamespaces_t* sbmlns) Event* obj = new Event(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/EventAssignment.cpp b/src/sbml/EventAssignment.cpp index 12e87137f0..dcfef78d31 100644 --- a/src/sbml/EventAssignment.cpp +++ b/src/sbml/EventAssignment.cpp @@ -1212,7 +1212,7 @@ ListOfEventAssignments::createObject (XMLInputStream& stream) { object = new EventAssignment(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new EventAssignment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1243,7 +1243,7 @@ EventAssignment_create (unsigned int level, unsigned int version) EventAssignment* obj = new EventAssignment(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1259,7 +1259,7 @@ EventAssignment_createWithNS (SBMLNamespaces_t* sbmlns) EventAssignment* obj = new EventAssignment(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/FunctionDefinition.cpp b/src/sbml/FunctionDefinition.cpp index b6a3721407..4a4f7ebb00 100644 --- a/src/sbml/FunctionDefinition.cpp +++ b/src/sbml/FunctionDefinition.cpp @@ -1292,7 +1292,7 @@ ListOfFunctionDefinitions::createObject (XMLInputStream& stream) { object = new FunctionDefinition(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new FunctionDefinition(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1322,7 +1322,7 @@ FunctionDefinition_create (unsigned int level, unsigned int version) FunctionDefinition* obj = new FunctionDefinition(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1338,7 +1338,7 @@ FunctionDefinition_createWithNS (SBMLNamespaces_t* sbmlns) FunctionDefinition* obj = new FunctionDefinition(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/InitialAssignment.cpp b/src/sbml/InitialAssignment.cpp index 21e5ac13d2..6357d532b2 100644 --- a/src/sbml/InitialAssignment.cpp +++ b/src/sbml/InitialAssignment.cpp @@ -1194,7 +1194,7 @@ ListOfInitialAssignments::createObject (XMLInputStream& stream) { object = new InitialAssignment(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new InitialAssignment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1225,7 +1225,7 @@ InitialAssignment_create (unsigned int level, unsigned int version) InitialAssignment* obj = new InitialAssignment(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1241,7 +1241,7 @@ InitialAssignment_createWithNS (SBMLNamespaces_t* sbmlns) InitialAssignment* obj = new InitialAssignment(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/KineticLaw.cpp b/src/sbml/KineticLaw.cpp index b455641b34..d79fa58888 100644 --- a/src/sbml/KineticLaw.cpp +++ b/src/sbml/KineticLaw.cpp @@ -2007,7 +2007,7 @@ KineticLaw_create (unsigned int level, unsigned int version) KineticLaw* obj = new KineticLaw(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2023,7 +2023,7 @@ KineticLaw_createWithNS (SBMLNamespaces_t* sbmlns) KineticLaw* obj = new KineticLaw(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/LocalParameter.cpp b/src/sbml/LocalParameter.cpp index b28b9c7928..db09df4879 100644 --- a/src/sbml/LocalParameter.cpp +++ b/src/sbml/LocalParameter.cpp @@ -752,7 +752,7 @@ ListOfLocalParameters::createObject (XMLInputStream& stream) { object = new LocalParameter(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new LocalParameter(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -782,7 +782,7 @@ LocalParameter_create (unsigned int level, unsigned int version) LocalParameter* obj = new LocalParameter(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -798,7 +798,7 @@ LocalParameter_createWithNS (SBMLNamespaces_t* sbmlns) LocalParameter* obj = new LocalParameter(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Model.cpp b/src/sbml/Model.cpp index 9a8d716d04..f259e9536e 100644 --- a/src/sbml/Model.cpp +++ b/src/sbml/Model.cpp @@ -7104,7 +7104,7 @@ Model_create (unsigned int level, unsigned int version) Model* obj = new Model(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -7120,7 +7120,7 @@ Model_createWithNS (SBMLNamespaces_t* sbmlns) Model* obj = new Model(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/ModifierSpeciesReference.cpp b/src/sbml/ModifierSpeciesReference.cpp index 79d386f8ad..1187399bf8 100644 --- a/src/sbml/ModifierSpeciesReference.cpp +++ b/src/sbml/ModifierSpeciesReference.cpp @@ -397,7 +397,7 @@ ModifierSpeciesReference_create(unsigned int level, unsigned int version) ModifierSpeciesReference* obj = new ModifierSpeciesReference(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -413,7 +413,7 @@ ModifierSpeciesReference_createWithNS (SBMLNamespaces_t* sbmlns) ModifierSpeciesReference* obj = new ModifierSpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Parameter.cpp b/src/sbml/Parameter.cpp index 1ccb891725..25b729b485 100644 --- a/src/sbml/Parameter.cpp +++ b/src/sbml/Parameter.cpp @@ -1918,7 +1918,7 @@ ListOfParameters::createObject (XMLInputStream& stream) { object = new Parameter(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Parameter(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1948,7 +1948,7 @@ Parameter_create (unsigned int level, unsigned int version) Parameter* obj = new Parameter(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1964,7 +1964,7 @@ Parameter_createWithNS (SBMLNamespaces_t* sbmlns) Parameter* obj = new Parameter(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Priority.cpp b/src/sbml/Priority.cpp index 6608991124..3bfbdbe14d 100644 --- a/src/sbml/Priority.cpp +++ b/src/sbml/Priority.cpp @@ -703,7 +703,7 @@ Priority_create (unsigned int level, unsigned int version) Priority* obj = new Priority(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -719,7 +719,7 @@ Priority_createWithNS (SBMLNamespaces_t* sbmlns) Priority* obj = new Priority(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/RateRule.cpp b/src/sbml/RateRule.cpp index 31edb73ab7..b802322b14 100644 --- a/src/sbml/RateRule.cpp +++ b/src/sbml/RateRule.cpp @@ -449,7 +449,7 @@ RateRule_create(unsigned int level, unsigned int version) RateRule* obj = new RateRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -465,7 +465,7 @@ RateRule_createWithNS (SBMLNamespaces_t* sbmlns) RateRule* obj = new RateRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Reaction.cpp b/src/sbml/Reaction.cpp index 815697ef58..a2664f0d4b 100644 --- a/src/sbml/Reaction.cpp +++ b/src/sbml/Reaction.cpp @@ -1564,7 +1564,7 @@ Reaction::createObject (XMLInputStream& stream) { mKineticLaw = new KineticLaw(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { mKineticLaw = new KineticLaw(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2599,7 +2599,7 @@ ListOfReactions::createObject (XMLInputStream& stream) { object = new Reaction(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Reaction(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2630,7 +2630,7 @@ Reaction_create (unsigned int level, unsigned int version) Reaction* obj = new Reaction(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2646,7 +2646,7 @@ Reaction_createWithNS (SBMLNamespaces_t* sbmlns) Reaction* obj = new Reaction(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Rule.cpp b/src/sbml/Rule.cpp index 2ce36e5b9f..7fa3135a15 100644 --- a/src/sbml/Rule.cpp +++ b/src/sbml/Rule.cpp @@ -1755,7 +1755,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AlgebraicRule(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new AlgebraicRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1777,7 +1777,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AssignmentRule(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new AssignmentRule(1, 2); } @@ -1792,7 +1792,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new RateRule(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new RateRule(1, 2); } @@ -1832,7 +1832,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AssignmentRule(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new AssignmentRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1849,7 +1849,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new RateRule(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new RateRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1880,7 +1880,7 @@ Rule_createAlgebraic (unsigned int level, unsigned int version) AlgebraicRule* obj = new AlgebraicRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1896,7 +1896,7 @@ Rule_createAlgebraicWithNS (SBMLNamespaces_t* sbmlns) AlgebraicRule* obj = new AlgebraicRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1912,7 +1912,7 @@ Rule_createAssignment (unsigned int level, unsigned int version) AssignmentRule* obj = new AssignmentRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1928,7 +1928,7 @@ Rule_createAssignmentWithNS (SBMLNamespaces_t* sbmlns) AssignmentRule* obj = new AssignmentRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1944,7 +1944,7 @@ Rule_createRate (unsigned int level, unsigned int version) RateRule* obj = new RateRule(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1960,7 +1960,7 @@ Rule_createRateWithNS (SBMLNamespaces_t* sbmlns) RateRule* obj = new RateRule(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/SBMLDocument.cpp b/src/sbml/SBMLDocument.cpp index 4a549ffb1d..cd6316e75c 100644 --- a/src/sbml/SBMLDocument.cpp +++ b/src/sbml/SBMLDocument.cpp @@ -633,7 +633,7 @@ SBMLDocument::createModel (const std::string sid) { mModel = new Model(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { /* here we do not create a default object as the level/version must * match the parent object @@ -1307,7 +1307,7 @@ SBMLDocument::createObject (XMLInputStream& stream) { mModel = new Model(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { mModel = new Model(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2204,7 +2204,7 @@ SBMLDocument_create () SBMLDocument* obj = new SBMLDocument(); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2220,7 +2220,7 @@ SBMLDocument_createWithLevelAndVersion (unsigned int level, unsigned int version SBMLDocument* obj = new SBMLDocument(level, version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2236,7 +2236,7 @@ SBMLDocument_createWithSBMLNamespaces (SBMLNamespaces_t *sbmlns) SBMLDocument* obj = new SBMLDocument(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Species.cpp b/src/sbml/Species.cpp index fb7f720647..d40c9e9054 100644 --- a/src/sbml/Species.cpp +++ b/src/sbml/Species.cpp @@ -2545,7 +2545,7 @@ ListOfSpecies::createObject (XMLInputStream& stream) { object = new Species(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Species(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2575,7 +2575,7 @@ Species_create (unsigned int level, unsigned int version) Species* obj = new Species(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2591,7 +2591,7 @@ Species_createWithNS (SBMLNamespaces_t* sbmlns) Species* obj = new Species(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/SpeciesReference.cpp b/src/sbml/SpeciesReference.cpp index 24acd77864..7ad7be5d49 100644 --- a/src/sbml/SpeciesReference.cpp +++ b/src/sbml/SpeciesReference.cpp @@ -539,7 +539,7 @@ SpeciesReference::createStoichiometryMath () { mStoichiometryMath = new StoichiometryMath(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { /* here we do not create a default object as the level/version must * match the parent object @@ -1148,7 +1148,7 @@ SpeciesReference::createObject (XMLInputStream& stream) { mStoichiometryMath = new StoichiometryMath(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { mStoichiometryMath = new StoichiometryMath( SBMLDocument::getDefaultLevel(), @@ -1740,7 +1740,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new SpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { object = new SpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1759,7 +1759,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new SpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { object = new SpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1775,7 +1775,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new ModifierSpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { object = new ModifierSpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1791,7 +1791,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new ModifierSpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { object = new ModifierSpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1818,7 +1818,7 @@ SpeciesReference_create (unsigned int level, unsigned int version) SpeciesReference* obj = new SpeciesReference(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1834,7 +1834,7 @@ SpeciesReference_createWithNS (SBMLNamespaces_t* sbmlns) SpeciesReference* obj = new SpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1850,7 +1850,7 @@ SpeciesReference_createModifier (unsigned int level, unsigned int version) ModifierSpeciesReference* obj = new ModifierSpeciesReference(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -1866,7 +1866,7 @@ SpeciesReference_createModifierWithNS (SBMLNamespaces_t* sbmlns) ModifierSpeciesReference* obj = new ModifierSpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/SpeciesType.cpp b/src/sbml/SpeciesType.cpp index dab5dcc38e..5e6efd96a4 100644 --- a/src/sbml/SpeciesType.cpp +++ b/src/sbml/SpeciesType.cpp @@ -804,7 +804,7 @@ ListOfSpeciesTypes::createObject (XMLInputStream& stream) { object = new SpeciesType(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { // species type does not exist in L3, hence we fall back object = new SpeciesType(2, @@ -836,7 +836,7 @@ SpeciesType_create (unsigned int level, unsigned int version) SpeciesType* obj = new SpeciesType(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -852,7 +852,7 @@ SpeciesType_createWithNS (SBMLNamespaces_t* sbmlns) SpeciesType* obj = new SpeciesType(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/StoichiometryMath.cpp b/src/sbml/StoichiometryMath.cpp index b2663a427b..52741f81ee 100644 --- a/src/sbml/StoichiometryMath.cpp +++ b/src/sbml/StoichiometryMath.cpp @@ -644,7 +644,7 @@ StoichiometryMath_create (unsigned int level, unsigned int version) StoichiometryMath* obj = new StoichiometryMath(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -660,7 +660,7 @@ StoichiometryMath_createWithNS (SBMLNamespaces_t* sbmlns) StoichiometryMath* obj = new StoichiometryMath(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Trigger.cpp b/src/sbml/Trigger.cpp index 3ed4857d33..4ae4726893 100644 --- a/src/sbml/Trigger.cpp +++ b/src/sbml/Trigger.cpp @@ -979,7 +979,7 @@ Trigger_create (unsigned int level, unsigned int version) Trigger* obj = new Trigger(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -995,7 +995,7 @@ Trigger_createWithNS (SBMLNamespaces_t* sbmlns) Trigger* obj = new Trigger(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/Unit.cpp b/src/sbml/Unit.cpp index 56e9c37d91..de51bb7ffd 100644 --- a/src/sbml/Unit.cpp +++ b/src/sbml/Unit.cpp @@ -2569,7 +2569,7 @@ ListOfUnits::createObject (XMLInputStream& stream) { object = new Unit(getSBMLNamespaces()); } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new Unit(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2599,7 +2599,7 @@ Unit_create (unsigned int level, unsigned int version) Unit* obj = new Unit(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2615,7 +2615,7 @@ Unit_createWithNS (SBMLNamespaces_t* sbmlns) Unit* obj = new Unit(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/UnitDefinition.cpp b/src/sbml/UnitDefinition.cpp index 3852f04289..be1fbbaaf1 100644 --- a/src/sbml/UnitDefinition.cpp +++ b/src/sbml/UnitDefinition.cpp @@ -2310,7 +2310,7 @@ ListOfUnitDefinitions::createObject (XMLInputStream& stream) { object = new UnitDefinition(getSBMLNamespaces()); } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { object = new UnitDefinition(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2335,7 +2335,7 @@ UnitDefinition_create (unsigned int level, unsigned int version) UnitDefinition* obj = new UnitDefinition(level,version); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } @@ -2351,7 +2351,7 @@ UnitDefinition_createWithNS (SBMLNamespaces_t* sbmlns) UnitDefinition* obj = new UnitDefinition(sbmlns); return obj; } - catch (SBMLConstructorException) + catch (SBMLConstructorException &e) { return NULL; } diff --git a/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp b/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp index ae4304c333..ce7d769f94 100644 --- a/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp +++ b/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp @@ -137,7 +137,7 @@ MultiListOfReactionsPlugin::createObject (XMLInputStream& stream) object = new IntraSpeciesReaction(multins); delete multins; } - catch (SBMLConstructorException*) + catch (SBMLConstructorException &e) { object = new IntraSpeciesReaction(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); From 359d67dc04341ac2624869805927a861dcff7eb9 Mon Sep 17 00:00:00 2001 From: Sarah Date: Wed, 24 May 2023 09:06:13 +0100 Subject: [PATCH 8/9] replace exception &e with & --- src/sbml/AlgebraicRule.cpp | 4 +- src/sbml/AssignmentRule.cpp | 4 +- src/sbml/Compartment.cpp | 6 +- src/sbml/CompartmentType.cpp | 6 +- src/sbml/Constraint.cpp | 6 +- src/sbml/Delay.cpp | 4 +- src/sbml/Event.cpp | 12 +- src/sbml/EventAssignment.cpp | 6 +- src/sbml/FunctionDefinition.cpp | 6 +- src/sbml/InitialAssignment.cpp | 6 +- src/sbml/KineticLaw.cpp | 4 +- src/sbml/LocalParameter.cpp | 6 +- src/sbml/Model.cpp | 4 +- src/sbml/ModifierSpeciesReference.cpp | 4 +- src/sbml/Parameter.cpp | 6 +- src/sbml/Priority.cpp | 4 +- src/sbml/RateRule.cpp | 4 +- src/sbml/Reaction.cpp | 8 +- src/sbml/Rule.cpp | 22 +- src/sbml/SBMLDocument.cpp | 10 +- src/sbml/Species.cpp | 6 +- src/sbml/SpeciesReference.cpp | 20 +- src/sbml/SpeciesType.cpp | 6 +- src/sbml/StoichiometryMath.cpp | 4 +- src/sbml/Trigger.cpp | 4 +- src/sbml/Unit.cpp | 6 +- src/sbml/UnitDefinition.cpp | 6 +- src/sbml/annotation/test/TestCopyAndClone.cpp | 8 +- .../test/TestL3v2MathConsistencyValidator.cpp | 2 +- .../extension/MultiListOfReactionsPlugin.cpp | 2 +- .../test/TestSBMLConstructorException.cpp | 322 +++++++++--------- .../test/TestConsistencyValidator.cpp | 2 +- 32 files changed, 260 insertions(+), 260 deletions(-) diff --git a/src/sbml/AlgebraicRule.cpp b/src/sbml/AlgebraicRule.cpp index 28f10cf277..66fa21c584 100644 --- a/src/sbml/AlgebraicRule.cpp +++ b/src/sbml/AlgebraicRule.cpp @@ -371,7 +371,7 @@ AlgebraicRule_create(unsigned int level, unsigned int version) AlgebraicRule* obj = new AlgebraicRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -387,7 +387,7 @@ AlgebraicRule_createWithNS (SBMLNamespaces_t* sbmlns) AlgebraicRule* obj = new AlgebraicRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/AssignmentRule.cpp b/src/sbml/AssignmentRule.cpp index 735582d8b3..2df28d70d2 100644 --- a/src/sbml/AssignmentRule.cpp +++ b/src/sbml/AssignmentRule.cpp @@ -450,7 +450,7 @@ AssignmentRule_create(unsigned int level, unsigned int version) AssignmentRule* obj = new AssignmentRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -466,7 +466,7 @@ AssignmentRule_createWithNS (SBMLNamespaces_t* sbmlns) AssignmentRule* obj = new AssignmentRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Compartment.cpp b/src/sbml/Compartment.cpp index 2aca2650a2..1dc5aadb76 100644 --- a/src/sbml/Compartment.cpp +++ b/src/sbml/Compartment.cpp @@ -1999,7 +1999,7 @@ ListOfCompartments::createObject (XMLInputStream& stream) { object = new Compartment(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Compartment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2029,7 +2029,7 @@ Compartment_create (unsigned int level, unsigned int version) Compartment* obj = new Compartment(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2045,7 +2045,7 @@ Compartment_createWithNS (SBMLNamespaces_t* sbmlns) Compartment* obj = new Compartment(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/CompartmentType.cpp b/src/sbml/CompartmentType.cpp index cbec2c4c65..3544a5c21b 100644 --- a/src/sbml/CompartmentType.cpp +++ b/src/sbml/CompartmentType.cpp @@ -807,7 +807,7 @@ ListOfCompartmentTypes::createObject (XMLInputStream& stream) { object = new CompartmentType(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { // compartment type does not exist in L3 object = new CompartmentType(2,4); @@ -837,7 +837,7 @@ CompartmentType_create (unsigned int level, unsigned int version) CompartmentType* obj = new CompartmentType(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -853,7 +853,7 @@ CompartmentType_createWithNS (SBMLNamespaces_t* sbmlns) CompartmentType* obj = new CompartmentType(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Constraint.cpp b/src/sbml/Constraint.cpp index cc67297ba7..976b8fa739 100644 --- a/src/sbml/Constraint.cpp +++ b/src/sbml/Constraint.cpp @@ -1076,7 +1076,7 @@ ListOfConstraints::createObject (XMLInputStream& stream) { object = new Constraint(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Constraint(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1107,7 +1107,7 @@ Constraint_create (unsigned int level, unsigned int version) Constraint* obj = new Constraint(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1123,7 +1123,7 @@ Constraint_createWithNS (SBMLNamespaces_t* sbmlns) Constraint* obj = new Constraint(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Delay.cpp b/src/sbml/Delay.cpp index 55a8841d47..4cdd137973 100644 --- a/src/sbml/Delay.cpp +++ b/src/sbml/Delay.cpp @@ -856,7 +856,7 @@ Delay_create (unsigned int level, unsigned int version) Delay* obj = new Delay(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -872,7 +872,7 @@ Delay_createWithNS (SBMLNamespaces_t* sbmlns) Delay* obj = new Delay(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Event.cpp b/src/sbml/Event.cpp index 61ddb2a195..d9ec624b00 100644 --- a/src/sbml/Event.cpp +++ b/src/sbml/Event.cpp @@ -1281,7 +1281,7 @@ Event::createObject (XMLInputStream& stream) { mTrigger = new Trigger(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mTrigger = new Trigger(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1310,7 +1310,7 @@ Event::createObject (XMLInputStream& stream) { mDelay = new Delay(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mDelay = new Delay(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1341,7 +1341,7 @@ Event::createObject (XMLInputStream& stream) { mPriority = new Priority(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mPriority = new Priority(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2293,7 +2293,7 @@ ListOfEvents::createObject (XMLInputStream& stream) { object = new Event(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Event(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2324,7 +2324,7 @@ Event_create (unsigned int level, unsigned int version) Event* obj = new Event(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2340,7 +2340,7 @@ Event_createWithNS (SBMLNamespaces_t* sbmlns) Event* obj = new Event(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/EventAssignment.cpp b/src/sbml/EventAssignment.cpp index dcfef78d31..21835f1a10 100644 --- a/src/sbml/EventAssignment.cpp +++ b/src/sbml/EventAssignment.cpp @@ -1212,7 +1212,7 @@ ListOfEventAssignments::createObject (XMLInputStream& stream) { object = new EventAssignment(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new EventAssignment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1243,7 +1243,7 @@ EventAssignment_create (unsigned int level, unsigned int version) EventAssignment* obj = new EventAssignment(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1259,7 +1259,7 @@ EventAssignment_createWithNS (SBMLNamespaces_t* sbmlns) EventAssignment* obj = new EventAssignment(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/FunctionDefinition.cpp b/src/sbml/FunctionDefinition.cpp index 4a4f7ebb00..f155fe023e 100644 --- a/src/sbml/FunctionDefinition.cpp +++ b/src/sbml/FunctionDefinition.cpp @@ -1292,7 +1292,7 @@ ListOfFunctionDefinitions::createObject (XMLInputStream& stream) { object = new FunctionDefinition(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new FunctionDefinition(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1322,7 +1322,7 @@ FunctionDefinition_create (unsigned int level, unsigned int version) FunctionDefinition* obj = new FunctionDefinition(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1338,7 +1338,7 @@ FunctionDefinition_createWithNS (SBMLNamespaces_t* sbmlns) FunctionDefinition* obj = new FunctionDefinition(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/InitialAssignment.cpp b/src/sbml/InitialAssignment.cpp index 6357d532b2..9d4c2bf111 100644 --- a/src/sbml/InitialAssignment.cpp +++ b/src/sbml/InitialAssignment.cpp @@ -1194,7 +1194,7 @@ ListOfInitialAssignments::createObject (XMLInputStream& stream) { object = new InitialAssignment(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new InitialAssignment(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1225,7 +1225,7 @@ InitialAssignment_create (unsigned int level, unsigned int version) InitialAssignment* obj = new InitialAssignment(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1241,7 +1241,7 @@ InitialAssignment_createWithNS (SBMLNamespaces_t* sbmlns) InitialAssignment* obj = new InitialAssignment(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/KineticLaw.cpp b/src/sbml/KineticLaw.cpp index d79fa58888..61f0c9f7fe 100644 --- a/src/sbml/KineticLaw.cpp +++ b/src/sbml/KineticLaw.cpp @@ -2007,7 +2007,7 @@ KineticLaw_create (unsigned int level, unsigned int version) KineticLaw* obj = new KineticLaw(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2023,7 +2023,7 @@ KineticLaw_createWithNS (SBMLNamespaces_t* sbmlns) KineticLaw* obj = new KineticLaw(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/LocalParameter.cpp b/src/sbml/LocalParameter.cpp index db09df4879..fb61f5bbac 100644 --- a/src/sbml/LocalParameter.cpp +++ b/src/sbml/LocalParameter.cpp @@ -752,7 +752,7 @@ ListOfLocalParameters::createObject (XMLInputStream& stream) { object = new LocalParameter(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new LocalParameter(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -782,7 +782,7 @@ LocalParameter_create (unsigned int level, unsigned int version) LocalParameter* obj = new LocalParameter(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -798,7 +798,7 @@ LocalParameter_createWithNS (SBMLNamespaces_t* sbmlns) LocalParameter* obj = new LocalParameter(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Model.cpp b/src/sbml/Model.cpp index f259e9536e..61320577a5 100644 --- a/src/sbml/Model.cpp +++ b/src/sbml/Model.cpp @@ -7104,7 +7104,7 @@ Model_create (unsigned int level, unsigned int version) Model* obj = new Model(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -7120,7 +7120,7 @@ Model_createWithNS (SBMLNamespaces_t* sbmlns) Model* obj = new Model(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/ModifierSpeciesReference.cpp b/src/sbml/ModifierSpeciesReference.cpp index 1187399bf8..c6cc200e24 100644 --- a/src/sbml/ModifierSpeciesReference.cpp +++ b/src/sbml/ModifierSpeciesReference.cpp @@ -397,7 +397,7 @@ ModifierSpeciesReference_create(unsigned int level, unsigned int version) ModifierSpeciesReference* obj = new ModifierSpeciesReference(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -413,7 +413,7 @@ ModifierSpeciesReference_createWithNS (SBMLNamespaces_t* sbmlns) ModifierSpeciesReference* obj = new ModifierSpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Parameter.cpp b/src/sbml/Parameter.cpp index 25b729b485..82aa9877a8 100644 --- a/src/sbml/Parameter.cpp +++ b/src/sbml/Parameter.cpp @@ -1918,7 +1918,7 @@ ListOfParameters::createObject (XMLInputStream& stream) { object = new Parameter(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Parameter(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1948,7 +1948,7 @@ Parameter_create (unsigned int level, unsigned int version) Parameter* obj = new Parameter(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1964,7 +1964,7 @@ Parameter_createWithNS (SBMLNamespaces_t* sbmlns) Parameter* obj = new Parameter(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Priority.cpp b/src/sbml/Priority.cpp index 3bfbdbe14d..02c7b9b28b 100644 --- a/src/sbml/Priority.cpp +++ b/src/sbml/Priority.cpp @@ -703,7 +703,7 @@ Priority_create (unsigned int level, unsigned int version) Priority* obj = new Priority(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -719,7 +719,7 @@ Priority_createWithNS (SBMLNamespaces_t* sbmlns) Priority* obj = new Priority(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/RateRule.cpp b/src/sbml/RateRule.cpp index b802322b14..8cf7e60314 100644 --- a/src/sbml/RateRule.cpp +++ b/src/sbml/RateRule.cpp @@ -449,7 +449,7 @@ RateRule_create(unsigned int level, unsigned int version) RateRule* obj = new RateRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -465,7 +465,7 @@ RateRule_createWithNS (SBMLNamespaces_t* sbmlns) RateRule* obj = new RateRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Reaction.cpp b/src/sbml/Reaction.cpp index a2664f0d4b..8dfcfa4d51 100644 --- a/src/sbml/Reaction.cpp +++ b/src/sbml/Reaction.cpp @@ -1564,7 +1564,7 @@ Reaction::createObject (XMLInputStream& stream) { mKineticLaw = new KineticLaw(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mKineticLaw = new KineticLaw(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2599,7 +2599,7 @@ ListOfReactions::createObject (XMLInputStream& stream) { object = new Reaction(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Reaction(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2630,7 +2630,7 @@ Reaction_create (unsigned int level, unsigned int version) Reaction* obj = new Reaction(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2646,7 +2646,7 @@ Reaction_createWithNS (SBMLNamespaces_t* sbmlns) Reaction* obj = new Reaction(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Rule.cpp b/src/sbml/Rule.cpp index 7fa3135a15..0713f612db 100644 --- a/src/sbml/Rule.cpp +++ b/src/sbml/Rule.cpp @@ -1755,7 +1755,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AlgebraicRule(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new AlgebraicRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1777,7 +1777,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AssignmentRule(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new AssignmentRule(1, 2); } @@ -1792,7 +1792,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new RateRule(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new RateRule(1, 2); } @@ -1832,7 +1832,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new AssignmentRule(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new AssignmentRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1849,7 +1849,7 @@ ListOfRules::createObject (XMLInputStream& stream) { object = new RateRule(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new RateRule(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1880,7 +1880,7 @@ Rule_createAlgebraic (unsigned int level, unsigned int version) AlgebraicRule* obj = new AlgebraicRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1896,7 +1896,7 @@ Rule_createAlgebraicWithNS (SBMLNamespaces_t* sbmlns) AlgebraicRule* obj = new AlgebraicRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1912,7 +1912,7 @@ Rule_createAssignment (unsigned int level, unsigned int version) AssignmentRule* obj = new AssignmentRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1928,7 +1928,7 @@ Rule_createAssignmentWithNS (SBMLNamespaces_t* sbmlns) AssignmentRule* obj = new AssignmentRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1944,7 +1944,7 @@ Rule_createRate (unsigned int level, unsigned int version) RateRule* obj = new RateRule(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1960,7 +1960,7 @@ Rule_createRateWithNS (SBMLNamespaces_t* sbmlns) RateRule* obj = new RateRule(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/SBMLDocument.cpp b/src/sbml/SBMLDocument.cpp index cd6316e75c..02f7aab810 100644 --- a/src/sbml/SBMLDocument.cpp +++ b/src/sbml/SBMLDocument.cpp @@ -633,7 +633,7 @@ SBMLDocument::createModel (const std::string sid) { mModel = new Model(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { /* here we do not create a default object as the level/version must * match the parent object @@ -1307,7 +1307,7 @@ SBMLDocument::createObject (XMLInputStream& stream) { mModel = new Model(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mModel = new Model(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2204,7 +2204,7 @@ SBMLDocument_create () SBMLDocument* obj = new SBMLDocument(); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2220,7 +2220,7 @@ SBMLDocument_createWithLevelAndVersion (unsigned int level, unsigned int version SBMLDocument* obj = new SBMLDocument(level, version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2236,7 +2236,7 @@ SBMLDocument_createWithSBMLNamespaces (SBMLNamespaces_t *sbmlns) SBMLDocument* obj = new SBMLDocument(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Species.cpp b/src/sbml/Species.cpp index d40c9e9054..05d74a69d9 100644 --- a/src/sbml/Species.cpp +++ b/src/sbml/Species.cpp @@ -2545,7 +2545,7 @@ ListOfSpecies::createObject (XMLInputStream& stream) { object = new Species(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Species(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2575,7 +2575,7 @@ Species_create (unsigned int level, unsigned int version) Species* obj = new Species(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2591,7 +2591,7 @@ Species_createWithNS (SBMLNamespaces_t* sbmlns) Species* obj = new Species(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/SpeciesReference.cpp b/src/sbml/SpeciesReference.cpp index 7ad7be5d49..39a9737188 100644 --- a/src/sbml/SpeciesReference.cpp +++ b/src/sbml/SpeciesReference.cpp @@ -539,7 +539,7 @@ SpeciesReference::createStoichiometryMath () { mStoichiometryMath = new StoichiometryMath(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { /* here we do not create a default object as the level/version must * match the parent object @@ -1148,7 +1148,7 @@ SpeciesReference::createObject (XMLInputStream& stream) { mStoichiometryMath = new StoichiometryMath(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { mStoichiometryMath = new StoichiometryMath( SBMLDocument::getDefaultLevel(), @@ -1740,7 +1740,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new SpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new SpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1759,7 +1759,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new SpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new SpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1775,7 +1775,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new ModifierSpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new ModifierSpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1791,7 +1791,7 @@ ListOfSpeciesReferences::createObject (XMLInputStream& stream) { object = new ModifierSpeciesReference(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new ModifierSpeciesReference(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -1818,7 +1818,7 @@ SpeciesReference_create (unsigned int level, unsigned int version) SpeciesReference* obj = new SpeciesReference(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1834,7 +1834,7 @@ SpeciesReference_createWithNS (SBMLNamespaces_t* sbmlns) SpeciesReference* obj = new SpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1850,7 +1850,7 @@ SpeciesReference_createModifier (unsigned int level, unsigned int version) ModifierSpeciesReference* obj = new ModifierSpeciesReference(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -1866,7 +1866,7 @@ SpeciesReference_createModifierWithNS (SBMLNamespaces_t* sbmlns) ModifierSpeciesReference* obj = new ModifierSpeciesReference(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/SpeciesType.cpp b/src/sbml/SpeciesType.cpp index 5e6efd96a4..769f76020d 100644 --- a/src/sbml/SpeciesType.cpp +++ b/src/sbml/SpeciesType.cpp @@ -804,7 +804,7 @@ ListOfSpeciesTypes::createObject (XMLInputStream& stream) { object = new SpeciesType(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { // species type does not exist in L3, hence we fall back object = new SpeciesType(2, @@ -836,7 +836,7 @@ SpeciesType_create (unsigned int level, unsigned int version) SpeciesType* obj = new SpeciesType(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -852,7 +852,7 @@ SpeciesType_createWithNS (SBMLNamespaces_t* sbmlns) SpeciesType* obj = new SpeciesType(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/StoichiometryMath.cpp b/src/sbml/StoichiometryMath.cpp index 52741f81ee..007a6d469b 100644 --- a/src/sbml/StoichiometryMath.cpp +++ b/src/sbml/StoichiometryMath.cpp @@ -644,7 +644,7 @@ StoichiometryMath_create (unsigned int level, unsigned int version) StoichiometryMath* obj = new StoichiometryMath(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -660,7 +660,7 @@ StoichiometryMath_createWithNS (SBMLNamespaces_t* sbmlns) StoichiometryMath* obj = new StoichiometryMath(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Trigger.cpp b/src/sbml/Trigger.cpp index 4ae4726893..3410d8413f 100644 --- a/src/sbml/Trigger.cpp +++ b/src/sbml/Trigger.cpp @@ -979,7 +979,7 @@ Trigger_create (unsigned int level, unsigned int version) Trigger* obj = new Trigger(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -995,7 +995,7 @@ Trigger_createWithNS (SBMLNamespaces_t* sbmlns) Trigger* obj = new Trigger(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/Unit.cpp b/src/sbml/Unit.cpp index de51bb7ffd..e6d2ed3b05 100644 --- a/src/sbml/Unit.cpp +++ b/src/sbml/Unit.cpp @@ -2569,7 +2569,7 @@ ListOfUnits::createObject (XMLInputStream& stream) { object = new Unit(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new Unit(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2599,7 +2599,7 @@ Unit_create (unsigned int level, unsigned int version) Unit* obj = new Unit(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2615,7 +2615,7 @@ Unit_createWithNS (SBMLNamespaces_t* sbmlns) Unit* obj = new Unit(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/UnitDefinition.cpp b/src/sbml/UnitDefinition.cpp index be1fbbaaf1..018e04fb27 100644 --- a/src/sbml/UnitDefinition.cpp +++ b/src/sbml/UnitDefinition.cpp @@ -2310,7 +2310,7 @@ ListOfUnitDefinitions::createObject (XMLInputStream& stream) { object = new UnitDefinition(getSBMLNamespaces()); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new UnitDefinition(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); @@ -2335,7 +2335,7 @@ UnitDefinition_create (unsigned int level, unsigned int version) UnitDefinition* obj = new UnitDefinition(level,version); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } @@ -2351,7 +2351,7 @@ UnitDefinition_createWithNS (SBMLNamespaces_t* sbmlns) UnitDefinition* obj = new UnitDefinition(sbmlns); return obj; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { return NULL; } diff --git a/src/sbml/annotation/test/TestCopyAndClone.cpp b/src/sbml/annotation/test/TestCopyAndClone.cpp index ac836da8c0..114a47ca0f 100644 --- a/src/sbml/annotation/test/TestCopyAndClone.cpp +++ b/src/sbml/annotation/test/TestCopyAndClone.cpp @@ -120,7 +120,7 @@ START_TEST ( test_Date_ConstructorException ) Date * date = new Date(2005, 12, 30, 12, 15, 45, 1, 2, 0); delete date; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -202,7 +202,7 @@ START_TEST ( test_ModelCreator_ConstructorException ) ModelCreator * mc = new ModelCreator(); delete mc; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -329,7 +329,7 @@ START_TEST ( test_ModelHistory_ConstructorException ) ModelHistory * mh = new ModelHistory(); delete mh; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -414,7 +414,7 @@ START_TEST ( test_CVTerm_ConstructorException ) CVTerm * cvterm = new CVTerm(BIOLOGICAL_QUALIFIER); delete cvterm; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } diff --git a/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp b/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp index f060374bc3..044c7bb62f 100644 --- a/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp +++ b/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp @@ -94,7 +94,7 @@ runUnitTest (const TestFile& file) { result = tester.test(file); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { cout << e.getSBMLErrMsg() << endl; result = false; diff --git a/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp b/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp index ce7d769f94..af94d9b7f8 100644 --- a/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp +++ b/src/sbml/packages/multi/extension/MultiListOfReactionsPlugin.cpp @@ -137,7 +137,7 @@ MultiListOfReactionsPlugin::createObject (XMLInputStream& stream) object = new IntraSpeciesReaction(multins); delete multins; } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { object = new IntraSpeciesReaction(SBMLDocument::getDefaultLevel(), SBMLDocument::getDefaultVersion()); diff --git a/src/sbml/test/TestSBMLConstructorException.cpp b/src/sbml/test/TestSBMLConstructorException.cpp index 230338fb53..c3628cd44f 100644 --- a/src/sbml/test/TestSBMLConstructorException.cpp +++ b/src/sbml/test/TestSBMLConstructorException.cpp @@ -117,7 +117,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) Compartment sn24(&SN24); Compartment sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -128,7 +128,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -139,7 +139,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -151,7 +151,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -172,7 +172,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) CompartmentType sn23(&SN23); CompartmentType sn24(&SN24); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -183,7 +183,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -194,7 +194,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -205,7 +205,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(2,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -216,7 +216,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -227,7 +227,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -238,7 +238,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -249,7 +249,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -260,7 +260,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -271,7 +271,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -295,7 +295,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) Constraint sn24(&SN24); Constraint sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -306,7 +306,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -317,7 +317,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -328,7 +328,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(2,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -339,7 +339,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -350,7 +350,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -361,7 +361,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -372,7 +372,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -383,7 +383,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -394,7 +394,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -417,7 +417,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) InitialAssignment sn24(&SN24); InitialAssignment sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -428,7 +428,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -439,7 +439,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -450,7 +450,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(2,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -461,7 +461,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -472,7 +472,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -483,7 +483,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -494,7 +494,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -505,7 +505,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -516,7 +516,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -546,7 +546,7 @@ START_TEST ( test_SBMLConstructorException_Species ) Species sn24(&SN24); Species sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -557,7 +557,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -568,7 +568,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -579,7 +579,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -601,7 +601,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) SpeciesType sn23(&SN23); SpeciesType sn24(&SN24); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -612,7 +612,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -623,7 +623,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -634,7 +634,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(2,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -645,7 +645,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -656,7 +656,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -667,7 +667,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -678,7 +678,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -689,7 +689,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -700,7 +700,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -726,7 +726,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) Delay sn24(&SN24); Delay sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -737,7 +737,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -748,7 +748,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -759,7 +759,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -770,7 +770,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -781,7 +781,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -792,7 +792,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -803,7 +803,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -829,7 +829,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) Trigger sn24(&SN24); Trigger sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -840,7 +840,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -851,7 +851,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -862,7 +862,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -873,7 +873,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -884,7 +884,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -895,7 +895,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -906,7 +906,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -932,7 +932,7 @@ START_TEST ( test_SBMLConstructorException_Event ) Event sn24(&SN24); Event sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -943,7 +943,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -954,7 +954,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -965,7 +965,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -976,7 +976,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -987,7 +987,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -998,7 +998,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1009,7 +1009,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1035,7 +1035,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) EventAssignment sn24(&SN24); EventAssignment sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1046,7 +1046,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1057,7 +1057,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1068,7 +1068,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1079,7 +1079,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1090,7 +1090,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1101,7 +1101,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1112,7 +1112,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1138,7 +1138,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) ModifierSpeciesReference sn24(&SN24); ModifierSpeciesReference sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1149,7 +1149,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1160,7 +1160,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1171,7 +1171,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1182,7 +1182,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1193,7 +1193,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1204,7 +1204,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1215,7 +1215,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1239,7 +1239,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) StoichiometryMath sn23(&SN23); StoichiometryMath sn24(&SN24); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1250,7 +1250,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1261,7 +1261,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1272,7 +1272,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1283,7 +1283,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1294,7 +1294,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1305,7 +1305,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1316,7 +1316,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1346,7 +1346,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) SpeciesReference sn24(&SN24); SpeciesReference sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1357,7 +1357,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1368,7 +1368,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1379,7 +1379,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1405,7 +1405,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) FunctionDefinition sn24(&SN24); FunctionDefinition sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1416,7 +1416,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(1,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1427,7 +1427,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(1,2); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1438,7 +1438,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1449,7 +1449,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN11); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1460,7 +1460,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN12); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1471,7 +1471,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1482,7 +1482,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1512,7 +1512,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) KineticLaw sn24(&SN24); KineticLaw sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1523,7 +1523,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1534,7 +1534,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1545,7 +1545,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1575,7 +1575,7 @@ START_TEST ( test_SBMLConstructorException_Model ) Model sn24(&SN24); Model sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1586,7 +1586,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1597,7 +1597,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1608,7 +1608,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1638,7 +1638,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) Parameter sn24(&SN24); Parameter sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1649,7 +1649,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1660,7 +1660,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1671,7 +1671,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1701,7 +1701,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) Reaction sn24(&SN24); Reaction sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1712,7 +1712,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1723,7 +1723,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1734,7 +1734,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1763,7 +1763,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) Unit sn24(&SN24); Unit sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1774,7 +1774,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1785,7 +1785,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1796,7 +1796,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1826,7 +1826,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) UnitDefinition sn24(&SN24); UnitDefinition sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1837,7 +1837,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1848,7 +1848,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1859,7 +1859,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1888,7 +1888,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) AssignmentRule sn24(&SN24); AssignmentRule sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1899,7 +1899,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1910,7 +1910,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1921,7 +1921,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1950,7 +1950,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) AlgebraicRule sn24(&SN24); AlgebraicRule sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1961,7 +1961,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1972,7 +1972,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -1983,7 +1983,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2013,7 +2013,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) RateRule sn24(&SN24); RateRule sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2024,7 +2024,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2035,7 +2035,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2046,7 +2046,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2063,7 +2063,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2074,7 +2074,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(3,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2085,7 +2085,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2096,7 +2096,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2107,7 +2107,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2118,7 +2118,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2135,7 +2135,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2146,7 +2146,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(3,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2157,7 +2157,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2168,7 +2168,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(&SN21); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2179,7 +2179,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2190,7 +2190,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(0); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2208,7 +2208,7 @@ START_TEST ( test_SBMLConstructorException_SBMLNamespaces ) { SBMLNamespaces sn31(3,1); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2219,7 +2219,7 @@ START_TEST ( test_SBMLConstructorException_SBMLNamespaces ) //{ // SBMLNamespaces s(4,2); //} - //catch (SBMLConstructorException &e) + //catch (SBMLConstructorException &) //{ // msg = e.what(); //} @@ -2249,7 +2249,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) SBMLDocument sn24(&SN24); SBMLDocument sn31(&SN31); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2260,7 +2260,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) { SBMLDocument s(9,9); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } @@ -2271,7 +2271,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) { SBMLDocument s(&SN99); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { msg = e.what(); } diff --git a/src/sbml/validator/test/TestConsistencyValidator.cpp b/src/sbml/validator/test/TestConsistencyValidator.cpp index 41a621479e..b5e669170d 100644 --- a/src/sbml/validator/test/TestConsistencyValidator.cpp +++ b/src/sbml/validator/test/TestConsistencyValidator.cpp @@ -159,7 +159,7 @@ runUnitTest (const TestFile& file) { result = tester.test(file); } - catch (SBMLConstructorException &e) + catch (SBMLConstructorException &) { cout << e.getSBMLErrMsg() << endl; result = false; From c0fb35221b12d41c33dded612a83d2a1286040cc Mon Sep 17 00:00:00 2001 From: Sarah Date: Wed, 24 May 2023 10:02:10 +0100 Subject: [PATCH 9/9] put back &e in places where we use it --- src/sbml/annotation/test/TestCopyAndClone.cpp | 8 +- .../test/TestL3v2MathConsistencyValidator.cpp | 2 +- .../test/TestSBMLConstructorException.cpp | 322 +++++++++--------- .../test/TestConsistencyValidator.cpp | 2 +- 4 files changed, 167 insertions(+), 167 deletions(-) diff --git a/src/sbml/annotation/test/TestCopyAndClone.cpp b/src/sbml/annotation/test/TestCopyAndClone.cpp index 114a47ca0f..ac836da8c0 100644 --- a/src/sbml/annotation/test/TestCopyAndClone.cpp +++ b/src/sbml/annotation/test/TestCopyAndClone.cpp @@ -120,7 +120,7 @@ START_TEST ( test_Date_ConstructorException ) Date * date = new Date(2005, 12, 30, 12, 15, 45, 1, 2, 0); delete date; } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -202,7 +202,7 @@ START_TEST ( test_ModelCreator_ConstructorException ) ModelCreator * mc = new ModelCreator(); delete mc; } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -329,7 +329,7 @@ START_TEST ( test_ModelHistory_ConstructorException ) ModelHistory * mh = new ModelHistory(); delete mh; } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -414,7 +414,7 @@ START_TEST ( test_CVTerm_ConstructorException ) CVTerm * cvterm = new CVTerm(BIOLOGICAL_QUALIFIER); delete cvterm; } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } diff --git a/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp b/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp index 044c7bb62f..f060374bc3 100644 --- a/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp +++ b/src/sbml/packages/l3v2extendedmath/validator/test/TestL3v2MathConsistencyValidator.cpp @@ -94,7 +94,7 @@ runUnitTest (const TestFile& file) { result = tester.test(file); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { cout << e.getSBMLErrMsg() << endl; result = false; diff --git a/src/sbml/test/TestSBMLConstructorException.cpp b/src/sbml/test/TestSBMLConstructorException.cpp index c3628cd44f..230338fb53 100644 --- a/src/sbml/test/TestSBMLConstructorException.cpp +++ b/src/sbml/test/TestSBMLConstructorException.cpp @@ -117,7 +117,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) Compartment sn24(&SN24); Compartment sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -128,7 +128,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -139,7 +139,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -151,7 +151,7 @@ START_TEST ( test_SBMLConstructorException_Compartment ) { Compartment s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -172,7 +172,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) CompartmentType sn23(&SN23); CompartmentType sn24(&SN24); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -183,7 +183,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -194,7 +194,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -205,7 +205,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(2,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -216,7 +216,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -227,7 +227,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -238,7 +238,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -249,7 +249,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -260,7 +260,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -271,7 +271,7 @@ START_TEST ( test_SBMLConstructorException_CompartmentType ) { CompartmentType s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -295,7 +295,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) Constraint sn24(&SN24); Constraint sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -306,7 +306,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -317,7 +317,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -328,7 +328,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(2,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -339,7 +339,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -350,7 +350,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -361,7 +361,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -372,7 +372,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -383,7 +383,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -394,7 +394,7 @@ START_TEST ( test_SBMLConstructorException_Constraint ) { Constraint s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -417,7 +417,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) InitialAssignment sn24(&SN24); InitialAssignment sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -428,7 +428,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -439,7 +439,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -450,7 +450,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(2,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -461,7 +461,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -472,7 +472,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -483,7 +483,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -494,7 +494,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -505,7 +505,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -516,7 +516,7 @@ START_TEST ( test_SBMLConstructorException_InitialAssignment ) { InitialAssignment s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -546,7 +546,7 @@ START_TEST ( test_SBMLConstructorException_Species ) Species sn24(&SN24); Species sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -557,7 +557,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -568,7 +568,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -579,7 +579,7 @@ START_TEST ( test_SBMLConstructorException_Species ) { Species s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -601,7 +601,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) SpeciesType sn23(&SN23); SpeciesType sn24(&SN24); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -612,7 +612,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -623,7 +623,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -634,7 +634,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(2,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -645,7 +645,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -656,7 +656,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -667,7 +667,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -678,7 +678,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -689,7 +689,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -700,7 +700,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesType ) { SpeciesType s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -726,7 +726,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) Delay sn24(&SN24); Delay sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -737,7 +737,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -748,7 +748,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -759,7 +759,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -770,7 +770,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -781,7 +781,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -792,7 +792,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -803,7 +803,7 @@ START_TEST ( test_SBMLConstructorException_Delay ) { Delay s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -829,7 +829,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) Trigger sn24(&SN24); Trigger sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -840,7 +840,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -851,7 +851,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -862,7 +862,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -873,7 +873,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -884,7 +884,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -895,7 +895,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -906,7 +906,7 @@ START_TEST ( test_SBMLConstructorException_Trigger ) { Trigger s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -932,7 +932,7 @@ START_TEST ( test_SBMLConstructorException_Event ) Event sn24(&SN24); Event sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -943,7 +943,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -954,7 +954,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -965,7 +965,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -976,7 +976,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -987,7 +987,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -998,7 +998,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1009,7 +1009,7 @@ START_TEST ( test_SBMLConstructorException_Event ) { Event s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1035,7 +1035,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) EventAssignment sn24(&SN24); EventAssignment sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1046,7 +1046,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1057,7 +1057,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1068,7 +1068,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1079,7 +1079,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1090,7 +1090,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1101,7 +1101,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1112,7 +1112,7 @@ START_TEST ( test_SBMLConstructorException_EventAssignment ) { EventAssignment s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1138,7 +1138,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) ModifierSpeciesReference sn24(&SN24); ModifierSpeciesReference sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1149,7 +1149,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1160,7 +1160,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1171,7 +1171,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1182,7 +1182,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1193,7 +1193,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1204,7 +1204,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1215,7 +1215,7 @@ START_TEST ( test_SBMLConstructorException_ModifierSpeciesReference ) { ModifierSpeciesReference s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1239,7 +1239,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) StoichiometryMath sn23(&SN23); StoichiometryMath sn24(&SN24); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1250,7 +1250,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1261,7 +1261,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1272,7 +1272,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1283,7 +1283,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1294,7 +1294,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1305,7 +1305,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1316,7 +1316,7 @@ START_TEST ( test_SBMLConstructorException_StoichiometryMath ) { StoichiometryMath s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1346,7 +1346,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) SpeciesReference sn24(&SN24); SpeciesReference sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1357,7 +1357,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1368,7 +1368,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1379,7 +1379,7 @@ START_TEST ( test_SBMLConstructorException_SpeciesReference ) { SpeciesReference s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1405,7 +1405,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) FunctionDefinition sn24(&SN24); FunctionDefinition sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1416,7 +1416,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(1,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1427,7 +1427,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(1,2); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1438,7 +1438,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1449,7 +1449,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN11); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1460,7 +1460,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN12); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1471,7 +1471,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1482,7 +1482,7 @@ START_TEST ( test_SBMLConstructorException_FunctionDefinition ) { FunctionDefinition s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1512,7 +1512,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) KineticLaw sn24(&SN24); KineticLaw sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1523,7 +1523,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1534,7 +1534,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1545,7 +1545,7 @@ START_TEST ( test_SBMLConstructorException_KineticLaw ) { KineticLaw s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1575,7 +1575,7 @@ START_TEST ( test_SBMLConstructorException_Model ) Model sn24(&SN24); Model sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1586,7 +1586,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1597,7 +1597,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1608,7 +1608,7 @@ START_TEST ( test_SBMLConstructorException_Model ) { Model s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1638,7 +1638,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) Parameter sn24(&SN24); Parameter sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1649,7 +1649,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1660,7 +1660,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1671,7 +1671,7 @@ START_TEST ( test_SBMLConstructorException_Parameter ) { Parameter s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1701,7 +1701,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) Reaction sn24(&SN24); Reaction sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1712,7 +1712,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1723,7 +1723,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1734,7 +1734,7 @@ START_TEST ( test_SBMLConstructorException_Reaction ) { Reaction s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1763,7 +1763,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) Unit sn24(&SN24); Unit sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1774,7 +1774,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1785,7 +1785,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1796,7 +1796,7 @@ START_TEST ( test_SBMLConstructorException_Unit ) { Unit s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1826,7 +1826,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) UnitDefinition sn24(&SN24); UnitDefinition sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1837,7 +1837,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1848,7 +1848,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1859,7 +1859,7 @@ START_TEST ( test_SBMLConstructorException_UnitDefinition ) { UnitDefinition s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1888,7 +1888,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) AssignmentRule sn24(&SN24); AssignmentRule sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1899,7 +1899,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1910,7 +1910,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1921,7 +1921,7 @@ START_TEST ( test_SBMLConstructorException_AssignmentRule ) { AssignmentRule s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1950,7 +1950,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) AlgebraicRule sn24(&SN24); AlgebraicRule sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1961,7 +1961,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1972,7 +1972,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -1983,7 +1983,7 @@ START_TEST ( test_SBMLConstructorException_AlgebraicRule ) { AlgebraicRule s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2013,7 +2013,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) RateRule sn24(&SN24); RateRule sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2024,7 +2024,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2035,7 +2035,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2046,7 +2046,7 @@ START_TEST ( test_SBMLConstructorException_RateRule ) { RateRule s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2063,7 +2063,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2074,7 +2074,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(3,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2085,7 +2085,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2096,7 +2096,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2107,7 +2107,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2118,7 +2118,7 @@ START_TEST ( test_SBMLConstructorException_Priority ) { Priority s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2135,7 +2135,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2146,7 +2146,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(3,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2157,7 +2157,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2168,7 +2168,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(&SN21); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2179,7 +2179,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2190,7 +2190,7 @@ START_TEST ( test_SBMLConstructorException_LocalParameter ) { LocalParameter s(0); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2208,7 +2208,7 @@ START_TEST ( test_SBMLConstructorException_SBMLNamespaces ) { SBMLNamespaces sn31(3,1); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2219,7 +2219,7 @@ START_TEST ( test_SBMLConstructorException_SBMLNamespaces ) //{ // SBMLNamespaces s(4,2); //} - //catch (SBMLConstructorException &) + //catch (SBMLConstructorException &e) //{ // msg = e.what(); //} @@ -2249,7 +2249,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) SBMLDocument sn24(&SN24); SBMLDocument sn31(&SN31); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2260,7 +2260,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) { SBMLDocument s(9,9); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } @@ -2271,7 +2271,7 @@ START_TEST ( test_SBMLConstructorException_SBMLDocument ) { SBMLDocument s(&SN99); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { msg = e.what(); } diff --git a/src/sbml/validator/test/TestConsistencyValidator.cpp b/src/sbml/validator/test/TestConsistencyValidator.cpp index b5e669170d..41a621479e 100644 --- a/src/sbml/validator/test/TestConsistencyValidator.cpp +++ b/src/sbml/validator/test/TestConsistencyValidator.cpp @@ -159,7 +159,7 @@ runUnitTest (const TestFile& file) { result = tester.test(file); } - catch (SBMLConstructorException &) + catch (SBMLConstructorException &e) { cout << e.getSBMLErrMsg() << endl; result = false;