diff --git a/.benchmark-signature b/.benchmark-signature index e99eeaf570..73dfeb6271 100644 --- a/.benchmark-signature +++ b/.benchmark-signature @@ -1 +1 @@ -81ed0ca0949fbf6f613a627b76ff8d6320c25377 +dd6176ec1d007b675bcb4cbf88202e3fe5318817 diff --git a/source/external/cxxtest/cxxtestgen.py b/source/external/cxxtest/cxxtestgen.py index 228dfc60eb..af795d78b3 100755 --- a/source/external/cxxtest/cxxtestgen.py +++ b/source/external/cxxtest/cxxtestgen.py @@ -426,7 +426,8 @@ def writePreamble( output ): output.write( "#include \n" % gui ) output.write( "\n" ) output.write( "//catch unhandled exceptions in unit tests\n" ) - output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) wrotePreamble = 1 def writeMain( output ): @@ -459,7 +460,7 @@ def writeMain( output ): output.write( ' CxxTest::initialize();\n' ) output.write( ' try{\n' ) output.write( ' return CxxTest::%s().run();\n' % runner ) - output.write( ' } catch( utility::excn::EXCN_Base& excn ) {\n' ) + output.write( ' } catch( utility::excn::Exception& excn ) {\n' ) output.write( ' std::cerr\n' ) output.write( ' << "ERROR: Unhandled Exception caught by cxxtest: "\n' ) output.write( ' << excn << std::endl;\n' ) diff --git a/source/src/apps/benchmark/performance/ScoreEach.bench.hh b/source/src/apps/benchmark/performance/ScoreEach.bench.hh index 37f6bb25b7..ddd6a3b376 100644 --- a/source/src/apps/benchmark/performance/ScoreEach.bench.hh +++ b/source/src/apps/benchmark/performance/ScoreEach.bench.hh @@ -79,7 +79,7 @@ public: core::scoring::methods::EnergyMethodOptions opts; try { enmeth_ = core::scoring::ScoringManager::get_instance()->energy_method( score_type_, opts ); - } catch (utility::excn::EXCN_Base& excn){ + } catch (utility::excn::Exception& excn){ TR.Error << "Unable to Test scoring with score type '" << core::scoring::ScoreTypeManager::name_from_score_type(score_type_) @@ -100,7 +100,7 @@ public: << "' gives zero energy with test structure. Timing values may not be informative." << std::endl; } setup_successful_ = true; - } catch (utility::excn::EXCN_Base& excn){ + } catch (utility::excn::Exception& excn){ TR.Error << "Unable to Test scoring with score type '" << core::scoring::ScoreTypeManager::name_from_score_type(score_type_) @@ -137,7 +137,7 @@ public: pose_->energies().clear(); scorefxn.set_weight(score_type_, 0); } - } catch (utility::excn::EXCN_Base& excn){ + } catch (utility::excn::Exception& excn){ TR.Error << "Unable to Test scoring with score type '" << core::scoring::ScoreTypeManager::name_from_score_type(score_type_) diff --git a/source/src/apps/benchmark/performance/performance_benchmark.cc b/source/src/apps/benchmark/performance/performance_benchmark.cc index a0f3b72c7b..60a5e71280 100644 --- a/source/src/apps/benchmark/performance/performance_benchmark.cc +++ b/source/src/apps/benchmark/performance/performance_benchmark.cc @@ -438,7 +438,7 @@ int main( int argc, char *argv[]) // Do not adjust this line without altering the daemon code because it will look for it as signal of normal ending! TR << "Performance Benchmark ended. --------------------------------" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/benchmark/scientific/ddg_benchmark.cc b/source/src/apps/benchmark/scientific/ddg_benchmark.cc index 1a46f75070..cc757b57b5 100644 --- a/source/src/apps/benchmark/scientific/ddg_benchmark.cc +++ b/source/src/apps/benchmark/scientific/ddg_benchmark.cc @@ -680,7 +680,7 @@ main( int argc, char * argv [] ) correlation(ddg_out); exit(0); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/benchmark/scientific/design_contrast_and_statistic.cc b/source/src/apps/benchmark/scientific/design_contrast_and_statistic.cc index 116ac433c1..2f66d40a68 100644 --- a/source/src/apps/benchmark/scientific/design_contrast_and_statistic.cc +++ b/source/src/apps/benchmark/scientific/design_contrast_and_statistic.cc @@ -339,7 +339,7 @@ int main( int argc, char * argv [] ) statistics(sqc_file); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/benchmark/scientific/rotamer_recovery.cc b/source/src/apps/benchmark/scientific/rotamer_recovery.cc index e5141fffc5..8670038c3f 100644 --- a/source/src/apps/benchmark/scientific/rotamer_recovery.cc +++ b/source/src/apps/benchmark/scientific/rotamer_recovery.cc @@ -32,7 +32,7 @@ #include // Utility Headers -#include +#include #include #include #include @@ -59,7 +59,7 @@ using protocols::rotamer_recovery::RotamerRecoveryFactory; using protocols::rotamer_recovery::RotamerRecoveryMover; using protocols::rotamer_recovery::RotamerRecoveryMoverOP; using protocols::jd2::JobDistributor; -using utility::excn::EXCN_Base; +using utility::excn::Exception; static Tracer TR("apps.benchmark.scientific.rotamer_recovery"); @@ -136,7 +136,7 @@ main( int argc, char * argv [] ) rotamer_recovery_mover->show( fout ); fout.close(); } - } catch (EXCN_Base & excn ) { + } catch (Exception & excn ) { TR.Error << "Exception: " << endl; excn.show( TR.Error ); @@ -144,7 +144,7 @@ main( int argc, char * argv [] ) excn.show( TR ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/amelie/design_tight_clusters.cc b/source/src/apps/pilot/amelie/design_tight_clusters.cc index a0c194b29d..45261567f7 100644 --- a/source/src/apps/pilot/amelie/design_tight_clusters.cc +++ b/source/src/apps/pilot/amelie/design_tight_clusters.cc @@ -754,7 +754,7 @@ int main( int argc, char * argv [] ) //score_fxn->show(TR, p); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/amelie/detect_tight_clusters.cc b/source/src/apps/pilot/amelie/detect_tight_clusters.cc index 10e2010e16..bc637f67da 100644 --- a/source/src/apps/pilot/amelie/detect_tight_clusters.cc +++ b/source/src/apps/pilot/amelie/detect_tight_clusters.cc @@ -1163,7 +1163,7 @@ int main( int argc, char * argv [] ) //score_fxn->show(TR, p); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andre/SymmDataTest.cc b/source/src/apps/pilot/andre/SymmDataTest.cc index bef9f63b10..46a1676fb3 100644 --- a/source/src/apps/pilot/andre/SymmDataTest.cc +++ b/source/src/apps/pilot/andre/SymmDataTest.cc @@ -181,7 +181,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/analyze_rtmin_failures.cc b/source/src/apps/pilot/andrew/analyze_rtmin_failures.cc index a468ad28b7..e7ce530d4c 100644 --- a/source/src/apps/pilot/andrew/analyze_rtmin_failures.cc +++ b/source/src/apps/pilot/andrew/analyze_rtmin_failures.cc @@ -190,7 +190,7 @@ int main( int argc, char * argv [] ) (*sfxn)(pose); pose.dump_pdb( "rtmin_failure_best_nonnative_rotamer.pdb" ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/apl_msd.cc b/source/src/apps/pilot/andrew/apl_msd.cc index 86384b5447..177667550e 100644 --- a/source/src/apps/pilot/andrew/apl_msd.cc +++ b/source/src/apps/pilot/andrew/apl_msd.cc @@ -164,7 +164,7 @@ int main( int argc, char ** argv ) break; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/domain_assembly_jd2.cc b/source/src/apps/pilot/andrew/domain_assembly_jd2.cc index cf0dccfc57..cdf2781bc9 100644 --- a/source/src/apps/pilot/andrew/domain_assembly_jd2.cc +++ b/source/src/apps/pilot/andrew/domain_assembly_jd2.cc @@ -35,7 +35,7 @@ int main( int argc, char * argv [] ) // GO! protocols::jd2::JobDistributor::get_instance()->go( mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/find_buns.cc b/source/src/apps/pilot/andrew/find_buns.cc index d340d85767..4a41cf3913 100644 --- a/source/src/apps/pilot/andrew/find_buns.cc +++ b/source/src/apps/pilot/andrew/find_buns.cc @@ -208,7 +208,7 @@ int main( int argc, char * argv [] ) std::string outname = inputname.base(); write_buns_and_dots_kinemage( outname + "_buried_unsats.kin", outname, pose, rotamer_dots, buns ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/fixbb_jd3.cc b/source/src/apps/pilot/andrew/fixbb_jd3.cc index fa2ad6728f..e8be09f4b8 100644 --- a/source/src/apps/pilot/andrew/fixbb_jd3.cc +++ b/source/src/apps/pilot/andrew/fixbb_jd3.cc @@ -342,7 +342,7 @@ main( int argc, char * argv [] ) protocols::jd3::JobQueenOP queen( new FixbbJobQueen ); //std::cout << "Fixbb job definition file\n" << queen->job_definition_xsd() << std::endl; jd->go( queen ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/flex_regions_alc.cc b/source/src/apps/pilot/andrew/flex_regions_alc.cc index d2fac0823b..1e401acabe 100644 --- a/source/src/apps/pilot/andrew/flex_regions_alc.cc +++ b/source/src/apps/pilot/andrew/flex_regions_alc.cc @@ -82,7 +82,7 @@ int main( int argc, char * argv [] ) ++ii; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/interface_ddg_bind.cc b/source/src/apps/pilot/andrew/interface_ddg_bind.cc index 31a1301cd0..573cda75db 100644 --- a/source/src/apps/pilot/andrew/interface_ddg_bind.cc +++ b/source/src/apps/pilot/andrew/interface_ddg_bind.cc @@ -485,7 +485,7 @@ InterfaceDDGBindJobInputter::fill_jobs( protocols::jd2::JobsContainer & jobs ) utility::io::izstream ddg_jobs( jobfname ); if ( ! ddg_jobs.good() ) { // could not open jobs file - throw utility::excn::EXCN_Msg_Exception( "Could not open interface ddg jobs file: '" + jobfname ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not open interface ddg jobs file: '" + jobfname ); } typedef std::pair< std::string, std::string > PDBAndSeqposPair; @@ -504,34 +504,34 @@ InterfaceDDGBindJobInputter::fill_jobs( protocols::jd2::JobsContainer & jobs ) sstream >> pdb; if ( ! sstream.good() ) { // throw an exception - throw utility::excn::EXCN_Msg_Exception( "Problem reading '" + jobfname + "' on line " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Problem reading '" + jobfname + "' on line " + utility::to_string( count_line ) + ", which reads:\n" + line ); } sstream >> chain; if ( ! sstream.good() ) { // throw an exception - throw utility::excn::EXCN_Msg_Exception( "Problem reading '" + jobfname + "' on line " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Problem reading '" + jobfname + "' on line " + utility::to_string( count_line ) + ", which reads:\n" + line ); } if ( chain.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a chain identifier (or an underscore) " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a chain identifier (or an underscore) " "after reading the pdb name in file '" + jobfname + "' on line " + utility::to_string( count_line ) + ", which reads:\n" + line ); } sstream >> resstring; if ( ! sstream.good() ) { // throw an exception - throw utility::excn::EXCN_Msg_Exception( "Problem reading '" + jobfname + "' on line " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Problem reading '" + jobfname + "' on line " + utility::to_string( count_line ) + ", which reads:\n" + line ); } sstream >> newaa; if ( ! sstream.good() ) { // throw an exception - throw utility::excn::EXCN_Msg_Exception( "Problem reading '" + jobfname + "' on line " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Problem reading '" + jobfname + "' on line " + utility::to_string( count_line ) + ", which reads:\n" + line ); } if ( ! core::chemical::oneletter_code_specifies_aa( newaa ) ) { - throw utility::excn::EXCN_Msg_Exception( "Could not interpret the input character '" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not interpret the input character '" + utility::to_string( newaa ) + "' as an amino acid 1-letter code.\n" + "Problem encountered on line " + utility::to_string( count_line ) + " of file " + jobfname + " which reads " + line ); } @@ -546,8 +546,8 @@ InterfaceDDGBindJobInputter::fill_jobs( protocols::jd2::JobsContainer & jobs ) int resid; char insertion_code; try { core::pose::parse_PDBnum_icode( resstring, jobfname, count_line, resid, insertion_code ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not interpret the string '" + resstring + "' as a residue identifier\n" + e.msg() ); + } catch (utility::excn::Exception e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not interpret the string '" + resstring + "' as a residue identifier\n" + e.msg() ); } input_mutation mutation; mutation.resind = core::pose::ResidueIndexDescriptionFromFileOP( @@ -568,7 +568,7 @@ InterfaceDDGBindJobInputter::fill_jobs( protocols::jd2::JobsContainer & jobs ) } else { std::string existing_pdb = base_names[ iibase ]; if ( existing_pdb != iipdb ) { - throw utility::excn::EXCN_Msg_Exception( "Two different PDBs, '" + existing_pdb + "' and '" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Two different PDBs, '" + existing_pdb + "' and '" + iipdb + " have the same base name, '" + iibase + "' and so the output structure names will collide." + "\nPlease rename one of them." ); } @@ -610,7 +610,7 @@ InterfaceDDGBindJobInputter::fill_jobs( protocols::jd2::JobsContainer & jobs ) } } } else { - utility::excn::EXCN_Msg_Exception( "InterfaceDDGJobInputter requires the interface_ddg::jobs flag" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "InterfaceDDGJobInputter requires the interface_ddg::jobs flag" ); } for ( std::list< InterfaceDDGBindInnerJobOP >::const_iterator @@ -752,7 +752,7 @@ int main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( iddgm, protocols::jd2::JobInputterOP( new InterfaceDDGBindJobInputter )); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/kellogg_ddg_jd3.cc b/source/src/apps/pilot/andrew/kellogg_ddg_jd3.cc index 99fabf15e4..a3a821a063 100644 --- a/source/src/apps/pilot/andrew/kellogg_ddg_jd3.cc +++ b/source/src/apps/pilot/andrew/kellogg_ddg_jd3.cc @@ -337,7 +337,7 @@ main( int argc, char * argv [] ) protocols::jd3::JobQueenOP queen( new FixbbJobQueen ); //std::cout << "Fixbb job definition file\n" << queen->job_definition_xsd() << std::endl; jd->go( queen ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/measure_catalytic_geometry.cc b/source/src/apps/pilot/andrew/measure_catalytic_geometry.cc index 373790b4ca..64f83ec9dd 100644 --- a/source/src/apps/pilot/andrew/measure_catalytic_geometry.cc +++ b/source/src/apps/pilot/andrew/measure_catalytic_geometry.cc @@ -173,7 +173,7 @@ int main( int argc, char * argv [] ) std::cout << "ANG U1D2 " << numeric::constants::d::radians_to_degrees * numeric::angle_radians( vu1, vd1, vd2 ) << std::endl; std::cout << "DIS U1D1 " << vu1.distance( vd1 ) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/measure_lcaa_neighbor_radii.cc b/source/src/apps/pilot/andrew/measure_lcaa_neighbor_radii.cc index 867d8c7a26..b482b9552a 100644 --- a/source/src/apps/pilot/andrew/measure_lcaa_neighbor_radii.cc +++ b/source/src/apps/pilot/andrew/measure_lcaa_neighbor_radii.cc @@ -106,7 +106,7 @@ int main( int argc, char * argv [] ) } std::cout << "Max D for " << iirot->name() << " " << std::sqrt(maxd2) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/mmt_msd.cc b/source/src/apps/pilot/andrew/mmt_msd.cc index 29ed59c39d..cde447590b 100644 --- a/source/src/apps/pilot/andrew/mmt_msd.cc +++ b/source/src/apps/pilot/andrew/mmt_msd.cc @@ -424,7 +424,7 @@ int main( int argc, char ** argv ) mmt_receiver.main_optimization_loop(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/mpi_msd.cc b/source/src/apps/pilot/andrew/mpi_msd.cc index 94c75f5bd2..80e182912e 100644 --- a/source/src/apps/pilot/andrew/mpi_msd.cc +++ b/source/src/apps/pilot/andrew/mpi_msd.cc @@ -207,7 +207,7 @@ int main( int argc, char ** argv ) utility::io::izstream daf_file( daf_filename ); try { daf->initialize_from_input_file( ds, daf_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Caught exception" << std::endl; std::cerr << e.msg() << std::endl; exit(1); @@ -324,7 +324,7 @@ int main( int argc, char ** argv ) MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/mpi_test.cc b/source/src/apps/pilot/andrew/mpi_test.cc index 3ee656210a..3cdf793804 100644 --- a/source/src/apps/pilot/andrew/mpi_test.cc +++ b/source/src/apps/pilot/andrew/mpi_test.cc @@ -65,7 +65,7 @@ int main( int argc, char ** argv ) TR << "Node " << mpi_rank() << " recieved a single double " << receive_double_from_node( 0 ) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/relax_jd3.cc b/source/src/apps/pilot/andrew/relax_jd3.cc index c9e7b02654..1e208bb007 100644 --- a/source/src/apps/pilot/andrew/relax_jd3.cc +++ b/source/src/apps/pilot/andrew/relax_jd3.cc @@ -253,7 +253,7 @@ main( int argc, char * argv [] ) protocols::jd3::JobQueenOP queen( new RelaxJobQueen ); //std::cout << "Fixbb job definition file\n" << queen->job_definition_xsd() << std::endl; jd->go( queen ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/sweep_respair_energies.cc b/source/src/apps/pilot/andrew/sweep_respair_energies.cc index 63d697acbc..0fbf484d86 100644 --- a/source/src/apps/pilot/andrew/sweep_respair_energies.cc +++ b/source/src/apps/pilot/andrew/sweep_respair_energies.cc @@ -1476,7 +1476,7 @@ int main( int argc, char * argv [] ) db_session->commit(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/version_scorefunction.cc b/source/src/apps/pilot/andrew/version_scorefunction.cc index 1d1906860f..c8aeae8273 100644 --- a/source/src/apps/pilot/andrew/version_scorefunction.cc +++ b/source/src/apps/pilot/andrew/version_scorefunction.cc @@ -248,7 +248,7 @@ int main( int argc, char ** argv ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/andrew/zn_match_symmdock.cc b/source/src/apps/pilot/andrew/zn_match_symmdock.cc index ad93cfb051..e26a0f2e85 100644 --- a/source/src/apps/pilot/andrew/zn_match_symmdock.cc +++ b/source/src/apps/pilot/andrew/zn_match_symmdock.cc @@ -226,7 +226,7 @@ int main( int argc, char * argv [] ) // GO! protocols::jd2::JobDistributor::get_instance()->go( seq_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/aroop/model_e2c_ubiquitin.cc b/source/src/apps/pilot/aroop/model_e2c_ubiquitin.cc index d02dc63f7a..2b5402fea2 100644 --- a/source/src/apps/pilot/aroop/model_e2c_ubiquitin.cc +++ b/source/src/apps/pilot/aroop/model_e2c_ubiquitin.cc @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) MoverOP e2ubdock = new ub_e2c::ubi_e2c_modeler(); protocols::jobdist::main_plain_mover( *e2ubdock ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/arubenstein/sequence_tolerance_mf.cc b/source/src/apps/pilot/arubenstein/sequence_tolerance_mf.cc index 4e6cc5d023..1466f994d5 100644 --- a/source/src/apps/pilot/arubenstein/sequence_tolerance_mf.cc +++ b/source/src/apps/pilot/arubenstein/sequence_tolerance_mf.cc @@ -140,7 +140,7 @@ main( int argc, char * argv[] ) NEW_OPT(seq_tol::surface, "calculate the the surface score", false); devel::init( argc, argv ); protocols::viewer::viewer_main( sequence_tolerance_mf_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } return 0; diff --git a/source/src/apps/pilot/ashworth/MSA_design.cc b/source/src/apps/pilot/ashworth/MSA_design.cc index 6580ed604b..c25c1be109 100644 --- a/source/src/apps/pilot/ashworth/MSA_design.cc +++ b/source/src/apps/pilot/ashworth/MSA_design.cc @@ -202,7 +202,7 @@ main( int argc, char * argv[] ) devel::init( argc, argv ); protocols::viewer::viewer_main( MSA_design_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ashworth/jd2_parser_DNAInt.cc b/source/src/apps/pilot/ashworth/jd2_parser_DNAInt.cc index c00d069e6c..c0ab02a951 100644 --- a/source/src/apps/pilot/ashworth/jd2_parser_DNAInt.cc +++ b/source/src/apps/pilot/ashworth/jd2_parser_DNAInt.cc @@ -72,7 +72,7 @@ main( int argc, char * argv [] ) try { devel::init( argc, argv ); viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ashworth/multistate_design_ga.cc b/source/src/apps/pilot/ashworth/multistate_design_ga.cc index 7e8e3f8434..5f8ef8141f 100644 --- a/source/src/apps/pilot/ashworth/multistate_design_ga.cc +++ b/source/src/apps/pilot/ashworth/multistate_design_ga.cc @@ -376,7 +376,7 @@ main( int argc, char * argv[] ) using namespace basic::options::OptionKeys; devel::init( argc, argv ); protocols::viewer::viewer_main( ga_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/a3b_hbs_creator.cc b/source/src/apps/pilot/awatkins/a3b_hbs_creator.cc index 51f83ab1b4..fb48227c7d 100644 --- a/source/src/apps/pilot/awatkins/a3b_hbs_creator.cc +++ b/source/src/apps/pilot/awatkins/a3b_hbs_creator.cc @@ -583,7 +583,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( HC_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/a3b_hbs_dock_design.cc b/source/src/apps/pilot/awatkins/a3b_hbs_dock_design.cc index 2eaa622c48..5999b61460 100644 --- a/source/src/apps/pilot/awatkins/a3b_hbs_dock_design.cc +++ b/source/src/apps/pilot/awatkins/a3b_hbs_dock_design.cc @@ -236,7 +236,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( a3b_hddm_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/a3b_test.cc b/source/src/apps/pilot/awatkins/a3b_test.cc index 9a5b7d3030..43313b0cad 100644 --- a/source/src/apps/pilot/awatkins/a3b_test.cc +++ b/source/src/apps/pilot/awatkins/a3b_test.cc @@ -186,7 +186,7 @@ int main ( int argc, char* argv[] ) fn << "B3A_best_" << j << ".pdb"; best_pose.dump_pdb( fn.str() ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/b3a_distro_kinemage.cc b/source/src/apps/pilot/awatkins/b3a_distro_kinemage.cc index 02099c700c..9126a0cf58 100644 --- a/source/src/apps/pilot/awatkins/b3a_distro_kinemage.cc +++ b/source/src/apps/pilot/awatkins/b3a_distro_kinemage.cc @@ -260,7 +260,7 @@ main( int argc, char* argv[] ) } //call job distributor - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/best_beta_backbones.cc b/source/src/apps/pilot/awatkins/best_beta_backbones.cc index 62135ae1b1..85415c4025 100644 --- a/source/src/apps/pilot/awatkins/best_beta_backbones.cc +++ b/source/src/apps/pilot/awatkins/best_beta_backbones.cc @@ -362,7 +362,7 @@ main( int argc, char* argv[] ) devel::init(argc, argv); report_proportions_accessible( option[ bump_frac ].value() ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/beta_314_vs_a3b.cc b/source/src/apps/pilot/awatkins/beta_314_vs_a3b.cc index 7024f91f85..f3494fc67a 100644 --- a/source/src/apps/pilot/awatkins/beta_314_vs_a3b.cc +++ b/source/src/apps/pilot/awatkins/beta_314_vs_a3b.cc @@ -195,7 +195,7 @@ main( int argc, char* argv[] ) a3bpose.dump_pdb( "a3b_a_gp.pdb" ); b314pose.dump_pdb( "b314_a_gp.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/beta_nonlocal.cc b/source/src/apps/pilot/awatkins/beta_nonlocal.cc index 3b684f9085..fe290d12aa 100644 --- a/source/src/apps/pilot/awatkins/beta_nonlocal.cc +++ b/source/src/apps/pilot/awatkins/beta_nonlocal.cc @@ -279,7 +279,7 @@ main( int argc, char* argv[] ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/beta_sc_scan.cc b/source/src/apps/pilot/awatkins/beta_sc_scan.cc index 91b72a48a6..df0b3960eb 100644 --- a/source/src/apps/pilot/awatkins/beta_sc_scan.cc +++ b/source/src/apps/pilot/awatkins/beta_sc_scan.cc @@ -286,7 +286,7 @@ main( int argc, char* argv[] ) score_dir_single( "renamed", score_fxn ); //score_dir( "renamed", score_fxn ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/build_a3b.cc b/source/src/apps/pilot/awatkins/build_a3b.cc index 2f547c976a..ca98fc52af 100644 --- a/source/src/apps/pilot/awatkins/build_a3b.cc +++ b/source/src/apps/pilot/awatkins/build_a3b.cc @@ -124,7 +124,7 @@ int main ( int argc, char* argv[] ) A3BPeptideBuilderOP builder( new A3BPeptideBuilder() ); protocols::jd2::JobDistributor::get_instance()->go( builder ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/cov_hbs.cc b/source/src/apps/pilot/awatkins/cov_hbs.cc index dadf763790..c5902dad9e 100644 --- a/source/src/apps/pilot/awatkins/cov_hbs.cc +++ b/source/src/apps/pilot/awatkins/cov_hbs.cc @@ -138,7 +138,7 @@ int main ( int argc, char* argv[] ) CovalentPeptidomimeticDockDesignOP builder( new CovalentPeptidomimeticDockDesign() ); protocols::jd2::JobDistributor::get_instance()->go( builder ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/cov_peptidomimetic_creator.cc b/source/src/apps/pilot/awatkins/cov_peptidomimetic_creator.cc index 79961cdd70..10e1ffde74 100644 --- a/source/src/apps/pilot/awatkins/cov_peptidomimetic_creator.cc +++ b/source/src/apps/pilot/awatkins/cov_peptidomimetic_creator.cc @@ -156,7 +156,7 @@ int main ( int argc, char* argv[] ) CovalentPeptidomimeticCreatorOP builder( new CovalentPeptidomimeticCreator() ); protocols::jd2::JobDistributor::get_instance()->go( builder ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/cov_test.cc b/source/src/apps/pilot/awatkins/cov_test.cc index 83b739d3de..98ea3bd063 100644 --- a/source/src/apps/pilot/awatkins/cov_test.cc +++ b/source/src/apps/pilot/awatkins/cov_test.cc @@ -183,7 +183,7 @@ int main ( int argc, char* argv[] ) std::cout << "about to dump" << std::endl; pose.dump_pdb("out.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/diversify_conotoxin.cc b/source/src/apps/pilot/awatkins/diversify_conotoxin.cc index fa0c84054b..dcd2e2db5b 100644 --- a/source/src/apps/pilot/awatkins/diversify_conotoxin.cc +++ b/source/src/apps/pilot/awatkins/diversify_conotoxin.cc @@ -343,7 +343,7 @@ main( int argc, char* argv[] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/evaluate_beta_mutants.cc b/source/src/apps/pilot/awatkins/evaluate_beta_mutants.cc index 45db36e37b..e8984ee793 100644 --- a/source/src/apps/pilot/awatkins/evaluate_beta_mutants.cc +++ b/source/src/apps/pilot/awatkins/evaluate_beta_mutants.cc @@ -360,7 +360,7 @@ main( int argc, char* argv[] ) TR << "meta trifluoromethyl phe ile beta-53-17 for mdm2: " << b53_17_score << std::endl; TR << "para fluoro phe meta para dichloro phe beta-53-18 for mdm2: " << b53_18_score << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/get_dihedral_b3aa.cc b/source/src/apps/pilot/awatkins/get_dihedral_b3aa.cc index 5bbad00fe9..404b87bd68 100644 --- a/source/src/apps/pilot/awatkins/get_dihedral_b3aa.cc +++ b/source/src/apps/pilot/awatkins/get_dihedral_b3aa.cc @@ -454,7 +454,7 @@ main( int argc, char * argv [] ) << "| DONE |\n" << "+-----------------------------------------------------------------+" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/hbs_creator.cc b/source/src/apps/pilot/awatkins/hbs_creator.cc index 86014661c1..36fe38cd5e 100644 --- a/source/src/apps/pilot/awatkins/hbs_creator.cc +++ b/source/src/apps/pilot/awatkins/hbs_creator.cc @@ -161,7 +161,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( HC_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/hbs_dock_design.cc b/source/src/apps/pilot/awatkins/hbs_dock_design.cc index da1cbe300c..dc47e1657e 100644 --- a/source/src/apps/pilot/awatkins/hbs_dock_design.cc +++ b/source/src/apps/pilot/awatkins/hbs_dock_design.cc @@ -238,7 +238,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( HDDM_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/indel.cc b/source/src/apps/pilot/awatkins/indel.cc index 3b1a93ca8f..01f66292f3 100644 --- a/source/src/apps/pilot/awatkins/indel.cc +++ b/source/src/apps/pilot/awatkins/indel.cc @@ -90,7 +90,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( indel_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/lactamize.cc b/source/src/apps/pilot/awatkins/lactamize.cc index 1ee4b43d50..cb894dde25 100644 --- a/source/src/apps/pilot/awatkins/lactamize.cc +++ b/source/src/apps/pilot/awatkins/lactamize.cc @@ -463,7 +463,7 @@ main( int argc, char* argv[] ) pose.dump_pdb( outfile ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/macrocycle_sampling.cc b/source/src/apps/pilot/awatkins/macrocycle_sampling.cc index d9d94183e2..f76ea48888 100644 --- a/source/src/apps/pilot/awatkins/macrocycle_sampling.cc +++ b/source/src/apps/pilot/awatkins/macrocycle_sampling.cc @@ -274,7 +274,7 @@ main( int argc, char *argv[] ) pose.dump_pdb( filename+"_final.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/make_a3b_bundle.cc b/source/src/apps/pilot/awatkins/make_a3b_bundle.cc index 01d3375dee..08e847e82f 100644 --- a/source/src/apps/pilot/awatkins/make_a3b_bundle.cc +++ b/source/src/apps/pilot/awatkins/make_a3b_bundle.cc @@ -427,7 +427,7 @@ int main( int argc, char * argv [] ) { mypose2.dump_pdb(outfile); } printf("JOB COMPLETED.\n"); fflush(stdout); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/make_ideal_a3b_fragment.cc b/source/src/apps/pilot/awatkins/make_ideal_a3b_fragment.cc index 734b693c2a..83514774d9 100644 --- a/source/src/apps/pilot/awatkins/make_ideal_a3b_fragment.cc +++ b/source/src/apps/pilot/awatkins/make_ideal_a3b_fragment.cc @@ -262,7 +262,7 @@ int main ( int argc, char* argv[] ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/mike_linker_test.cc b/source/src/apps/pilot/awatkins/mike_linker_test.cc index e02c12cc8f..9e270196fc 100644 --- a/source/src/apps/pilot/awatkins/mike_linker_test.cc +++ b/source/src/apps/pilot/awatkins/mike_linker_test.cc @@ -208,7 +208,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( ML_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/multistate_idea.cc b/source/src/apps/pilot/awatkins/multistate_idea.cc index 24a07e9aa3..207f0e8cfc 100644 --- a/source/src/apps/pilot/awatkins/multistate_idea.cc +++ b/source/src/apps/pilot/awatkins/multistate_idea.cc @@ -219,7 +219,7 @@ main( int argc, char* argv[] ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/oop_conformations.cc b/source/src/apps/pilot/awatkins/oop_conformations.cc index 85ca816619..376e5e4830 100644 --- a/source/src/apps/pilot/awatkins/oop_conformations.cc +++ b/source/src/apps/pilot/awatkins/oop_conformations.cc @@ -313,7 +313,7 @@ main( int argc, char *argv[] ) mnmvr.apply( best_pose ); best_pose.dump_pdb( "final_final_opt.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/oop_scan.cc b/source/src/apps/pilot/awatkins/oop_scan.cc index 3167114c21..82053b8e2b 100644 --- a/source/src/apps/pilot/awatkins/oop_scan.cc +++ b/source/src/apps/pilot/awatkins/oop_scan.cc @@ -177,7 +177,7 @@ main( int argc, char *argv[] ) } std::cout << "Final required margin was " << mrgn << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/orn_macrocycle.cc b/source/src/apps/pilot/awatkins/orn_macrocycle.cc index 6e26c7adbb..403be11320 100644 --- a/source/src/apps/pilot/awatkins/orn_macrocycle.cc +++ b/source/src/apps/pilot/awatkins/orn_macrocycle.cc @@ -302,7 +302,7 @@ main( int argc, char* argv[] ) TR << "After minimization, score is " << ( *score_fxn )( pose ) << std::endl; pose.dump_pdb( "out.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/peptidomimetic_ensembles.cc b/source/src/apps/pilot/awatkins/peptidomimetic_ensembles.cc index 7c8aba7096..45ee276b17 100644 --- a/source/src/apps/pilot/awatkins/peptidomimetic_ensembles.cc +++ b/source/src/apps/pilot/awatkins/peptidomimetic_ensembles.cc @@ -184,7 +184,7 @@ main( int argc, char *argv[] ) ref_pose.dump_pdb( "done.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/peptoid_hbs.cc b/source/src/apps/pilot/awatkins/peptoid_hbs.cc index 013f81e221..ce4218bd24 100644 --- a/source/src/apps/pilot/awatkins/peptoid_hbs.cc +++ b/source/src/apps/pilot/awatkins/peptoid_hbs.cc @@ -237,7 +237,7 @@ main( int argc, char* argv[] ) } pose.dump_pdb( "fourth.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/pna.cc b/source/src/apps/pilot/awatkins/pna.cc index 5299abb457..84329940e7 100644 --- a/source/src/apps/pilot/awatkins/pna.cc +++ b/source/src/apps/pilot/awatkins/pna.cc @@ -335,7 +335,7 @@ int main ( int argc, char* argv[] ) pert_mc->recover_low( pose ); pose.dump_pdb( "new.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/pose_iteration.cc b/source/src/apps/pilot/awatkins/pose_iteration.cc index 4731835aff..1f03fb23c3 100644 --- a/source/src/apps/pilot/awatkins/pose_iteration.cc +++ b/source/src/apps/pilot/awatkins/pose_iteration.cc @@ -64,7 +64,7 @@ int main ( int argc, char* argv[] ) std::cout << "I am happy about " << res_iter->seqpos() << " and here is why: " << *res_iter << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/sec_struct_finder.cc b/source/src/apps/pilot/awatkins/sec_struct_finder.cc index ee9f75f47d..256edc721c 100644 --- a/source/src/apps/pilot/awatkins/sec_struct_finder.cc +++ b/source/src/apps/pilot/awatkins/sec_struct_finder.cc @@ -167,7 +167,7 @@ main( int argc, char* argv[] ) protocols::jd2::JobDistributor::get_instance()->go( ssf ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/test_d_l_readin.cc b/source/src/apps/pilot/awatkins/test_d_l_readin.cc index c2945b5990..7cf13f6fc8 100644 --- a/source/src/apps/pilot/awatkins/test_d_l_readin.cc +++ b/source/src/apps/pilot/awatkins/test_d_l_readin.cc @@ -129,7 +129,7 @@ main( int argc, char* argv[] ) TR << "Name of residue 2 is DNLU: " << pose.residue( 2 ).type().name() << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/test_metapatch.cc b/source/src/apps/pilot/awatkins/test_metapatch.cc index 3f40582811..ba7a20f1fd 100644 --- a/source/src/apps/pilot/awatkins/test_metapatch.cc +++ b/source/src/apps/pilot/awatkins/test_metapatch.cc @@ -211,7 +211,7 @@ main( int argc, char* argv[] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/test_mm_lj.cc b/source/src/apps/pilot/awatkins/test_mm_lj.cc index 08a7161ce7..6c58f52e0b 100644 --- a/source/src/apps/pilot/awatkins/test_mm_lj.cc +++ b/source/src/apps/pilot/awatkins/test_mm_lj.cc @@ -199,7 +199,7 @@ main( int argc, char* argv[] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/test_nu_angles.cc b/source/src/apps/pilot/awatkins/test_nu_angles.cc index e3693af076..cc6cb3c89c 100644 --- a/source/src/apps/pilot/awatkins/test_nu_angles.cc +++ b/source/src/apps/pilot/awatkins/test_nu_angles.cc @@ -142,7 +142,7 @@ main( int argc, char* argv[] ) pose.dump_scored_pdb( "min.pdb", *score_fxn ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/test_terpenes.cc b/source/src/apps/pilot/awatkins/test_terpenes.cc index caf9e5228d..428bfac149 100644 --- a/source/src/apps/pilot/awatkins/test_terpenes.cc +++ b/source/src/apps/pilot/awatkins/test_terpenes.cc @@ -169,7 +169,7 @@ main( int argc, char* argv[] ) pose.dump_pdb( "min.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/torsion_scoring.cc b/source/src/apps/pilot/awatkins/torsion_scoring.cc index afbb232550..f785912a13 100644 --- a/source/src/apps/pilot/awatkins/torsion_scoring.cc +++ b/source/src/apps/pilot/awatkins/torsion_scoring.cc @@ -119,7 +119,7 @@ main( int argc, char* argv[] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/trial_rna_mutants.cc b/source/src/apps/pilot/awatkins/trial_rna_mutants.cc index a40ce6bffb..b80b3f2647 100644 --- a/source/src/apps/pilot/awatkins/trial_rna_mutants.cc +++ b/source/src/apps/pilot/awatkins/trial_rna_mutants.cc @@ -213,7 +213,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/triazolamer_creator.cc b/source/src/apps/pilot/awatkins/triazolamer_creator.cc index 3062915f25..5bad25fe5e 100644 --- a/source/src/apps/pilot/awatkins/triazolamer_creator.cc +++ b/source/src/apps/pilot/awatkins/triazolamer_creator.cc @@ -230,7 +230,7 @@ int main ( int argc, char* argv[] ) TriazoleCreatorOP builder( new TriazoleCreator() ); protocols::jd2::JobDistributor::get_instance()->go( builder ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/triazolamer_dock_design.cc b/source/src/apps/pilot/awatkins/triazolamer_dock_design.cc index 3948a1c8b3..8e523d975e 100644 --- a/source/src/apps/pilot/awatkins/triazolamer_dock_design.cc +++ b/source/src/apps/pilot/awatkins/triazolamer_dock_design.cc @@ -232,7 +232,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( tddm_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/trivial_alascan.cc b/source/src/apps/pilot/awatkins/trivial_alascan.cc index e4712efb7c..9e0257c504 100644 --- a/source/src/apps/pilot/awatkins/trivial_alascan.cc +++ b/source/src/apps/pilot/awatkins/trivial_alascan.cc @@ -140,7 +140,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( TAM_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/awatkins/vancomycin.cc b/source/src/apps/pilot/awatkins/vancomycin.cc index 7e6ef748e6..31520815d3 100644 --- a/source/src/apps/pilot/awatkins/vancomycin.cc +++ b/source/src/apps/pilot/awatkins/vancomycin.cc @@ -441,7 +441,7 @@ int main ( int argc, char* argv[] ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/BuildFloppyTail.cc b/source/src/apps/pilot/barak/BuildFloppyTail.cc index 9cea711b66..eaf44e55c7 100644 --- a/source/src/apps/pilot/barak/BuildFloppyTail.cc +++ b/source/src/apps/pilot/barak/BuildFloppyTail.cc @@ -208,7 +208,7 @@ main( int argc, char * argv [] ) //dump pdb to output pose.dump_pdb("./peptide.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/PeptideDeriver.cc b/source/src/apps/pilot/barak/PeptideDeriver.cc index 6793e4b350..6aefebd60a 100644 --- a/source/src/apps/pilot/barak/PeptideDeriver.cc +++ b/source/src/apps/pilot/barak/PeptideDeriver.cc @@ -215,7 +215,7 @@ main( int argc, char * argv [] ) TR << "Best pep from A at pos: "<show(std::cout,pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/barak_relax.cc b/source/src/apps/pilot/barak/barak_relax.cc index 70ea6035d6..2439e8be6f 100644 --- a/source/src/apps/pilot/barak/barak_relax.cc +++ b/source/src/apps/pilot/barak/barak_relax.cc @@ -91,7 +91,7 @@ main( int argc, char * argv [] ) protocols::jobdist::main_plain_pdb_mover( *full_seq, score_fxn ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/compare_rms_byres.cc b/source/src/apps/pilot/barak/compare_rms_byres.cc index 773e349619..e98eb7f006 100644 --- a/source/src/apps/pilot/barak/compare_rms_byres.cc +++ b/source/src/apps/pilot/barak/compare_rms_byres.cc @@ -155,7 +155,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( rmsCalculator ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/compare_structures.cc b/source/src/apps/pilot/barak/compare_structures.cc index 39749702a4..a59130da05 100644 --- a/source/src/apps/pilot/barak/compare_structures.cc +++ b/source/src/apps/pilot/barak/compare_structures.cc @@ -125,7 +125,7 @@ main( int argc, char * argv [] ) TR << "Output to [" << output_fname << "]" << endl; core::io::pdb::dump_pdb(trg_pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/extend_range.cc b/source/src/apps/pilot/barak/extend_range.cc index 1ca6f2cefa..e11252c9b9 100644 --- a/source/src/apps/pilot/barak/extend_range.cc +++ b/source/src/apps/pilot/barak/extend_range.cc @@ -132,7 +132,7 @@ main( int argc, char * argv [] ) core::io::pdb::dump_pdb(trg_pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/overlay_bb_bondangles.cc b/source/src/apps/pilot/barak/overlay_bb_bondangles.cc index 6cc76b2791..3152b9afcd 100644 --- a/source/src/apps/pilot/barak/overlay_bb_bondangles.cc +++ b/source/src/apps/pilot/barak/overlay_bb_bondangles.cc @@ -169,7 +169,7 @@ main( int argc, char * argv [] ) TR << "Output to [" << output_fname << "]" << endl; core::io::pdb::traced_dump_pdb(TR, pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/overlay_sidechains.cc b/source/src/apps/pilot/barak/overlay_sidechains.cc index 29efa8281a..1366aaf1cc 100644 --- a/source/src/apps/pilot/barak/overlay_sidechains.cc +++ b/source/src/apps/pilot/barak/overlay_sidechains.cc @@ -125,7 +125,7 @@ main( int argc, char * argv [] ) TR << "Output to [" << output_fname << "]" << endl; core::io::pdb::traced_dump_pdb(TR, pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/phosphorylate_position.cc b/source/src/apps/pilot/barak/phosphorylate_position.cc index db8a169d81..535d5e07ee 100644 --- a/source/src/apps/pilot/barak/phosphorylate_position.cc +++ b/source/src/apps/pilot/barak/phosphorylate_position.cc @@ -91,7 +91,7 @@ main( int argc, char * argv [] ) core::pose::add_variant_type_to_pose_residue( pose , chemical::PHOSPHORYLATION, pose_res ); core::io::pdb::dump_pdb(pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/print_phipsi.cc b/source/src/apps/pilot/barak/print_phipsi.cc index a1ff8b89bd..093d74c171 100644 --- a/source/src/apps/pilot/barak/print_phipsi.cc +++ b/source/src/apps/pilot/barak/print_phipsi.cc @@ -174,7 +174,7 @@ main( int argc, char * argv [] ) printBondAngles(i, pose); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/test_frags.barak.cc b/source/src/apps/pilot/barak/test_frags.barak.cc index 3d171a54ac..38632955f8 100644 --- a/source/src/apps/pilot/barak/test_frags.barak.cc +++ b/source/src/apps/pilot/barak/test_frags.barak.cc @@ -132,7 +132,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/thread_bb.cc b/source/src/apps/pilot/barak/thread_bb.cc index 2d74ad7efc..db66b9f94d 100644 --- a/source/src/apps/pilot/barak/thread_bb.cc +++ b/source/src/apps/pilot/barak/thread_bb.cc @@ -149,7 +149,7 @@ main( int argc, char * argv [] ) TR << "Output to [" << output_fname << "]" << endl; core::io::pdb::dump_pdb(trg_pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barak/thread_sidechains.cc b/source/src/apps/pilot/barak/thread_sidechains.cc index 196fad1449..7379ba7f3c 100644 --- a/source/src/apps/pilot/barak/thread_sidechains.cc +++ b/source/src/apps/pilot/barak/thread_sidechains.cc @@ -125,7 +125,7 @@ main( int argc, char * argv [] ) TR << "Output to [" << output_fname << "]" << endl; core::io::pdb::dump_pdb(trg_pose, output_fname); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barthp/membrane_highres_score.cc b/source/src/apps/pilot/barthp/membrane_highres_score.cc index d7151723da..4e39636aac 100644 --- a/source/src/apps/pilot/barthp/membrane_highres_score.cc +++ b/source/src/apps/pilot/barthp/membrane_highres_score.cc @@ -213,7 +213,7 @@ main( int argc, char* argv [] ) // } // for ntimes output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barthp/membrane_relax.cc b/source/src/apps/pilot/barthp/membrane_relax.cc index cadb71ee93..0354118bed 100644 --- a/source/src/apps/pilot/barthp/membrane_relax.cc +++ b/source/src/apps/pilot/barthp/membrane_relax.cc @@ -290,7 +290,7 @@ main( int argc, char * argv [] ) // (*scorefxn)(*pose); // scorefxn->show(std::cout, *pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/barthp/membrane_rescore.cc b/source/src/apps/pilot/barthp/membrane_rescore.cc index 6d1018e0ac..cd320c3d44 100644 --- a/source/src/apps/pilot/barthp/membrane_rescore.cc +++ b/source/src/apps/pilot/barthp/membrane_rescore.cc @@ -204,7 +204,7 @@ main( int argc, char* argv [] ) // } // for ntimes output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/bou-min-ubo-nrg-jump.cc b/source/src/apps/pilot/bazzoli/bou-min-ubo-nrg-jump.cc index 5c5d78a401..6b74c3a94f 100644 --- a/source/src/apps/pilot/bazzoli/bou-min-ubo-nrg-jump.cc +++ b/source/src/apps/pilot/bazzoli/bou-min-ubo-nrg-jump.cc @@ -101,7 +101,7 @@ int main( int argc, char * argv [] ) TR << "energy difference: " << (bou_score - ubo_score) << std::endl; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/cnl_env_lost_hbs.cc b/source/src/apps/pilot/bazzoli/cnl_env_lost_hbs.cc index 55019e8fe1..268c66823c 100644 --- a/source/src/apps/pilot/bazzoli/cnl_env_lost_hbs.cc +++ b/source/src/apps/pilot/bazzoli/cnl_env_lost_hbs.cc @@ -739,7 +739,7 @@ int main( int argc, char * argv [] ) lost_hbs << std::endl; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/constel.cc b/source/src/apps/pilot/bazzoli/constel.cc index bdcff6d280..93b4214271 100644 --- a/source/src/apps/pilot/bazzoli/constel.cc +++ b/source/src/apps/pilot/bazzoli/constel.cc @@ -335,7 +335,7 @@ int main( int argc, char * argv [] ) return 0; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/lig_low_sasa.cc b/source/src/apps/pilot/bazzoli/lig_low_sasa.cc index 4ddeebe80e..1a0bf82edb 100644 --- a/source/src/apps/pilot/bazzoli/lig_low_sasa.cc +++ b/source/src/apps/pilot/bazzoli/lig_low_sasa.cc @@ -189,7 +189,7 @@ int main( int argc, char * argv [] ) return 0; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/lig_polar_sat.cc b/source/src/apps/pilot/bazzoli/lig_polar_sat.cc index f023ebda11..ed6e1251ca 100644 --- a/source/src/apps/pilot/bazzoli/lig_polar_sat.cc +++ b/source/src/apps/pilot/bazzoli/lig_polar_sat.cc @@ -342,7 +342,7 @@ int main( int argc, char * argv [] ) TR << "fraction of satisfied polar atoms: " << frac << std::endl; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/list_cnl_ngbs.cc b/source/src/apps/pilot/bazzoli/list_cnl_ngbs.cc index 887f31f444..adf25399be 100644 --- a/source/src/apps/pilot/bazzoli/list_cnl_ngbs.cc +++ b/source/src/apps/pilot/bazzoli/list_cnl_ngbs.cc @@ -143,7 +143,7 @@ int main( int argc, char * argv [] ) print_res_ids(n.get(), ps, TR); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/nrg_res_set.cc b/source/src/apps/pilot/bazzoli/nrg_res_set.cc index 4adc062aeb..e5a94aafc4 100644 --- a/source/src/apps/pilot/bazzoli/nrg_res_set.cc +++ b/source/src/apps/pilot/bazzoli/nrg_res_set.cc @@ -228,7 +228,7 @@ int main( int argc, char * argv [] ) return 0; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/sel_hbonds.cc b/source/src/apps/pilot/bazzoli/sel_hbonds.cc index 9e8d8434f3..adeea3665d 100644 --- a/source/src/apps/pilot/bazzoli/sel_hbonds.cc +++ b/source/src/apps/pilot/bazzoli/sel_hbonds.cc @@ -430,7 +430,7 @@ int main( int argc, char * argv [] ) return 0; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bazzoli/tgtres_polar_sho_energies.cc b/source/src/apps/pilot/bazzoli/tgtres_polar_sho_energies.cc index d46374cf08..2207e7e081 100644 --- a/source/src/apps/pilot/bazzoli/tgtres_polar_sho_energies.cc +++ b/source/src/apps/pilot/bazzoli/tgtres_polar_sho_energies.cc @@ -209,7 +209,7 @@ int main( int argc, char * argv [] ) TR << "TASK COMPLETED" << std::endl; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bcorreia/fold_from_loops.cc b/source/src/apps/pilot/bcorreia/fold_from_loops.cc index 47f3adb98c..a5cb3845f7 100644 --- a/source/src/apps/pilot/bcorreia/fold_from_loops.cc +++ b/source/src/apps/pilot/bcorreia/fold_from_loops.cc @@ -1012,7 +1012,7 @@ main( int argc, char* argv [] ) loop_tag = 1; try{ jumping::close_chainbreaks( closure_protocol, fold_pose, sliding_checkpoint ,"sliding", f ); - } catch ( protocols::loops::EXCN_Loop_not_closed& excn ) { + } catch (protocols::loops::EXCN_Loop_not_closed& excn ) { loop_tag = 0; } @@ -1193,7 +1193,7 @@ main( int argc, char* argv [] ) TR.flush(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bcorreia/fold_from_loops_devel.cc b/source/src/apps/pilot/bcorreia/fold_from_loops_devel.cc index 25a3ca1978..ef755e55cd 100644 --- a/source/src/apps/pilot/bcorreia/fold_from_loops_devel.cc +++ b/source/src/apps/pilot/bcorreia/fold_from_loops_devel.cc @@ -203,7 +203,7 @@ main( int argc, char* argv [] ) JobDistributor::get_instance()->go( trial_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bcorreia/iterative_design.cc b/source/src/apps/pilot/bcorreia/iterative_design.cc index f2e45e21a8..7264ff8e97 100644 --- a/source/src/apps/pilot/bcorreia/iterative_design.cc +++ b/source/src/apps/pilot/bcorreia/iterative_design.cc @@ -488,7 +488,7 @@ main( int argc, char * argv [] ) ++pose_number; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bder/BuriedUnsatPolarsFinder.cc b/source/src/apps/pilot/bder/BuriedUnsatPolarsFinder.cc index ea5228d7c6..e9dfea5e8a 100644 --- a/source/src/apps/pilot/bder/BuriedUnsatPolarsFinder.cc +++ b/source/src/apps/pilot/bder/BuriedUnsatPolarsFinder.cc @@ -153,7 +153,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bder/HbondZinc.cc b/source/src/apps/pilot/bder/HbondZinc.cc index ebf47441ca..3f181f2cce 100644 --- a/source/src/apps/pilot/bder/HbondZinc.cc +++ b/source/src/apps/pilot/bder/HbondZinc.cc @@ -538,7 +538,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/bder/HbondZincBackbone.cc b/source/src/apps/pilot/bder/HbondZincBackbone.cc index 9fedc55653..1651987d48 100644 --- a/source/src/apps/pilot/bder/HbondZincBackbone.cc +++ b/source/src/apps/pilot/bder/HbondZincBackbone.cc @@ -358,7 +358,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/bder/HbondZincHHHO.cc b/source/src/apps/pilot/bder/HbondZincHHHO.cc index 57caecf834..85861611ad 100644 --- a/source/src/apps/pilot/bder/HbondZincHHHO.cc +++ b/source/src/apps/pilot/bder/HbondZincHHHO.cc @@ -681,7 +681,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/bder/HbondZinc_allpolar.cc b/source/src/apps/pilot/bder/HbondZinc_allpolar.cc index 1e00d0f1a9..0eb1ce9109 100644 --- a/source/src/apps/pilot/bder/HbondZinc_allpolar.cc +++ b/source/src/apps/pilot/bder/HbondZinc_allpolar.cc @@ -339,7 +339,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/bder/HbondZinc_ser.cc b/source/src/apps/pilot/bder/HbondZinc_ser.cc index d525a34fd0..6e4a235b53 100644 --- a/source/src/apps/pilot/bder/HbondZinc_ser.cc +++ b/source/src/apps/pilot/bder/HbondZinc_ser.cc @@ -312,7 +312,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/bder/ZincSiteEvaluator.cc b/source/src/apps/pilot/bder/ZincSiteEvaluator.cc index 50eed37f13..e971f02b3e 100644 --- a/source/src/apps/pilot/bder/ZincSiteEvaluator.cc +++ b/source/src/apps/pilot/bder/ZincSiteEvaluator.cc @@ -439,7 +439,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bder/xtal_water_bunsat.cc b/source/src/apps/pilot/bder/xtal_water_bunsat.cc index 2df377d84b..b326b11535 100644 --- a/source/src/apps/pilot/bder/xtal_water_bunsat.cc +++ b/source/src/apps/pilot/bder/xtal_water_bunsat.cc @@ -224,7 +224,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ben/VIP_app.cc b/source/src/apps/pilot/ben/VIP_app.cc index 1a62544c82..7ee92428b3 100644 --- a/source/src/apps/pilot/ben/VIP_app.cc +++ b/source/src/apps/pilot/ben/VIP_app.cc @@ -107,7 +107,7 @@ main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/biokhar/karen_compare_different_proteins.cc b/source/src/apps/pilot/biokhar/karen_compare_different_proteins.cc index 7cf62fd1a3..fb644f88ae 100644 --- a/source/src/apps/pilot/biokhar/karen_compare_different_proteins.cc +++ b/source/src/apps/pilot/biokhar/karen_compare_different_proteins.cc @@ -367,7 +367,7 @@ int main( int argc, char * argv [] ) { TR << "Distance: " << best_dist << std::endl; TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/biokhar/karen_compare_pocket_rmsd.cc b/source/src/apps/pilot/biokhar/karen_compare_pocket_rmsd.cc index a8935dcb15..e10d7680be 100644 --- a/source/src/apps/pilot/biokhar/karen_compare_pocket_rmsd.cc +++ b/source/src/apps/pilot/biokhar/karen_compare_pocket_rmsd.cc @@ -128,7 +128,7 @@ main( int argc, char * argv [] ){ TR << "Done computing rmsds" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/biokhar/karen_pocket_compare.cc b/source/src/apps/pilot/biokhar/karen_pocket_compare.cc index 55a5908119..6b92f927e3 100644 --- a/source/src/apps/pilot/biokhar/karen_pocket_compare.cc +++ b/source/src/apps/pilot/biokhar/karen_pocket_compare.cc @@ -114,7 +114,7 @@ int main( int argc, char * argv [] ) { TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/biokhar/karen_pocket_save.cc b/source/src/apps/pilot/biokhar/karen_pocket_save.cc index 6122c0c5b7..92fc50c628 100644 --- a/source/src/apps/pilot/biokhar/karen_pocket_save.cc +++ b/source/src/apps/pilot/biokhar/karen_pocket_save.cc @@ -230,7 +230,7 @@ int main( int argc, char * argv [] ) { // fout.clear(); TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bjornw/bus_error.cc b/source/src/apps/pilot/bjornw/bus_error.cc index fddcfcb911..3542d64aca 100644 --- a/source/src/apps/pilot/bjornw/bus_error.cc +++ b/source/src/apps/pilot/bjornw/bus_error.cc @@ -23,7 +23,7 @@ main( int argc, char * argv [] ) output2 << "TEST2\n"; output2.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/bjornw/jumpRT_test.cc b/source/src/apps/pilot/bjornw/jumpRT_test.cc index 19c274ecf8..88642db890 100644 --- a/source/src/apps/pilot/bjornw/jumpRT_test.cc +++ b/source/src/apps/pilot/bjornw/jumpRT_test.cc @@ -195,7 +195,7 @@ main( int argc, char* argv [] ) pose.dump_pdb("tmp.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/conserve_disulfides.cc b/source/src/apps/pilot/blivens/conserve_disulfides.cc index 177b7d2274..e4a83df425 100644 --- a/source/src/apps/pilot/blivens/conserve_disulfides.cc +++ b/source/src/apps/pilot/blivens/conserve_disulfides.cc @@ -140,7 +140,7 @@ int main( int argc, char * argv [] ) outfile.append("fa.pdb"); pose.dump_scored_pdb(outfile, *fa_sfxn, ""); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/blivens/convert.cc b/source/src/apps/pilot/blivens/convert.cc index 20ae16983d..255b17f6d4 100644 --- a/source/src/apps/pilot/blivens/convert.cc +++ b/source/src/apps/pilot/blivens/convert.cc @@ -107,7 +107,7 @@ int main( int argc, char * argv [] ) core::util::switch_to_residue_type_set( pose, out_rsd_set); pose.dump_pdb(out); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/create_disulf_file.cc b/source/src/apps/pilot/blivens/create_disulf_file.cc index 7c70122b53..18edbbf7b6 100644 --- a/source/src/apps/pilot/blivens/create_disulf_file.cc +++ b/source/src/apps/pilot/blivens/create_disulf_file.cc @@ -99,7 +99,7 @@ int main( int argc, char * argv [] ) out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/disulfide_filter.cc b/source/src/apps/pilot/blivens/disulfide_filter.cc index 6e91cf5aea..4d7c056597 100644 --- a/source/src/apps/pilot/blivens/disulfide_filter.cc +++ b/source/src/apps/pilot/blivens/disulfide_filter.cc @@ -91,7 +91,7 @@ int main( int argc, char * argv [] ) //end residue pair } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/disulfide_finder.cc b/source/src/apps/pilot/blivens/disulfide_finder.cc index 02a1b65fb1..f66c798039 100644 --- a/source/src/apps/pilot/blivens/disulfide_finder.cc +++ b/source/src/apps/pilot/blivens/disulfide_finder.cc @@ -148,7 +148,7 @@ main( int argc, char * argv [] ) out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/disulfide_handoff.cc b/source/src/apps/pilot/blivens/disulfide_handoff.cc index e490a66e90..b98d6394f6 100644 --- a/source/src/apps/pilot/blivens/disulfide_handoff.cc +++ b/source/src/apps/pilot/blivens/disulfide_handoff.cc @@ -181,7 +181,7 @@ int main( int argc, char * argv [] ) //cen_pose.conformation().detect_disulfides(); pose->dump_scored_pdb(outfile, *sfxn, ""); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/disulfide_scorer.cc b/source/src/apps/pilot/blivens/disulfide_scorer.cc index ff873cb04d..68c67d323d 100644 --- a/source/src/apps/pilot/blivens/disulfide_scorer.cc +++ b/source/src/apps/pilot/blivens/disulfide_scorer.cc @@ -332,7 +332,7 @@ int main( int argc, char * argv [] ) out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/blivens/rotamerize_disulfides.cc b/source/src/apps/pilot/blivens/rotamerize_disulfides.cc index 0d8b78eb87..9287434137 100644 --- a/source/src/apps/pilot/blivens/rotamerize_disulfides.cc +++ b/source/src/apps/pilot/blivens/rotamerize_disulfides.cc @@ -216,7 +216,7 @@ int main( int argc, char * argv [] ) // ++count; // } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/boon/pilot.cc b/source/src/apps/pilot/boon/pilot.cc index 573a7fb05e..868d503a96 100644 --- a/source/src/apps/pilot/boon/pilot.cc +++ b/source/src/apps/pilot/boon/pilot.cc @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) std::cout << loopmover4 << std::endl; ///////////////////////////////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/boon/test.cc b/source/src/apps/pilot/boon/test.cc index d546044ff7..c5dda55941 100644 --- a/source/src/apps/pilot/boon/test.cc +++ b/source/src/apps/pilot/boon/test.cc @@ -382,7 +382,7 @@ int main(int argc, char *argv[]) protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD loopmover2 (protocols::loops::loop_mover::perturb::LoopMover_Perturb_CCD(loops, scorefxn)); std::cout << loopmover2 << std::endl;*/ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/abego_predict.cc b/source/src/apps/pilot/brunette/abego_predict.cc index 686ec742c4..1f9b4e7b4c 100644 --- a/source/src/apps/pilot/brunette/abego_predict.cc +++ b/source/src/apps/pilot/brunette/abego_predict.cc @@ -92,7 +92,7 @@ int main( int argc, char * argv [] ) { predict_ss(ss_pred,fasta,id); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/aln_to_disulf.cc b/source/src/apps/pilot/brunette/aln_to_disulf.cc index bb4cc7dda8..261c141d6c 100644 --- a/source/src/apps/pilot/brunette/aln_to_disulf.cc +++ b/source/src/apps/pilot/brunette/aln_to_disulf.cc @@ -233,7 +233,7 @@ main( int argc, char* argv [] ) { } tr << "disulfide detection completed successfully" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/armEval.cc b/source/src/apps/pilot/brunette/armEval.cc index 1ab1956402..84e3da8087 100644 --- a/source/src/apps/pilot/brunette/armEval.cc +++ b/source/src/apps/pilot/brunette/armEval.cc @@ -257,7 +257,7 @@ int main( int argc, char * argv [] ) { utility::vector1< std::string > abego_vector = core::sequence::get_abego(*input_poseOP,1); output << F(8,3,fa_score) << " " <go( seq ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/cluster_alns.cc b/source/src/apps/pilot/brunette/cluster_alns.cc index 3da9c5473f..6a8c9b4bb1 100644 --- a/source/src/apps/pilot/brunette/cluster_alns.cc +++ b/source/src/apps/pilot/brunette/cluster_alns.cc @@ -23,7 +23,7 @@ int main( int argc, char * argv [] ) { devel::init(argc, argv); AlignmentClusteringOP cluster = new AlignmentClustering(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/contact_map_from_homologs.cc b/source/src/apps/pilot/brunette/contact_map_from_homologs.cc index 50c4091a13..40900be609 100644 --- a/source/src/apps/pilot/brunette/contact_map_from_homologs.cc +++ b/source/src/apps/pilot/brunette/contact_map_from_homologs.cc @@ -421,7 +421,7 @@ main( int argc, char * argv [] ) { } topOutput.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/convertFragmentType.cc b/source/src/apps/pilot/brunette/convertFragmentType.cc index 63cbd8a54d..f6b1b07488 100644 --- a/source/src/apps/pilot/brunette/convertFragmentType.cc +++ b/source/src/apps/pilot/brunette/convertFragmentType.cc @@ -61,7 +61,7 @@ int main( int argc, char * argv [] ) { devel::init(argc, argv); FragSetOP orig_frags = FragmentIO().read_data( option[ fragment_file_in ]() ); FragmentIO().write_data(option[fragment_file_out](),*orig_frags); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/dumpPhiPsiStats.cc b/source/src/apps/pilot/brunette/dumpPhiPsiStats.cc index a868956c3f..2f463ef430 100644 --- a/source/src/apps/pilot/brunette/dumpPhiPsiStats.cc +++ b/source/src/apps/pilot/brunette/dumpPhiPsiStats.cc @@ -86,7 +86,7 @@ int main( int argc, char * argv [] ) { output << I(4,ii)<<" " <secstruct(ii) << " " << F(8,1,input_poseOP->phi(ii)) << F(8,1,input_poseOP->psi(ii)) << F(8,1,input_poseOP->omega(ii)) << std::endl; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/evalFullLength.cc b/source/src/apps/pilot/brunette/evalFullLength.cc index bead77cb76..0dbfc5c719 100644 --- a/source/src/apps/pilot/brunette/evalFullLength.cc +++ b/source/src/apps/pilot/brunette/evalFullLength.cc @@ -159,7 +159,7 @@ int main( int argc, char * argv [] ) { Size tyrCt = tyr_ct(*input_poseOP); output << F(8,3,score) << " " << F(8,3,holesScore) <<" "<< I(4,alaCt) << " "<< I(4,gluCt) << " " << I(4,tyrCt) << " " << tag << " " << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/evalRepeats.cc b/source/src/apps/pilot/brunette/evalRepeats.cc index 71f7e53178..22fa9daf2e 100644 --- a/source/src/apps/pilot/brunette/evalRepeats.cc +++ b/source/src/apps/pilot/brunette/evalRepeats.cc @@ -322,7 +322,7 @@ int main( int argc, char * argv [] ) { output << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/extractNativeRepeats.cc b/source/src/apps/pilot/brunette/extractNativeRepeats.cc index c2de2d6afc..4610760d9b 100644 --- a/source/src/apps/pilot/brunette/extractNativeRepeats.cc +++ b/source/src/apps/pilot/brunette/extractNativeRepeats.cc @@ -721,10 +721,9 @@ int main( int argc, char * argv [] ) { output_all_repeats(output_repeats,tag,handedness,radius,rise,omega,rmsd,tm,all_out); } } - }catch ( utility::excn::EXCN_Base const & e ) { + }catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } return 0; } - diff --git a/source/src/apps/pilot/brunette/filterAlignments.cc b/source/src/apps/pilot/brunette/filterAlignments.cc index ebc9019142..51699320ff 100644 --- a/source/src/apps/pilot/brunette/filterAlignments.cc +++ b/source/src/apps/pilot/brunette/filterAlignments.cc @@ -329,7 +329,7 @@ int main( int argc, char * argv [] ) { std::ofstream out_aln_stream( out_filename.c_str() ); output_alignments(out_alns,out_aln_stream); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/filterImperfectAln.cc b/source/src/apps/pilot/brunette/filterImperfectAln.cc index 6747725542..b53d005644 100644 --- a/source/src/apps/pilot/brunette/filterImperfectAln.cc +++ b/source/src/apps/pilot/brunette/filterImperfectAln.cc @@ -128,7 +128,7 @@ int main( int argc, char * argv [] ) { std::ofstream out_aln_stream( out_filename.c_str() ); output_alignments(out_alns,out_aln_stream); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/findNaturallyOccuringAlphaRepeats.cc b/source/src/apps/pilot/brunette/findNaturallyOccuringAlphaRepeats.cc index 72a7b11bbe..34a6f59cbd 100644 --- a/source/src/apps/pilot/brunette/findNaturallyOccuringAlphaRepeats.cc +++ b/source/src/apps/pilot/brunette/findNaturallyOccuringAlphaRepeats.cc @@ -202,7 +202,7 @@ int main( int argc, char * argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/fragments_to_ss.cc b/source/src/apps/pilot/brunette/fragments_to_ss.cc index 435474f379..b7853c2fdd 100644 --- a/source/src/apps/pilot/brunette/fragments_to_ss.cc +++ b/source/src/apps/pilot/brunette/fragments_to_ss.cc @@ -116,7 +116,7 @@ int main( int argc, char * argv [] ) { out << I(4,ii) << " " << "A" << " " << label <<" " << F(7,3,pred[2]) << F(7,3,pred[1]) << F(7,3,pred[3]) << std::endl; } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/hle_predict.cc b/source/src/apps/pilot/brunette/hle_predict.cc index 21f5434efc..c8695fc49a 100644 --- a/source/src/apps/pilot/brunette/hle_predict.cc +++ b/source/src/apps/pilot/brunette/hle_predict.cc @@ -84,7 +84,7 @@ int main( int argc, char * argv [] ) { predict_ss(ss_pred,fasta,id); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/minimalCstHomology.cc b/source/src/apps/pilot/brunette/minimalCstHomology.cc index 6f018d66b5..190f9beee5 100644 --- a/source/src/apps/pilot/brunette/minimalCstHomology.cc +++ b/source/src/apps/pilot/brunette/minimalCstHomology.cc @@ -287,7 +287,7 @@ int main( int argc, char * argv [] ) { //calc coordinate constraints calc_outputCoordCsts(fastaSequenceOP[1],alnDataMapped,poseData,coordCstData,N_RES_FROM_GAP_EXCLUDE,MIN_NUM_COORDCSTS,option[minimalCstHomology::only_res_out]()); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/minimalCstRelax.cc b/source/src/apps/pilot/brunette/minimalCstRelax.cc index 0f4f119313..98917fe0e6 100644 --- a/source/src/apps/pilot/brunette/minimalCstRelax.cc +++ b/source/src/apps/pilot/brunette/minimalCstRelax.cc @@ -204,7 +204,7 @@ int main( int argc, char * argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/outputAbego.cc b/source/src/apps/pilot/brunette/outputAbego.cc index 206ae6497a..86c4c989f2 100644 --- a/source/src/apps/pilot/brunette/outputAbego.cc +++ b/source/src/apps/pilot/brunette/outputAbego.cc @@ -74,7 +74,7 @@ int main( int argc, char * argv [] ) { } output.close(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/outputLayerDesignBurial.cc b/source/src/apps/pilot/brunette/outputLayerDesignBurial.cc index 03bfa15304..9d55fb491f 100644 --- a/source/src/apps/pilot/brunette/outputLayerDesignBurial.cc +++ b/source/src/apps/pilot/brunette/outputLayerDesignBurial.cc @@ -112,7 +112,7 @@ int main( int argc, char * argv [] ) { output.close(); std::cout <<"finished " << tag << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/outputRama.cc b/source/src/apps/pilot/brunette/outputRama.cc index fb2ef8d391..46494dedf8 100644 --- a/source/src/apps/pilot/brunette/outputRama.cc +++ b/source/src/apps/pilot/brunette/outputRama.cc @@ -115,7 +115,7 @@ int main( int argc, char * argv [] ) { output2.close(); std::cout <<"finished " << tag << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/outputSasa.cc b/source/src/apps/pilot/brunette/outputSasa.cc index 23842eba70..7b3266a84b 100644 --- a/source/src/apps/pilot/brunette/outputSasa.cc +++ b/source/src/apps/pilot/brunette/outputSasa.cc @@ -112,7 +112,7 @@ int main( int argc, char * argv [] ) { output.close(); std::cout <<"finished " << tag << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/predictedCstFilter.cc b/source/src/apps/pilot/brunette/predictedCstFilter.cc index 73fca77efd..0004452cab 100644 --- a/source/src/apps/pilot/brunette/predictedCstFilter.cc +++ b/source/src/apps/pilot/brunette/predictedCstFilter.cc @@ -100,7 +100,7 @@ int main( int argc, char * argv [] ) { // option 5: gap, all csts, surface exposed, seperated into cohesive contact collections. //step 3: output sigmoid csts. - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/repeat_dock.cc b/source/src/apps/pilot/brunette/repeat_dock.cc index 0662d01e18..d48cc4dce5 100644 --- a/source/src/apps/pilot/brunette/repeat_dock.cc +++ b/source/src/apps/pilot/brunette/repeat_dock.cc @@ -376,7 +376,7 @@ void generate_combined_model(core::pose::Pose pose, core::pose::Pose native_pose core::pose::PoseOP tmp_chain_pose = native_pose.split_by_chain(chain_id); append_pose_to_pose(chainA_full,*tmp_chain_pose); } -catch(utility::excn::EXCN_Base const & e ){ +catch(utility::excn::utility::excn::Exception const & e ){ //not a worry. I expect many chains to not exist. } } @@ -557,7 +557,7 @@ core::pose::Pose superimpose_A_to_all(Dock & dock,core::pose::Pose native_pose){ core::pose::PoseOP tmp_chain_pose = native_pose.split_by_chain(chain_id); superimpose_pose(chainA,*tmp_chain_pose,atom_map); append_pose_to_pose(finalPose,chainA); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { //not a worry. I expect many chains to not exist. } } @@ -660,10 +660,9 @@ int main( int argc, char * argv [] ) { } //generate_combined_model(current_pose, native_pose,docks[1]); } - }catch ( utility::excn::EXCN_Base const & e ) { + }catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } return 0; } - diff --git a/source/src/apps/pilot/brunette/silents_to_ss.cc b/source/src/apps/pilot/brunette/silents_to_ss.cc index adc1d766b5..a6f639ece3 100644 --- a/source/src/apps/pilot/brunette/silents_to_ss.cc +++ b/source/src/apps/pilot/brunette/silents_to_ss.cc @@ -133,7 +133,7 @@ int main( int argc, char * argv [] ) { out << I(4,ii) << " " << "A" << " " << label <<" " << F(7,3,pct[ii][2]) << F(7,3,pct[ii][1]) << F(7,3,pct[ii][3]) << std::endl; } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/brunette/unalignedEvaluate.cc b/source/src/apps/pilot/brunette/unalignedEvaluate.cc index f55352605d..b7f2483cbe 100644 --- a/source/src/apps/pilot/brunette/unalignedEvaluate.cc +++ b/source/src/apps/pilot/brunette/unalignedEvaluate.cc @@ -356,7 +356,7 @@ int main( int argc, char * argv [] ) { score_loops(*input_poseOP,*unconverged_loops,native_pose,native_alignment,template_aln,native_relaxed_pose,templatePose,cstSet_, lookBackCstSet_, output); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/carbohydrates/glycan_clash_check.cc b/source/src/apps/pilot/carbohydrates/glycan_clash_check.cc index b82bc8498b..20fe209069 100644 --- a/source/src/apps/pilot/carbohydrates/glycan_clash_check.cc +++ b/source/src/apps/pilot/carbohydrates/glycan_clash_check.cc @@ -648,7 +648,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( mover_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/carbohydrates/glycan_info.cc b/source/src/apps/pilot/carbohydrates/glycan_info.cc index 48ac6531a4..16cbf0c85c 100644 --- a/source/src/apps/pilot/carbohydrates/glycan_info.cc +++ b/source/src/apps/pilot/carbohydrates/glycan_info.cc @@ -266,7 +266,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( mover_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/carbohydrates/glycan_relax.cc b/source/src/apps/pilot/carbohydrates/glycan_relax.cc index 37458d8ca5..ffb7ac0754 100644 --- a/source/src/apps/pilot/carbohydrates/glycan_relax.cc +++ b/source/src/apps/pilot/carbohydrates/glycan_relax.cc @@ -64,7 +64,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( mover_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/carbohydrates/test_glycan_trees.cc b/source/src/apps/pilot/carbohydrates/test_glycan_trees.cc index 850bed3984..4a451e8cfd 100644 --- a/source/src/apps/pilot/carbohydrates/test_glycan_trees.cc +++ b/source/src/apps/pilot/carbohydrates/test_glycan_trees.cc @@ -133,7 +133,7 @@ main( int argc, char * argv [] ) //TS_ASSERT_EQUALS(man9_copy->size(), 1); man9_copy->dump_pdb("man9_trim_at_1.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chen/simple_dna_regression_test.cc b/source/src/apps/pilot/chen/simple_dna_regression_test.cc index 87aab46269..5f53b9e2fd 100644 --- a/source/src/apps/pilot/chen/simple_dna_regression_test.cc +++ b/source/src/apps/pilot/chen/simple_dna_regression_test.cc @@ -228,7 +228,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/byres_data.cc b/source/src/apps/pilot/chrisk/byres_data.cc index 897edc9ef8..86c0d44710 100644 --- a/source/src/apps/pilot/chrisk/byres_data.cc +++ b/source/src/apps/pilot/chrisk/byres_data.cc @@ -2144,7 +2144,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/hbscan.cc b/source/src/apps/pilot/chrisk/hbscan.cc index 251d1ac67a..0a61d7b172 100644 --- a/source/src/apps/pilot/chrisk/hbscan.cc +++ b/source/src/apps/pilot/chrisk/hbscan.cc @@ -809,7 +809,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_analysis.cc b/source/src/apps/pilot/chrisk/pep_analysis.cc index 8dee442c1f..b0229efea4 100644 --- a/source/src/apps/pilot/chrisk/pep_analysis.cc +++ b/source/src/apps/pilot/chrisk/pep_analysis.cc @@ -859,7 +859,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_gly.cc b/source/src/apps/pilot/chrisk/pep_gly.cc index 1d0c0c6f4b..68850cda64 100644 --- a/source/src/apps/pilot/chrisk/pep_gly.cc +++ b/source/src/apps/pilot/chrisk/pep_gly.cc @@ -1095,7 +1095,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_nrg.cc b/source/src/apps/pilot/chrisk/pep_nrg.cc index bc8d5ac77d..22da0dd431 100644 --- a/source/src/apps/pilot/chrisk/pep_nrg.cc +++ b/source/src/apps/pilot/chrisk/pep_nrg.cc @@ -248,7 +248,7 @@ int main( int argc, char * argv [] ) devel::init(argc, argv); RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_opt.cc b/source/src/apps/pilot/chrisk/pep_opt.cc index 692105e9ed..fb8648ba85 100644 --- a/source/src/apps/pilot/chrisk/pep_opt.cc +++ b/source/src/apps/pilot/chrisk/pep_opt.cc @@ -588,7 +588,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_opt_parallel.cc b/source/src/apps/pilot/chrisk/pep_opt_parallel.cc index 0500f27b11..b344cb8085 100644 --- a/source/src/apps/pilot/chrisk/pep_opt_parallel.cc +++ b/source/src/apps/pilot/chrisk/pep_opt_parallel.cc @@ -725,7 +725,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_paapp.cc b/source/src/apps/pilot/chrisk/pep_paapp.cc index 0500ef7546..f3f92c88d1 100644 --- a/source/src/apps/pilot/chrisk/pep_paapp.cc +++ b/source/src/apps/pilot/chrisk/pep_paapp.cc @@ -783,7 +783,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_prep.cc b/source/src/apps/pilot/chrisk/pep_prep.cc index 3f4c494a60..0eb071a1b0 100644 --- a/source/src/apps/pilot/chrisk/pep_prep.cc +++ b/source/src/apps/pilot/chrisk/pep_prep.cc @@ -1242,7 +1242,7 @@ int main( int argc, char * argv [] ) run_pep_prep(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_prepspec.cc b/source/src/apps/pilot/chrisk/pep_prepspec.cc index 3a01191e71..c4b3e5d05a 100644 --- a/source/src/apps/pilot/chrisk/pep_prepspec.cc +++ b/source/src/apps/pilot/chrisk/pep_prepspec.cc @@ -1278,7 +1278,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_rama.cc b/source/src/apps/pilot/chrisk/pep_rama.cc index 158a4fde1d..185fa3f835 100644 --- a/source/src/apps/pilot/chrisk/pep_rama.cc +++ b/source/src/apps/pilot/chrisk/pep_rama.cc @@ -678,7 +678,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_ref.cc b/source/src/apps/pilot/chrisk/pep_ref.cc index f12a228485..af01d3d4f6 100644 --- a/source/src/apps/pilot/chrisk/pep_ref.cc +++ b/source/src/apps/pilot/chrisk/pep_ref.cc @@ -891,7 +891,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_spec.03-11.cc b/source/src/apps/pilot/chrisk/pep_spec.03-11.cc index 6d482f2eff..8e351f59ef 100644 --- a/source/src/apps/pilot/chrisk/pep_spec.03-11.cc +++ b/source/src/apps/pilot/chrisk/pep_spec.03-11.cc @@ -1120,7 +1120,7 @@ int main( int argc, char * argv [] ) RunPepSpec(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_spec.06-23.cc b/source/src/apps/pilot/chrisk/pep_spec.06-23.cc index fe7a51dc3a..bc5e864c84 100644 --- a/source/src/apps/pilot/chrisk/pep_spec.06-23.cc +++ b/source/src/apps/pilot/chrisk/pep_spec.06-23.cc @@ -1322,7 +1322,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_spec.cc b/source/src/apps/pilot/chrisk/pep_spec.cc index 7171bf1e31..662ce2a1fd 100644 --- a/source/src/apps/pilot/chrisk/pep_spec.cc +++ b/source/src/apps/pilot/chrisk/pep_spec.cc @@ -1374,7 +1374,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_spec_flx.cc b/source/src/apps/pilot/chrisk/pep_spec_flx.cc index 49af1fd400..2d99e67721 100644 --- a/source/src/apps/pilot/chrisk/pep_spec_flx.cc +++ b/source/src/apps/pilot/chrisk/pep_spec_flx.cc @@ -1925,7 +1925,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pep_spec_flx.mov.cc b/source/src/apps/pilot/chrisk/pep_spec_flx.mov.cc index 1d247798e3..f5832ff9a4 100644 --- a/source/src/apps/pilot/chrisk/pep_spec_flx.mov.cc +++ b/source/src/apps/pilot/chrisk/pep_spec_flx.mov.cc @@ -1810,7 +1810,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pepspec.cc b/source/src/apps/pilot/chrisk/pepspec.cc index 7064f8bcbb..bbdfaae16e 100644 --- a/source/src/apps/pilot/chrisk/pepspec.cc +++ b/source/src/apps/pilot/chrisk/pepspec.cc @@ -1961,7 +1961,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/pepspec_anchor_dock.cc b/source/src/apps/pilot/chrisk/pepspec_anchor_dock.cc index eff92186d0..e27d8277d3 100644 --- a/source/src/apps/pilot/chrisk/pepspec_anchor_dock.cc +++ b/source/src/apps/pilot/chrisk/pepspec_anchor_dock.cc @@ -1241,7 +1241,7 @@ int main( int argc, char * argv [] ) run_pep_prep(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chrisk/rotamer_repack.cc b/source/src/apps/pilot/chrisk/rotamer_repack.cc index a02c276b38..290b8bc656 100644 --- a/source/src/apps/pilot/chrisk/rotamer_repack.cc +++ b/source/src/apps/pilot/chrisk/rotamer_repack.cc @@ -1097,7 +1097,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/christophe/PCS_main.cc b/source/src/apps/pilot/christophe/PCS_main.cc index 5a69a3c15e..b4d3500b8b 100644 --- a/source/src/apps/pilot/christophe/PCS_main.cc +++ b/source/src/apps/pilot/christophe/PCS_main.cc @@ -310,7 +310,7 @@ main( int argc, char* argv [] ) TR_PCS_main << "It is going to crash for unknown reason" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chu/loop_test.cc b/source/src/apps/pilot/chu/loop_test.cc index c1cf740d97..4d7ce3a476 100644 --- a/source/src/apps/pilot/chu/loop_test.cc +++ b/source/src/apps/pilot/chu/loop_test.cc @@ -56,7 +56,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/chu/zinc_stat.cc b/source/src/apps/pilot/chu/zinc_stat.cc index 42a102e054..a998af1be7 100644 --- a/source/src/apps/pilot/chu/zinc_stat.cc +++ b/source/src/apps/pilot/chu/zinc_stat.cc @@ -156,7 +156,7 @@ main( int argc, char * argv [] ) } // finish this pdb outfile.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/close_loops_cart.cc b/source/src/apps/pilot/cmiles/close_loops_cart.cc index 1af96814d0..4fe384bc72 100644 --- a/source/src/apps/pilot/cmiles/close_loops_cart.cc +++ b/source/src/apps/pilot/cmiles/close_loops_cart.cc @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) { minimizer.run(*pose, mm, *score, options_lbfgs); pose->dump_pdb("ending_cart.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/close_loops_ccd.cc b/source/src/apps/pilot/cmiles/close_loops_ccd.cc index 2eb05864f2..6f0f7e0078 100644 --- a/source/src/apps/pilot/cmiles/close_loops_ccd.cc +++ b/source/src/apps/pilot/cmiles/close_loops_ccd.cc @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) { closure.apply(*pose); pose->dump_pdb("ending_ccd.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/dssp.cc b/source/src/apps/pilot/cmiles/dssp.cc index b0f3d74d0e..5d4ab48a05 100644 --- a/source/src/apps/pilot/cmiles/dssp.cc +++ b/source/src/apps/pilot/cmiles/dssp.cc @@ -44,7 +44,7 @@ int main(int argc, char* argv[]) { std::cout << i << "\t" << info->number(i) << "\t" << dssp.get_dssp_secstruct(i) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/extend.cc b/source/src/apps/pilot/cmiles/extend.cc index 753f88df01..49923c5e3b 100644 --- a/source/src/apps/pilot/cmiles/extend.cc +++ b/source/src/apps/pilot/cmiles/extend.cc @@ -95,7 +95,7 @@ int main(int argc, char* argv[]) { pose.dump_pdb("pose_final.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/fragment_rmsd.cc b/source/src/apps/pilot/cmiles/fragment_rmsd.cc index 013742760a..8f01dab357 100644 --- a/source/src/apps/pilot/cmiles/fragment_rmsd.cc +++ b/source/src/apps/pilot/cmiles/fragment_rmsd.cc @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/gdtha.cc b/source/src/apps/pilot/cmiles/gdtha.cc index 47c29ce70d..551c526cea 100644 --- a/source/src/apps/pilot/cmiles/gdtha.cc +++ b/source/src/apps/pilot/cmiles/gdtha.cc @@ -47,7 +47,7 @@ int main(int argc, char* argv[]) { cout << core::scoring::gdtha(*ref, **i, all_residues) << endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/helix_rotate.cc b/source/src/apps/pilot/cmiles/helix_rotate.cc index 4967eebb25..97c6bf4ad0 100644 --- a/source/src/apps/pilot/cmiles/helix_rotate.cc +++ b/source/src/apps/pilot/cmiles/helix_rotate.cc @@ -57,7 +57,7 @@ int main(int argc, char* argv[]) { devel::init(argc, argv); protocols::viewer::viewer_main(viewer_main); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/jumping.cc b/source/src/apps/pilot/cmiles/jumping.cc index 924ef478e0..f35bcb88de 100644 --- a/source/src/apps/pilot/cmiles/jumping.cc +++ b/source/src/apps/pilot/cmiles/jumping.cc @@ -44,7 +44,7 @@ int main(int argc, char* argv[]) { std::cout << "orientation: " << orientation << std::endl; std::cout << "pleating: " << pleating << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/kcluster.cc b/source/src/apps/pilot/cmiles/kcluster.cc index 068128d7ad..f3626a477a 100644 --- a/source/src/apps/pilot/cmiles/kcluster.cc +++ b/source/src/apps/pilot/cmiles/kcluster.cc @@ -207,7 +207,7 @@ int main(int argc, char* argv[]) { assign_models(models, centroids, &assignments); write_output_files(models, centroids, assignments); write_distances(models, centroids, assignments); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/maxsub.cc b/source/src/apps/pilot/cmiles/maxsub.cc index bacdcb70a5..1192e9aa62 100644 --- a/source/src/apps/pilot/cmiles/maxsub.cc +++ b/source/src/apps/pilot/cmiles/maxsub.cc @@ -45,7 +45,7 @@ int main(int argc, char* argv[]) { for (utility::vector1::const_iterator i = models.begin(); i != models.end(); ++i) { cout << core::scoring::gdtha(*ref, **i, all_residues) << endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/medal.cc b/source/src/apps/pilot/cmiles/medal.cc index d14ce5b4e6..d486d03138 100644 --- a/source/src/apps/pilot/cmiles/medal.cc +++ b/source/src/apps/pilot/cmiles/medal.cc @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { devel::init(argc, argv); protocols::viewer::viewer_main( protocols::medal::Medal_main); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/medal_exchange.cc b/source/src/apps/pilot/cmiles/medal_exchange.cc index 4ff77e720b..164264189a 100644 --- a/source/src/apps/pilot/cmiles/medal_exchange.cc +++ b/source/src/apps/pilot/cmiles/medal_exchange.cc @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { devel::init(argc, argv); protocols::viewer::viewer_main( protocols::medal::MedalExchange_main); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/rmsd_partial_thread.cc b/source/src/apps/pilot/cmiles/rmsd_partial_thread.cc index 062202eed9..69ba0dee22 100644 --- a/source/src/apps/pilot/cmiles/rmsd_partial_thread.cc +++ b/source/src/apps/pilot/cmiles/rmsd_partial_thread.cc @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) { Real rmsd = core::scoring::CA_rmsd(*reference, *partial_thread, residues); Real gdtmm = core::scoring::CA_gdtmm(*reference, *partial_thread, residues); cout << "rmsd: " << rmsd << ", gdtmm: " << gdtmm << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/sheet_translate.cc b/source/src/apps/pilot/cmiles/sheet_translate.cc index 454653a283..a6bb1d0339 100644 --- a/source/src/apps/pilot/cmiles/sheet_translate.cc +++ b/source/src/apps/pilot/cmiles/sheet_translate.cc @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) { try{ devel::init(argc, argv); protocols::viewer::viewer_main(viewer_main); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/star_abinitio.cc b/source/src/apps/pilot/cmiles/star_abinitio.cc index 17f8c1a5a3..9da828ae13 100644 --- a/source/src/apps/pilot/cmiles/star_abinitio.cc +++ b/source/src/apps/pilot/cmiles/star_abinitio.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include // Project headers #include @@ -65,7 +65,7 @@ void* star_main(void*) { try { JobDistributor::get_instance()->go(mover); - } catch (utility::excn::EXCN_Base& e) { + } catch (utility::excn::Exception& e) { std::cerr << "Exception: " << std::endl; e.show(std::cerr); } @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) { try { devel::init(argc, argv); protocols::viewer::viewer_main(star_main); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/windowed_rama.cc b/source/src/apps/pilot/cmiles/windowed_rama.cc index cdeba4e0a8..91d2c9c7ce 100644 --- a/source/src/apps/pilot/cmiles/windowed_rama.cc +++ b/source/src/apps/pilot/cmiles/windowed_rama.cc @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) { for (Size i = 1; i <= ramas.size(); ++i) { std::cout << "rama " << i << " " << ramas[i] << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/cmiles/windowed_rmsd.cc b/source/src/apps/pilot/cmiles/windowed_rmsd.cc index 5a70ae18a2..accf06c077 100644 --- a/source/src/apps/pilot/cmiles/windowed_rmsd.cc +++ b/source/src/apps/pilot/cmiles/windowed_rmsd.cc @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) { compute_windowed_rmsd(*reference, model, window, &rmsds); show(filename, rmsds); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/colin/backrub_pilot.cc b/source/src/apps/pilot/colin/backrub_pilot.cc index 7540d6e6da..1855594b6d 100644 --- a/source/src/apps/pilot/colin/backrub_pilot.cc +++ b/source/src/apps/pilot/colin/backrub_pilot.cc @@ -112,7 +112,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); -} catch ( utility::excn::EXCN_Base const & e ) { +} catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/colin/cterdesign.cc b/source/src/apps/pilot/colin/cterdesign.cc index b6e2cd70e8..f5ed21e200 100644 --- a/source/src/apps/pilot/colin/cterdesign.cc +++ b/source/src/apps/pilot/colin/cterdesign.cc @@ -113,7 +113,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/colin/ig_dump.cc b/source/src/apps/pilot/colin/ig_dump.cc index afa89ccd93..5bce1da9b1 100644 --- a/source/src/apps/pilot/colin/ig_dump.cc +++ b/source/src/apps/pilot/colin/ig_dump.cc @@ -188,7 +188,7 @@ main( int argc, char * argv [] ) } } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/colin/mm_params.cc b/source/src/apps/pilot/colin/mm_params.cc index c65ba68997..719765bbab 100644 --- a/source/src/apps/pilot/colin/mm_params.cc +++ b/source/src/apps/pilot/colin/mm_params.cc @@ -248,7 +248,7 @@ main branchopt.write_undefined_coef1("branch_angle_1_undefined.txt"); branchopt.write_undefined_coef2("branch_angle_2_undefined.txt"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/combss/generate_orbital_statistics.cc b/source/src/apps/pilot/combss/generate_orbital_statistics.cc index deb32b7825..939ae5aa8e 100644 --- a/source/src/apps/pilot/combss/generate_orbital_statistics.cc +++ b/source/src/apps/pilot/combss/generate_orbital_statistics.cc @@ -166,7 +166,7 @@ int main( int argc, char * argv [] ) } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/combss/sequencerecovery.cc b/source/src/apps/pilot/combss/sequencerecovery.cc index 3b12757205..65826651bf 100644 --- a/source/src/apps/pilot/combss/sequencerecovery.cc +++ b/source/src/apps/pilot/combss/sequencerecovery.cc @@ -691,7 +691,7 @@ int main( int argc, char* argv[] ) { TR << "Measuring sequence recovery" << std::endl; measure_sequence_recovery( native_poses, redesign_poses ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/csykang/make_retroinverso.cc b/source/src/apps/pilot/csykang/make_retroinverso.cc index d69b9c0252..232ba2d9aa 100644 --- a/source/src/apps/pilot/csykang/make_retroinverso.cc +++ b/source/src/apps/pilot/csykang/make_retroinverso.cc @@ -286,7 +286,7 @@ main( int argc, char * argv [] ) newpose->dump_pdb("output.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/LoopExtend.cc b/source/src/apps/pilot/dan/LoopExtend.cc index de72dc5f43..05aac5e9a6 100644 --- a/source/src/apps/pilot/dan/LoopExtend.cc +++ b/source/src/apps/pilot/dan/LoopExtend.cc @@ -108,7 +108,7 @@ main( int argc, char* argv[] ) pose.dump_pdb(outfile); tr << "success" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/angle_stats.cc b/source/src/apps/pilot/dan/angle_stats.cc index 84b0c9134f..802147c56f 100644 --- a/source/src/apps/pilot/dan/angle_stats.cc +++ b/source/src/apps/pilot/dan/angle_stats.cc @@ -53,7 +53,7 @@ main( int argc, char * argv [] ) // options, random initialization devel::init( argc, argv ); protocols::viewer::viewer_main( anglestats_local ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/generate_matcher_constraints.cc b/source/src/apps/pilot/dan/generate_matcher_constraints.cc index fe6c932be8..8c7829bdaf 100644 --- a/source/src/apps/pilot/dan/generate_matcher_constraints.cc +++ b/source/src/apps/pilot/dan/generate_matcher_constraints.cc @@ -328,7 +328,7 @@ int main( int argc, char * argv [] ) TR << "torsion_A " << numeric::constants::d::radians_to_degrees * numeric::dihedral_radians( vu1, vd1, vd2, vd3 ) << std::endl; TR << "torsion_AB " << numeric::constants::d::radians_to_degrees * numeric::dihedral_radians( vu2, vu1, vd1, vd2 ) << std::endl; TR << "torsion_B " << numeric::constants::d::radians_to_degrees * numeric::dihedral_radians( vu3, vu2, vu1, vd1 ) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/kinematic_relax_test.cc b/source/src/apps/pilot/dan/kinematic_relax_test.cc index 5a2155e337..fbf89b589d 100644 --- a/source/src/apps/pilot/dan/kinematic_relax_test.cc +++ b/source/src/apps/pilot/dan/kinematic_relax_test.cc @@ -104,7 +104,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/loop_minimize.cc b/source/src/apps/pilot/dan/loop_minimize.cc index 8f5fe844b2..39ce042138 100644 --- a/source/src/apps/pilot/dan/loop_minimize.cc +++ b/source/src/apps/pilot/dan/loop_minimize.cc @@ -347,7 +347,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dan/sidechain_min.cc b/source/src/apps/pilot/dan/sidechain_min.cc index 6c0667f8fa..a0ecf8f1b1 100644 --- a/source/src/apps/pilot/dan/sidechain_min.cc +++ b/source/src/apps/pilot/dan/sidechain_min.cc @@ -337,7 +337,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dekim/convert_to_centroid.cc b/source/src/apps/pilot/dekim/convert_to_centroid.cc index 3bb2a6ff74..3d4f4b1ce6 100644 --- a/source/src/apps/pilot/dekim/convert_to_centroid.cc +++ b/source/src/apps/pilot/dekim/convert_to_centroid.cc @@ -120,13 +120,13 @@ main( int argc, char * argv [] ) try{ JobDistributor::get_instance()->go( mymover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dekim/decoy_features.cc b/source/src/apps/pilot/dekim/decoy_features.cc index c72bdf31f0..d8710a7af5 100644 --- a/source/src/apps/pilot/dekim/decoy_features.cc +++ b/source/src/apps/pilot/dekim/decoy_features.cc @@ -238,7 +238,7 @@ main( int argc, char * argv [] ) try { protocols::jd2::JobDistributor::get_instance()->go(jd_mover); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; @@ -290,7 +290,7 @@ main( int argc, char * argv [] ) TR << "*********************successful completion**************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dekim/extended_chain.cc b/source/src/apps/pilot/dekim/extended_chain.cc index e79cf7f091..d87c98892d 100644 --- a/source/src/apps/pilot/dekim/extended_chain.cc +++ b/source/src/apps/pilot/dekim/extended_chain.cc @@ -119,7 +119,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go( mymover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; diff --git a/source/src/apps/pilot/dekim/score_nonlocal_frags.cc b/source/src/apps/pilot/dekim/score_nonlocal_frags.cc index 36aeba2221..e08454d211 100644 --- a/source/src/apps/pilot/dekim/score_nonlocal_frags.cc +++ b/source/src/apps/pilot/dekim/score_nonlocal_frags.cc @@ -318,7 +318,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->set_job_outputter( JobDistributorFactory::create_job_outputter( jobout )); JobDistributor::get_instance()->go( scoremover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; diff --git a/source/src/apps/pilot/dekim/strand_pairings.cc b/source/src/apps/pilot/dekim/strand_pairings.cc index 91b88978fb..dbee2652bc 100644 --- a/source/src/apps/pilot/dekim/strand_pairings.cc +++ b/source/src/apps/pilot/dekim/strand_pairings.cc @@ -136,7 +136,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->set_job_outputter( JobDistributorFactory::create_job_outputter( jobout )); JobDistributor::get_instance()->go( mymover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; diff --git a/source/src/apps/pilot/delucasl/RotamerDump.cc b/source/src/apps/pilot/delucasl/RotamerDump.cc index 7514a87de2..b402068d58 100644 --- a/source/src/apps/pilot/delucasl/RotamerDump.cc +++ b/source/src/apps/pilot/delucasl/RotamerDump.cc @@ -73,7 +73,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go(rotamer_mover); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1 } diff --git a/source/src/apps/pilot/delucasl/generate_ligand_start_position_file.cc b/source/src/apps/pilot/delucasl/generate_ligand_start_position_file.cc index b3954be3ed..5f925133dc 100644 --- a/source/src/apps/pilot/delucasl/generate_ligand_start_position_file.cc +++ b/source/src/apps/pilot/delucasl/generate_ligand_start_position_file.cc @@ -78,7 +78,7 @@ int main(int argc, char*argv[]) outfile.open(outfile_path.c_str()); outfile <write_all_grids("test_"); //protocols::ligand_docking::qsar::qsarMoverOP - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/delucasl/ligands_to_database.cc b/source/src/apps/pilot/delucasl/ligands_to_database.cc index 0552941b1d..59a1c4cdd7 100644 --- a/source/src/apps/pilot/delucasl/ligands_to_database.cc +++ b/source/src/apps/pilot/delucasl/ligands_to_database.cc @@ -63,7 +63,7 @@ int main(int argc, char*argv[]) residue_database_io.write_residuetype_to_database("fa_standard",*new_residue_type,db_session); } } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/delucasl/params_tester.cc b/source/src/apps/pilot/delucasl/params_tester.cc index 2fbe6b8fa2..14240422fe 100644 --- a/source/src/apps/pilot/delucasl/params_tester.cc +++ b/source/src/apps/pilot/delucasl/params_tester.cc @@ -23,7 +23,7 @@ int main(int argc, char* argv[]) core::chemical::ResidueTypeSetCAP residue_types = core::chemical::ChemicalManager::get_instance()->residue_type_set("fa_standard"); - }catch ( utility::excn::EXCN_Base const & e ) { + }catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/delucasl/process_mdl.cc b/source/src/apps/pilot/delucasl/process_mdl.cc index 34cb8f7505..5a21aa2189 100644 --- a/source/src/apps/pilot/delucasl/process_mdl.cc +++ b/source/src/apps/pilot/delucasl/process_mdl.cc @@ -91,7 +91,7 @@ int main(int argc, char*argv[]) std::cout <<"wrote molfile" <set_movemap(movemap); // RUN abrelax->fold(init_pose, prot_ptr); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/AllCrmsd.cc b/source/src/apps/pilot/dgront/experiments/AllCrmsd.cc index 4826d34611..5e0d8ff52d 100644 --- a/source/src/apps/pilot/dgront/experiments/AllCrmsd.cc +++ b/source/src/apps/pilot/dgront/experiments/AllCrmsd.cc @@ -142,7 +142,7 @@ int main( int argc, char * argv [] ) { Size cnt = all.calculate(); time_end = time(NULL); trAllCrmsd << "Computed " << cnt <<" crmsd values in "<<(time_end - time_start)<<" seconds"<rebuildAndDetectDisulfideBond(init_pose, id1, -72.029, id2, -69.2231) << std::endl; // tabulate(init_pose, id1, id2); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/DumpConstraints.cc b/source/src/apps/pilot/dgront/experiments/DumpConstraints.cc index b818a4b3ed..098713fc0a 100644 --- a/source/src/apps/pilot/dgront/experiments/DumpConstraints.cc +++ b/source/src/apps/pilot/dgront/experiments/DumpConstraints.cc @@ -79,7 +79,7 @@ int main(int argc, char * argv[]) { for ( utility::vector1::iterator it = csts.begin(), end = csts.end(); it != end; ++it ) { (*it)->show_def(std::cout, init_pose); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/GunnTest.cc b/source/src/apps/pilot/dgront/experiments/GunnTest.cc index f9b613acb5..82edd54b55 100644 --- a/source/src/apps/pilot/dgront/experiments/GunnTest.cc +++ b/source/src/apps/pilot/dgront/experiments/GunnTest.cc @@ -111,7 +111,7 @@ int main(int argc, char * argv[]) { GunnTest test; not_universal_main( test ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/RDCTest.cc b/source/src/apps/pilot/dgront/experiments/RDCTest.cc index e5da33f33e..de340d67b1 100644 --- a/source/src/apps/pilot/dgront/experiments/RDCTest.cc +++ b/source/src/apps/pilot/dgront/experiments/RDCTest.cc @@ -96,7 +96,7 @@ int main(int argc, char * argv[]) { for ( residual_dipolar_coupling::RDC_lines::const_iterator it = out_rdcs.begin(); it != out_rdcs.end(); ++it ) { std::cout << *it; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } @@ -215,7 +215,7 @@ void evaluate_score(core::pose::PoseOP pose, utility::vector1< } try { m_inv_gen(T_, 5, T_); - } catch (utility::excn::EXCN_BadInput &excn) { + } catch (utility::excn::BadInput &excn) { if (trace.Debug) { pose->dump_pdb("failed_jacobi.pdb"); } @@ -340,7 +340,7 @@ void read_RDC_file(std::string const & filename, utility::vector1< if (line_stream.fail()) { trace.Error << "couldn't read line " << line << " in rdc-file " << filename << "\n"; - throw(utility::excn::EXCN_BadInput(" invalid line " + line + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " invalid line " + line + " in rdc-file " + filename)); } @@ -476,7 +476,7 @@ void jacobi(Real a[5][5], Real d[], Real v[5][5], int *nrot) { } } //probably different type of Exception is better suited - throw(utility::excn::EXCN_BadInput( + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " too many iterations in Jacobi when compute RDC tensor")); } diff --git a/source/src/apps/pilot/dgront/experiments/TryScoreFilter.cc b/source/src/apps/pilot/dgront/experiments/TryScoreFilter.cc index 6d6a2f707a..45d66ffe14 100644 --- a/source/src/apps/pilot/dgront/experiments/TryScoreFilter.cc +++ b/source/src/apps/pilot/dgront/experiments/TryScoreFilter.cc @@ -186,7 +186,7 @@ int main( int argc, char * argv [] ) { TryScoreFilter job; job.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/call_mover.cc b/source/src/apps/pilot/dgront/experiments/call_mover.cc index eb1e5c790f..ca5fb1471b 100644 --- a/source/src/apps/pilot/dgront/experiments/call_mover.cc +++ b/source/src/apps/pilot/dgront/experiments/call_mover.cc @@ -102,7 +102,7 @@ main( int argc, char * argv [] ) use_backrub(pose,scorefxn); std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/call_rdc.cc b/source/src/apps/pilot/dgront/experiments/call_rdc.cc index c63921658f..a404264b85 100644 --- a/source/src/apps/pilot/dgront/experiments/call_rdc.cc +++ b/source/src/apps/pilot/dgront/experiments/call_rdc.cc @@ -102,7 +102,7 @@ main( int argc, char * argv [] ) { } std::cout << ires << " : " << rdc_on_Nmer.compute_dipscore(frag_pose) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/convert_frags.cc b/source/src/apps/pilot/dgront/experiments/convert_frags.cc index b93aaec4f7..7b7ef86807 100644 --- a/source/src/apps/pilot/dgront/experiments/convert_frags.cc +++ b/source/src/apps/pilot/dgront/experiments/convert_frags.cc @@ -49,7 +49,7 @@ main( int argc, char * argv [] ) { ConstantLengthFragSetOP frags = new ConstantLengthFragSet; std::string filename = "frags.9mers"; frags->read_fragment_file( filename ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/print_options.cc b/source/src/apps/pilot/dgront/experiments/print_options.cc index d9f6e2fb18..5dcbd60d3b 100644 --- a/source/src/apps/pilot/dgront/experiments/print_options.cc +++ b/source/src/apps/pilot/dgront/experiments/print_options.cc @@ -82,7 +82,7 @@ int main( int argc, char * argv [] ) { std::cout << "\t\t" << o->name() << "\n"; std::cout << "\t\n"; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/read_profile.cc b/source/src/apps/pilot/dgront/experiments/read_profile.cc index 7edd798752..6101872746 100644 --- a/source/src/apps/pilot/dgront/experiments/read_profile.cc +++ b/source/src/apps/pilot/dgront/experiments/read_profile.cc @@ -53,7 +53,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/experiments/welde_chains.cc b/source/src/apps/pilot/dgront/experiments/welde_chains.cc index 9904cf4528..5d595736ac 100644 --- a/source/src/apps/pilot/dgront/experiments/welde_chains.cc +++ b/source/src/apps/pilot/dgront/experiments/welde_chains.cc @@ -52,7 +52,7 @@ main( int argc, char * argv [] ) { // execution protocols::jd2::JobDistributor::get_instance()->go(mover); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/filters_in_abrelax.cc b/source/src/apps/pilot/dgront/filters_in_abrelax.cc index a1aa78207a..1d80abd1f4 100644 --- a/source/src/apps/pilot/dgront/filters_in_abrelax.cc +++ b/source/src/apps/pilot/dgront/filters_in_abrelax.cc @@ -48,10 +48,10 @@ int main( int argc, char * argv [] ) { try { protocols::abinitio::AbrelaxMover runMe; not_universal_main( runMe ); - } catch ( utility::excn::EXCN_Base &excn ) { + } catch (utility::excn::Exception &excn ) { std::cerr<< excn.msg() <bounded_protocol(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/fragmentpicker/fragmentpicker_integration_demo.cc b/source/src/apps/pilot/dgront/fragmentpicker/fragmentpicker_integration_demo.cc index 413a88d458..ab6f40af7d 100644 --- a/source/src/apps/pilot/dgront/fragmentpicker/fragmentpicker_integration_demo.cc +++ b/source/src/apps/pilot/dgront/fragmentpicker/fragmentpicker_integration_demo.cc @@ -136,7 +136,7 @@ int main(int argc, char * argv[]) { //----------- WE SET UP BOUNDED COLLECTOR, WE RUN BOUNDED PROTOCOL //----------- TO RUN QUOTA PROTOCOL, ONE HAS TO SET UP QUOTA SELECTOR AND QUOTA COLLECTOR my_picker->bounded_protocol(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/fragmentpicker/picker.cc b/source/src/apps/pilot/dgront/fragmentpicker/picker.cc index 70f9e55ef8..b260e8bb60 100644 --- a/source/src/apps/pilot/dgront/fragmentpicker/picker.cc +++ b/source/src/apps/pilot/dgront/fragmentpicker/picker.cc @@ -125,7 +125,7 @@ int main(int argc, char * argv[]) { } basic::prof_show(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/fragmentpicker/quotapicker_demo.cc b/source/src/apps/pilot/dgront/fragmentpicker/quotapicker_demo.cc index b5ee92f39b..07fa00d58b 100644 --- a/source/src/apps/pilot/dgront/fragmentpicker/quotapicker_demo.cc +++ b/source/src/apps/pilot/dgront/fragmentpicker/quotapicker_demo.cc @@ -341,7 +341,7 @@ int main(int argc, char * argv[]) { //----------- TO RUN QUOTA PROTOCOL, ONE HAS TO SET UP QUOTA SELECTOR AND QUOTA COLLECTOR my_picker->quota_protocol(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/fragmentpicker/rescore_fragments.cc b/source/src/apps/pilot/dgront/fragmentpicker/rescore_fragments.cc index 341052c556..11bba54bfe 100644 --- a/source/src/apps/pilot/dgront/fragmentpicker/rescore_fragments.cc +++ b/source/src/apps/pilot/dgront/fragmentpicker/rescore_fragments.cc @@ -114,7 +114,7 @@ int main(int argc, char * argv[]) { pickIt->get_score_manager()->describe_fragments(frags_rescored, std::cerr); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/hierarchical_clustering.cc b/source/src/apps/pilot/dgront/hierarchical_clustering.cc index f12b5aad82..833f5422b8 100644 --- a/source/src/apps/pilot/dgront/hierarchical_clustering.cc +++ b/source/src/apps/pilot/dgront/hierarchical_clustering.cc @@ -137,7 +137,7 @@ int main( int argc, char * argv [] ) { } std::cout<<"\n"; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/ComputeSAXSSpectrum.cc b/source/src/apps/pilot/dgront/saxs/ComputeSAXSSpectrum.cc index 8465677226..43ee24213d 100644 --- a/source/src/apps/pilot/dgront/saxs/ComputeSAXSSpectrum.cc +++ b/source/src/apps/pilot/dgront/saxs/ComputeSAXSSpectrum.cc @@ -101,7 +101,7 @@ int main( int argc, char * argv [] ) { not_universal_main( debay ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/RescorePDDF.cc b/source/src/apps/pilot/dgront/saxs/RescorePDDF.cc index 3f44c6eeed..95ac7ee63c 100644 --- a/source/src/apps/pilot/dgront/saxs/RescorePDDF.cc +++ b/source/src/apps/pilot/dgront/saxs/RescorePDDF.cc @@ -125,7 +125,7 @@ int main( int argc, char * argv [] ) { RescorePDDF rescore; not_universal_main( rescore ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/RescoreSAXS.cc b/source/src/apps/pilot/dgront/saxs/RescoreSAXS.cc index 0e12f71bb5..fbd7a8e96f 100644 --- a/source/src/apps/pilot/dgront/saxs/RescoreSAXS.cc +++ b/source/src/apps/pilot/dgront/saxs/RescoreSAXS.cc @@ -106,7 +106,7 @@ int main( int argc, char * argv [] ) { RescoreSAXS debay; not_universal_main( debay ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/RotateSAXS.cc b/source/src/apps/pilot/dgront/saxs/RotateSAXS.cc index f336f7ffd6..4e21a7c978 100644 --- a/source/src/apps/pilot/dgront/saxs/RotateSAXS.cc +++ b/source/src/apps/pilot/dgront/saxs/RotateSAXS.cc @@ -115,7 +115,7 @@ int main( int argc, char * argv [] ) { RotateSAXS debay; not_universal_main( debay ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/assemble_domains_with_saxs_jd2.cc b/source/src/apps/pilot/dgront/saxs/assemble_domains_with_saxs_jd2.cc index 14129ca4be..32a9a3dcb2 100644 --- a/source/src/apps/pilot/dgront/saxs/assemble_domains_with_saxs_jd2.cc +++ b/source/src/apps/pilot/dgront/saxs/assemble_domains_with_saxs_jd2.cc @@ -121,7 +121,7 @@ main( int argc, char * argv [] ) { // execution JobDistributor::get_instance()->go(container); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/call_saxs_score.cc b/source/src/apps/pilot/dgront/saxs/call_saxs_score.cc index a9595112af..80882641f2 100644 --- a/source/src/apps/pilot/dgront/saxs/call_saxs_score.cc +++ b/source/src/apps/pilot/dgront/saxs/call_saxs_score.cc @@ -125,7 +125,7 @@ int main( int argc, char * argv [] ) { std::cout << std::endl; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/saxs/linker_sampler.cc b/source/src/apps/pilot/dgront/saxs/linker_sampler.cc index 87b6855645..d2308ccd21 100644 --- a/source/src/apps/pilot/dgront/saxs/linker_sampler.cc +++ b/source/src/apps/pilot/dgront/saxs/linker_sampler.cc @@ -226,7 +226,7 @@ int main( int argc, char * argv [] ) { DomainAssemblerNDocker job; job.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dgront/tnm_sampler.cc b/source/src/apps/pilot/dgront/tnm_sampler.cc index f88f59c23e..0e0aac737a 100644 --- a/source/src/apps/pilot/dgront/tnm_sampler.cc +++ b/source/src/apps/pilot/dgront/tnm_sampler.cc @@ -248,7 +248,7 @@ int main(int argc, char * argv[]) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/Cyclize.cc b/source/src/apps/pilot/doug/Cyclize.cc index 91b764427e..f532f4a9e6 100644 --- a/source/src/apps/pilot/doug/Cyclize.cc +++ b/source/src/apps/pilot/doug/Cyclize.cc @@ -70,7 +70,7 @@ main( int argc, char * argv [] ) << "| DONE |\n" << "+-----------------------------------------------------------------+" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/make_peptoid.cc b/source/src/apps/pilot/doug/make_peptoid.cc index e87bf0201a..23487ed565 100644 --- a/source/src/apps/pilot/doug/make_peptoid.cc +++ b/source/src/apps/pilot/doug/make_peptoid.cc @@ -198,7 +198,7 @@ main( int argc, char * argv [] ) std::cout << "************************************d**o**n**e***********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/number_of_residuetypes.cc b/source/src/apps/pilot/doug/number_of_residuetypes.cc index d7c6012475..03f232b4dc 100644 --- a/source/src/apps/pilot/doug/number_of_residuetypes.cc +++ b/source/src/apps/pilot/doug/number_of_residuetypes.cc @@ -50,7 +50,7 @@ main( int argc, char * argv [] ) TR << "************************************d**o**n**e***********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/pymolmovertest.cc b/source/src/apps/pilot/doug/pymolmovertest.cc index 607e3a3233..60938604bd 100644 --- a/source/src/apps/pilot/doug/pymolmovertest.cc +++ b/source/src/apps/pilot/doug/pymolmovertest.cc @@ -41,7 +41,7 @@ main( int argc, char * argv [] ) TR << "************************************d**o**n**e***********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/rotamer_prediction_benchmark.cc b/source/src/apps/pilot/doug/rotamer_prediction_benchmark.cc index 6137ae2049..64a03c0706 100644 --- a/source/src/apps/pilot/doug/rotamer_prediction_benchmark.cc +++ b/source/src/apps/pilot/doug/rotamer_prediction_benchmark.cc @@ -226,7 +226,7 @@ void rotamer_prediction_benchmark( std::string pdb_filename, ScoreFunctionOP sco << static_cast(100)*static_cast(prot_chi1_correct)/static_cast(prot_total_chi1) << "%\n"; RES << "Chi12: " << prot_chi1_chi2_correct << "/" << prot_total_chi2 << " = " << std::setprecision(3) << std::fixed << static_cast(100)*static_cast(prot_chi1_chi2_correct)/static_cast(prot_total_chi2) << "%\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/score_min_rtmin_test.cc b/source/src/apps/pilot/doug/score_min_rtmin_test.cc index 44e5de79fe..0a8c46896a 100644 --- a/source/src/apps/pilot/doug/score_min_rtmin_test.cc +++ b/source/src/apps/pilot/doug/score_min_rtmin_test.cc @@ -115,7 +115,7 @@ main( int argc, char * argv [] ) TR << "************************************d**o**n**e***********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/doug/simple_relax.cc b/source/src/apps/pilot/doug/simple_relax.cc index b01ce1f131..095b760aab 100644 --- a/source/src/apps/pilot/doug/simple_relax.cc +++ b/source/src/apps/pilot/doug/simple_relax.cc @@ -96,7 +96,7 @@ main( int argc, char * argv [] ) for ( std::vector< FileName >::iterator i = pdb_file_names.begin(), i_end = pdb_file_names.end(); i != i_end; ++i ) { simple_relax( i->name(), scfxn ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dwkulp/flexibleLoopDesign.cc b/source/src/apps/pilot/dwkulp/flexibleLoopDesign.cc index c48e015d81..bcde621cfc 100644 --- a/source/src/apps/pilot/dwkulp/flexibleLoopDesign.cc +++ b/source/src/apps/pilot/dwkulp/flexibleLoopDesign.cc @@ -451,7 +451,7 @@ int main( int argc, char * argv[] ) { fout.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/dwkulp/reportFragments.cc b/source/src/apps/pilot/dwkulp/reportFragments.cc index d41ddb6463..4ffaefca79 100644 --- a/source/src/apps/pilot/dwkulp/reportFragments.cc +++ b/source/src/apps/pilot/dwkulp/reportFragments.cc @@ -166,7 +166,7 @@ int main( int argc, char * argv[] ) { fout.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/eva/adapt_rotamers.cc b/source/src/apps/pilot/eva/adapt_rotamers.cc index a592d3d12b..0268bb3588 100644 --- a/source/src/apps/pilot/eva/adapt_rotamers.cc +++ b/source/src/apps/pilot/eva/adapt_rotamers.cc @@ -122,7 +122,7 @@ main( int argc, char * argv [] ) pose_adpt.dump_pdb( "adapted.pdb"); pose_ori.dump_pdb( "ori.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/adenosine_stack_test.cc b/source/src/apps/pilot/fcchou/adenosine_stack_test.cc index 656fcc7d49..37f3e4a007 100644 --- a/source/src/apps/pilot/fcchou/adenosine_stack_test.cc +++ b/source/src/apps/pilot/fcchou/adenosine_stack_test.cc @@ -214,7 +214,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/lariat_modeling.cc b/source/src/apps/pilot/fcchou/lariat_modeling.cc index a93689d966..91ebc76014 100644 --- a/source/src/apps/pilot/fcchou/lariat_modeling.cc +++ b/source/src/apps/pilot/fcchou/lariat_modeling.cc @@ -322,7 +322,7 @@ main( int argc, char * argv [] ) ////////////////////////////// lariat_modeling(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/non_natural_na.cc b/source/src/apps/pilot/fcchou/non_natural_na.cc index 4366c51165..9124857f0d 100644 --- a/source/src/apps/pilot/fcchou/non_natural_na.cc +++ b/source/src/apps/pilot/fcchou/non_natural_na.cc @@ -112,7 +112,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/rna_pdb_scoring.cc b/source/src/apps/pilot/fcchou/rna_pdb_scoring.cc index e61bd1060d..53ce1d27c1 100644 --- a/source/src/apps/pilot/fcchou/rna_pdb_scoring.cc +++ b/source/src/apps/pilot/fcchou/rna_pdb_scoring.cc @@ -146,7 +146,7 @@ main ( int argc, char * argv [] ) { // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main ( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/rotamer_test.cc b/source/src/apps/pilot/fcchou/rotamer_test.cc index 338040796a..0432057a70 100644 --- a/source/src/apps/pilot/fcchou/rotamer_test.cc +++ b/source/src/apps/pilot/fcchou/rotamer_test.cc @@ -183,7 +183,7 @@ main ( int argc, char * argv [] ) { try { devel::init ( argc, argv ); protocols::viewer::viewer_main ( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/swa_rna_analytical_closure.cc b/source/src/apps/pilot/fcchou/swa_rna_analytical_closure.cc index 7c80b7ac79..c6fe5ac387 100644 --- a/source/src/apps/pilot/fcchou/swa_rna_analytical_closure.cc +++ b/source/src/apps/pilot/fcchou/swa_rna_analytical_closure.cc @@ -792,7 +792,7 @@ main ( int argc, char * argv [] ) { // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main ( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/thermal_sampler_alpha.cc b/source/src/apps/pilot/fcchou/thermal_sampler_alpha.cc index 99776ed1c9..49ee08602b 100644 --- a/source/src/apps/pilot/fcchou/thermal_sampler_alpha.cc +++ b/source/src/apps/pilot/fcchou/thermal_sampler_alpha.cc @@ -229,7 +229,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/turner_test_double_helix.cc b/source/src/apps/pilot/fcchou/turner_test_double_helix.cc index 6a60f034e6..741523c236 100644 --- a/source/src/apps/pilot/fcchou/turner_test_double_helix.cc +++ b/source/src/apps/pilot/fcchou/turner_test_double_helix.cc @@ -1152,7 +1152,7 @@ main( int argc, char * argv [] ) ////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/turner_test_one_chain.cc b/source/src/apps/pilot/fcchou/turner_test_one_chain.cc index 8661e25ebd..bf72cca36e 100644 --- a/source/src/apps/pilot/fcchou/turner_test_one_chain.cc +++ b/source/src/apps/pilot/fcchou/turner_test_one_chain.cc @@ -1655,7 +1655,7 @@ main( int argc, char * argv [] ) { ////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fcchou/turner_two_chain.cc b/source/src/apps/pilot/fcchou/turner_two_chain.cc index e5ec446b75..d38fe36911 100644 --- a/source/src/apps/pilot/fcchou/turner_two_chain.cc +++ b/source/src/apps/pilot/fcchou/turner_two_chain.cc @@ -1139,7 +1139,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/firas/check_burial.cc b/source/src/apps/pilot/firas/check_burial.cc index 108b2b82d8..fc6138f08f 100644 --- a/source/src/apps/pilot/firas/check_burial.cc +++ b/source/src/apps/pilot/firas/check_burial.cc @@ -166,7 +166,7 @@ main( int argc, char* argv [] ) } // for ( unsigned int i = 1; i <= mypose->size(); ++i ) output.close(); } // for ( iter = pdbfiles.begin(); iter != pdbfiles.end(); ++iter ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/flo/EnzdesFixBB.cc b/source/src/apps/pilot/flo/EnzdesFixBB.cc index 8382c64430..1a1284e7cf 100644 --- a/source/src/apps/pilot/flo/EnzdesFixBB.cc +++ b/source/src/apps/pilot/flo/EnzdesFixBB.cc @@ -228,7 +228,7 @@ main( int argc, char * argv []) if ( num_structures_processed == 0 ) { basic::Warning() << "No structures processed. Existing output files may have been skipped, did you mean to delete them or to use the -overwrite flag?" << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/flo/SecondaryMatcher.cc b/source/src/apps/pilot/flo/SecondaryMatcher.cc index 4b102b48a5..28a6c64eda 100644 --- a/source/src/apps/pilot/flo/SecondaryMatcher.cc +++ b/source/src/apps/pilot/flo/SecondaryMatcher.cc @@ -122,7 +122,7 @@ main( int argc, char * argv []) if ( num_structures_processed == 0 ) { basic::Warning() << "No structures processed. Existing output files may have been skipped, did you mean to delete them or to use the -overwrite flag?" << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fordas/dumpstubinteractions.cc b/source/src/apps/pilot/fordas/dumpstubinteractions.cc index c7881c0e42..a35eac6a7d 100644 --- a/source/src/apps/pilot/fordas/dumpstubinteractions.cc +++ b/source/src/apps/pilot/fordas/dumpstubinteractions.cc @@ -185,7 +185,7 @@ int main( int argc, char * argv [] ) stubIdentityFile.close(); stubstubEnergyFile.close(); stubtargetEnergyFile.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/fordas/lsmgridprobe.cc b/source/src/apps/pilot/fordas/lsmgridprobe.cc index 97af8b0115..d927b4adc6 100644 --- a/source/src/apps/pilot/fordas/lsmgridprobe.cc +++ b/source/src/apps/pilot/fordas/lsmgridprobe.cc @@ -240,7 +240,7 @@ int main( int argc, char * argv [] ) MinimizingPatternSearch search(output_basename.name(), targetPose, residue, pattern, scorefxn, option[ constrain_grid ] ); search.execute(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/RBSegMove.cc b/source/src/apps/pilot/frank/RBSegMove.cc index 83fe770699..aea84fc8b2 100644 --- a/source/src/apps/pilot/frank/RBSegMove.cc +++ b/source/src/apps/pilot/frank/RBSegMove.cc @@ -51,7 +51,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( RBSegmentRelax_local_main ); else RBSegmentRelax_local_main ((void*)0); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/autorb.cc b/source/src/apps/pilot/frank/autorb.cc index 07b306bceb..1377a29432 100644 --- a/source/src/apps/pilot/frank/autorb.cc +++ b/source/src/apps/pilot/frank/autorb.cc @@ -75,7 +75,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -94,7 +94,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/calc_ssm_energies.cc b/source/src/apps/pilot/frank/calc_ssm_energies.cc index d6a05fa279..99902e4db9 100644 --- a/source/src/apps/pilot/frank/calc_ssm_energies.cc +++ b/source/src/apps/pilot/frank/calc_ssm_energies.cc @@ -525,7 +525,7 @@ int main( int argc, char * argv [] ) // main loop protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/cart_refine.cc b/source/src/apps/pilot/frank/cart_refine.cc index d1619b6e8a..9f248acbe4 100644 --- a/source/src/apps/pilot/frank/cart_refine.cc +++ b/source/src/apps/pilot/frank/cart_refine.cc @@ -159,7 +159,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( new CartRefineWrapperMover() ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -181,7 +181,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/cen_relax.cc b/source/src/apps/pilot/frank/cen_relax.cc index ab8cdef913..a8a0641ea5 100644 --- a/source/src/apps/pilot/frank/cen_relax.cc +++ b/source/src/apps/pilot/frank/cen_relax.cc @@ -127,7 +127,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR.Error << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -146,7 +146,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/cryst_design.cc b/source/src/apps/pilot/frank/cryst_design.cc index 25045970c6..2fb898e009 100644 --- a/source/src/apps/pilot/frank/cryst_design.cc +++ b/source/src/apps/pilot/frank/cryst_design.cc @@ -3177,7 +3177,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/cryst_gen.cc b/source/src/apps/pilot/frank/cryst_gen.cc index 3c949b5604..d55b5fd20f 100644 --- a/source/src/apps/pilot/frank/cryst_gen.cc +++ b/source/src/apps/pilot/frank/cryst_gen.cc @@ -1243,7 +1243,7 @@ main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } return 0; diff --git a/source/src/apps/pilot/frank/cryst_reporters.hh b/source/src/apps/pilot/frank/cryst_reporters.hh index 7ecbfa6bba..0e26ef12d0 100644 --- a/source/src/apps/pilot/frank/cryst_reporters.hh +++ b/source/src/apps/pilot/frank/cryst_reporters.hh @@ -409,7 +409,7 @@ get_sc( protocols::cryst::MakeLatticeMover &setup, core::pose::Pose & pose, core bool result = false; try { result = scc_i.Calc(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { result = false; } diff --git a/source/src/apps/pilot/frank/dock_pdb_into_density.cc b/source/src/apps/pilot/frank/dock_pdb_into_density.cc index f569a223c0..6cdf46c978 100644 --- a/source/src/apps/pilot/frank/dock_pdb_into_density.cc +++ b/source/src/apps/pilot/frank/dock_pdb_into_density.cc @@ -153,7 +153,7 @@ try { protocols::jd2::JobDistributor::get_instance()->go( dock ); -} catch ( utility::excn::EXCN_Base const & e ) { +} catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/extract_silent.cc b/source/src/apps/pilot/frank/extract_silent.cc index 5d592e5f4c..98156ad57e 100644 --- a/source/src/apps/pilot/frank/extract_silent.cc +++ b/source/src/apps/pilot/frank/extract_silent.cc @@ -103,7 +103,7 @@ main( int argc, char* argv [] ) std::string filename = outfile + iter->decoy_tag() + ".pdb"; core::io::pdb::dump_pdb( pose , filename ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/fasol_perres.cc b/source/src/apps/pilot/frank/fasol_perres.cc index ed8a5a7be1..4eacadf2d1 100644 --- a/source/src/apps/pilot/frank/fasol_perres.cc +++ b/source/src/apps/pilot/frank/fasol_perres.cc @@ -300,7 +300,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new FaSolReporter() ) ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -324,7 +324,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/fpd_symmTest.cc b/source/src/apps/pilot/frank/fpd_symmTest.cc index 62144af1e4..56be459dcf 100644 --- a/source/src/apps/pilot/frank/fpd_symmTest.cc +++ b/source/src/apps/pilot/frank/fpd_symmTest.cc @@ -44,7 +44,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -61,7 +61,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/make_rms_filtered_fragfile.cc b/source/src/apps/pilot/frank/make_rms_filtered_fragfile.cc index ad41e92166..12d1bc0aed 100644 --- a/source/src/apps/pilot/frank/make_rms_filtered_fragfile.cc +++ b/source/src/apps/pilot/frank/make_rms_filtered_fragfile.cc @@ -136,7 +136,7 @@ int main(int argc, char **argv) { oss << option[ OptionKeys::out::file::frag_prefix ]() << fraglength; FragmentIO().write_data( oss.str() , frags ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/map_morph.cc b/source/src/apps/pilot/frank/map_morph.cc index 2fd8266cf4..f8b6d471c6 100644 --- a/source/src/apps/pilot/frank/map_morph.cc +++ b/source/src/apps/pilot/frank/map_morph.cc @@ -123,7 +123,7 @@ main( int argc, char * argv [] ) try { devel::init( argc, argv ); map_morph(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/min_test.cc b/source/src/apps/pilot/frank/min_test.cc index 19a7e69a9d..2c8c4bb232 100644 --- a/source/src/apps/pilot/frank/min_test.cc +++ b/source/src/apps/pilot/frank/min_test.cc @@ -535,7 +535,7 @@ my_main( void* ) { } protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new MinTestMover() ) ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -562,7 +562,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/mirrorsymm_test.cc b/source/src/apps/pilot/frank/mirrorsymm_test.cc index e78904d8b7..a1c30d805f 100644 --- a/source/src/apps/pilot/frank/mirrorsymm_test.cc +++ b/source/src/apps/pilot/frank/mirrorsymm_test.cc @@ -182,7 +182,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new MirrorSymmTest() ) ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -200,7 +200,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/multimodel_gdt.cc b/source/src/apps/pilot/frank/multimodel_gdt.cc index 7e9ac3c41e..8dee087b29 100644 --- a/source/src/apps/pilot/frank/multimodel_gdt.cc +++ b/source/src/apps/pilot/frank/multimodel_gdt.cc @@ -122,10 +122,9 @@ main( int argc, char * argv [] ) { superimpose_tmalign ( *native , models[i]); } multimodel_gdt( *native, models ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } return 0; } - diff --git a/source/src/apps/pilot/frank/pdb_gen_cryst.cc b/source/src/apps/pilot/frank/pdb_gen_cryst.cc index d971b0b1bc..fc6e20be56 100644 --- a/source/src/apps/pilot/frank/pdb_gen_cryst.cc +++ b/source/src/apps/pilot/frank/pdb_gen_cryst.cc @@ -299,7 +299,7 @@ main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/pdb_to_map.cc b/source/src/apps/pilot/frank/pdb_to_map.cc index 39e8903e3d..8b310296c5 100644 --- a/source/src/apps/pilot/frank/pdb_to_map.cc +++ b/source/src/apps/pilot/frank/pdb_to_map.cc @@ -33,7 +33,7 @@ main( int argc, char * argv [] ) { core::scoring::electron_density::ElectronDensity edens( models, mapreso, gridspacing ); std::string outfile = option[OptionKeys::edensity::mapfile](); edens.writeMRC(outfile); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/per_atom_gradients.cc b/source/src/apps/pilot/frank/per_atom_gradients.cc index c50e6af93c..11405be00f 100644 --- a/source/src/apps/pilot/frank/per_atom_gradients.cc +++ b/source/src/apps/pilot/frank/per_atom_gradients.cc @@ -153,7 +153,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -170,7 +170,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/perturb_structure.cc b/source/src/apps/pilot/frank/perturb_structure.cc index 0119b44029..7e5b0162ba 100644 --- a/source/src/apps/pilot/frank/perturb_structure.cc +++ b/source/src/apps/pilot/frank/perturb_structure.cc @@ -127,7 +127,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/pseudo_ca_trace.cc b/source/src/apps/pilot/frank/pseudo_ca_trace.cc index 44b63acf66..eb2508ca8a 100644 --- a/source/src/apps/pilot/frank/pseudo_ca_trace.cc +++ b/source/src/apps/pilot/frank/pseudo_ca_trace.cc @@ -438,7 +438,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); traceCAs(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/rb_rms.cc b/source/src/apps/pilot/frank/rb_rms.cc index f2d3595fb9..fd3441591e 100644 --- a/source/src/apps/pilot/frank/rb_rms.cc +++ b/source/src/apps/pilot/frank/rb_rms.cc @@ -101,7 +101,7 @@ int main(int argc, char **argv) { } } // while( input.has_another_pose() ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/redesign_minimize_into_density.cc b/source/src/apps/pilot/frank/redesign_minimize_into_density.cc index 8392527c4a..9b4acd642e 100644 --- a/source/src/apps/pilot/frank/redesign_minimize_into_density.cc +++ b/source/src/apps/pilot/frank/redesign_minimize_into_density.cc @@ -128,7 +128,7 @@ main( int argc, char * argv [] ) } protocols::jd2::JobDistributor::get_instance()->go(seq_mover); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/frank/relax_viewer.cc b/source/src/apps/pilot/frank/relax_viewer.cc index 580b534054..256a46afb9 100644 --- a/source/src/apps/pilot/frank/relax_viewer.cc +++ b/source/src/apps/pilot/frank/relax_viewer.cc @@ -74,7 +74,7 @@ main( int argc, char * argv [] ) // use viewer if flag given protocols::viewer::viewer_main( relax_main_local ); relax_main_local(NULL); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/gideonla/CutOutDomain.cc b/source/src/apps/pilot/gideonla/CutOutDomain.cc index e2ed619ee9..c60920bf33 100644 --- a/source/src/apps/pilot/gideonla/CutOutDomain.cc +++ b/source/src/apps/pilot/gideonla/CutOutDomain.cc @@ -168,7 +168,7 @@ catch (int k) { clk2 = clock(); TR<<"The entire process took: "<<(clk2-clk1)/CLOCKS_PER_SEC<size(); ++i ) output.close(); } // for ( iter = pdbfiles.begin(); iter != pdbfiles.end(); ++iter ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/gktaylor/score_pdb.cc b/source/src/apps/pilot/gktaylor/score_pdb.cc index fab1493d24..eb9187385f 100644 --- a/source/src/apps/pilot/gktaylor/score_pdb.cc +++ b/source/src/apps/pilot/gktaylor/score_pdb.cc @@ -146,7 +146,7 @@ main( int argc, char* argv [] ) core::Real score = (*scorefxn)(target_pose); cout << *it << '\t' << constraint_score << '\t' << score << '\n'; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/gktaylor/score_silent.cc b/source/src/apps/pilot/gktaylor/score_silent.cc index 14f29b7fd5..39f405f198 100644 --- a/source/src/apps/pilot/gktaylor/score_silent.cc +++ b/source/src/apps/pilot/gktaylor/score_silent.cc @@ -157,7 +157,7 @@ main( int argc, char* argv [] ) core::Real gdtmm_score = CA_gdtmm(native_pose, native_pose); std::cout << "NATIVE" << '\t' << gdtmm_score << '\t' << constraint_score << '\t' << score << '\n'; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/grant/AbInitio_MPI.cc b/source/src/apps/pilot/grant/AbInitio_MPI.cc index 439b93862c..57a7729032 100644 --- a/source/src/apps/pilot/grant/AbInitio_MPI.cc +++ b/source/src/apps/pilot/grant/AbInitio_MPI.cc @@ -159,7 +159,7 @@ int main( int argc, char* argv[] ) protocols::jd2::JobDistributor::get_instance()->go(new AbInitio_MPI); TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/grant/DenovoProteinDesign_Test.cc b/source/src/apps/pilot/grant/DenovoProteinDesign_Test.cc index 0c13527c8d..0e73283ff7 100644 --- a/source/src/apps/pilot/grant/DenovoProteinDesign_Test.cc +++ b/source/src/apps/pilot/grant/DenovoProteinDesign_Test.cc @@ -140,7 +140,7 @@ main( int argc, char * argv [] ) // } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/grant/RedesignXtal_Silent.cc b/source/src/apps/pilot/grant/RedesignXtal_Silent.cc index 3720b3b473..f4c0656164 100644 --- a/source/src/apps/pilot/grant/RedesignXtal_Silent.cc +++ b/source/src/apps/pilot/grant/RedesignXtal_Silent.cc @@ -363,7 +363,7 @@ if( currentseqdis[1] <= nativeseqdis[1]+sig*nativeseqdis[1] and currentseqdis[6] // when we are done will everything we can do some more stuff - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/grant/RedesignXtal_Test.cc b/source/src/apps/pilot/grant/RedesignXtal_Test.cc index 86f0fa966a..7168972e51 100644 --- a/source/src/apps/pilot/grant/RedesignXtal_Test.cc +++ b/source/src/apps/pilot/grant/RedesignXtal_Test.cc @@ -80,7 +80,7 @@ main( int argc, char * argv [] ) protocols::jobdist::main_plain_pdb_mover( designrelaxmover, fullfxn); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_align_and_recompute_score_and_rmsd.cc b/source/src/apps/pilot/habib/david_align_and_recompute_score_and_rmsd.cc index 87c10e526c..aa806ada4c 100644 --- a/source/src/apps/pilot/habib/david_align_and_recompute_score_and_rmsd.cc +++ b/source/src/apps/pilot/habib/david_align_and_recompute_score_and_rmsd.cc @@ -325,7 +325,7 @@ main( int argc, char * argv [] ) outstream.close(); outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_align_append_and_recompute_score_and_rmsd.cc b/source/src/apps/pilot/habib/david_align_append_and_recompute_score_and_rmsd.cc index 9628a7c0f7..548947b6a5 100644 --- a/source/src/apps/pilot/habib/david_align_append_and_recompute_score_and_rmsd.cc +++ b/source/src/apps/pilot/habib/david_align_append_and_recompute_score_and_rmsd.cc @@ -378,7 +378,7 @@ main( int argc, char * argv [] ) outstream.close(); outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_darc_multirun.cc b/source/src/apps/pilot/habib/david_darc_multirun.cc index b4bcfc4a39..ed69459cf5 100644 --- a/source/src/apps/pilot/habib/david_darc_multirun.cc +++ b/source/src/apps/pilot/habib/david_darc_multirun.cc @@ -479,7 +479,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_extract_dinucleotide_musashi_reference.cc b/source/src/apps/pilot/habib/david_extract_dinucleotide_musashi_reference.cc index 0388c29dcb..48d83c54fb 100644 --- a/source/src/apps/pilot/habib/david_extract_dinucleotide_musashi_reference.cc +++ b/source/src/apps/pilot/habib/david_extract_dinucleotide_musashi_reference.cc @@ -355,7 +355,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_extract_domain.cc b/source/src/apps/pilot/habib/david_extract_domain.cc index a41380c51f..e41676c417 100644 --- a/source/src/apps/pilot/habib/david_extract_domain.cc +++ b/source/src/apps/pilot/habib/david_extract_domain.cc @@ -252,7 +252,7 @@ main( int argc, char * argv [] ) pose.pdb_info()->obsolete(false); pose.dump_pdb("test.pdb"); */ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_fill_gaps.cc b/source/src/apps/pilot/habib/david_fill_gaps.cc index c61c13a129..ef8844d5ae 100644 --- a/source/src/apps/pilot/habib/david_fill_gaps.cc +++ b/source/src/apps/pilot/habib/david_fill_gaps.cc @@ -173,7 +173,7 @@ main( int argc, char * argv [] ) pose.pdb_info()->obsolete(false); pose.dump_pdb("test.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_best_contact_pocket.cc b/source/src/apps/pilot/habib/david_find_best_contact_pocket.cc index 71c53021a1..7eb25f2a93 100644 --- a/source/src/apps/pilot/habib/david_find_best_contact_pocket.cc +++ b/source/src/apps/pilot/habib/david_find_best_contact_pocket.cc @@ -229,7 +229,7 @@ main( int argc, char * argv [] ) fb.close(); fb2.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_best_pocket.cc b/source/src/apps/pilot/habib/david_find_best_pocket.cc index 6f4a85345a..d5121ad9d6 100644 --- a/source/src/apps/pilot/habib/david_find_best_pocket.cc +++ b/source/src/apps/pilot/habib/david_find_best_pocket.cc @@ -198,7 +198,7 @@ main( int argc, char * argv [] ) */ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_complex_contacts.cc b/source/src/apps/pilot/habib/david_find_complex_contacts.cc index 23887d4a1f..17db97e182 100644 --- a/source/src/apps/pilot/habib/david_find_complex_contacts.cc +++ b/source/src/apps/pilot/habib/david_find_complex_contacts.cc @@ -137,7 +137,7 @@ main( int argc, char * argv [] ) TR << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_contacts.cc b/source/src/apps/pilot/habib/david_find_contacts.cc index 96a53bffec..97539147b2 100644 --- a/source/src/apps/pilot/habib/david_find_contacts.cc +++ b/source/src/apps/pilot/habib/david_find_contacts.cc @@ -190,7 +190,7 @@ main( int argc, char * argv [] ) outstream.clear(); */ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_exemplar.cc b/source/src/apps/pilot/habib/david_find_exemplar.cc index 2cd4adacf1..cbe91e4e5f 100644 --- a/source/src/apps/pilot/habib/david_find_exemplar.cc +++ b/source/src/apps/pilot/habib/david_find_exemplar.cc @@ -112,7 +112,7 @@ int main( int argc, char * argv [] ) { } TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_pocket_exemplar.cc b/source/src/apps/pilot/habib/david_find_pocket_exemplar.cc index 358ff06f4f..a71b84454d 100644 --- a/source/src/apps/pilot/habib/david_find_pocket_exemplar.cc +++ b/source/src/apps/pilot/habib/david_find_pocket_exemplar.cc @@ -155,7 +155,7 @@ int main( int argc, char * argv [] ) { } outPDB_stream.close(); outPDB_stream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_pocket_stabilizing_mutations.cc b/source/src/apps/pilot/habib/david_find_pocket_stabilizing_mutations.cc index 331ce417b5..a13206621a 100644 --- a/source/src/apps/pilot/habib/david_find_pocket_stabilizing_mutations.cc +++ b/source/src/apps/pilot/habib/david_find_pocket_stabilizing_mutations.cc @@ -244,7 +244,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished computing ddGs" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_find_surface_residues.cc b/source/src/apps/pilot/habib/david_find_surface_residues.cc index a4a0ea5e9e..fadfb92440 100644 --- a/source/src/apps/pilot/habib/david_find_surface_residues.cc +++ b/source/src/apps/pilot/habib/david_find_surface_residues.cc @@ -231,7 +231,7 @@ main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_open_pocket.cc b/source/src/apps/pilot/habib/david_open_pocket.cc index 0695917e76..4c693981e9 100644 --- a/source/src/apps/pilot/habib/david_open_pocket.cc +++ b/source/src/apps/pilot/habib/david_open_pocket.cc @@ -272,7 +272,7 @@ main( int argc, char * argv [] ) std::cout << "Successfully finished relaxing backbone around central residue" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_pocket2PDB.cc b/source/src/apps/pilot/habib/david_pocket2PDB.cc index 6e03f004b1..2e6d35f0e3 100644 --- a/source/src/apps/pilot/habib/david_pocket2PDB.cc +++ b/source/src/apps/pilot/habib/david_pocket2PDB.cc @@ -109,7 +109,7 @@ int main( int argc, char * argv [] ) { TR << "Done!" << std::endl; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_pocket_align_and_save.cc b/source/src/apps/pilot/habib/david_pocket_align_and_save.cc index bdbdbacade..d6cf914c21 100644 --- a/source/src/apps/pilot/habib/david_pocket_align_and_save.cc +++ b/source/src/apps/pilot/habib/david_pocket_align_and_save.cc @@ -336,7 +336,7 @@ int main( int argc, char * argv [] ) { // fout.clear(); TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_pocket_compare.cc b/source/src/apps/pilot/habib/david_pocket_compare.cc index 2cc020ed97..1168f0a506 100644 --- a/source/src/apps/pilot/habib/david_pocket_compare.cc +++ b/source/src/apps/pilot/habib/david_pocket_compare.cc @@ -112,7 +112,7 @@ int main( int argc, char * argv [] ) { // fout.clear(); TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_recompute_score_and_rmsd.cc b/source/src/apps/pilot/habib/david_recompute_score_and_rmsd.cc index d0d0228dc6..6e59a314f2 100644 --- a/source/src/apps/pilot/habib/david_recompute_score_and_rmsd.cc +++ b/source/src/apps/pilot/habib/david_recompute_score_and_rmsd.cc @@ -340,7 +340,7 @@ main( int argc, char * argv [] ) outstream.close(); outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/habib/david_rotation_experiment.cc b/source/src/apps/pilot/habib/david_rotation_experiment.cc index 60e4f47e12..9a5c15e6be 100644 --- a/source/src/apps/pilot/habib/david_rotation_experiment.cc +++ b/source/src/apps/pilot/habib/david_rotation_experiment.cc @@ -287,7 +287,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/hpark/min_test.cc b/source/src/apps/pilot/hpark/min_test.cc index 3471455f0f..b278bec123 100644 --- a/source/src/apps/pilot/hpark/min_test.cc +++ b/source/src/apps/pilot/hpark/min_test.cc @@ -209,7 +209,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( new MinTestMover() ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } diff --git a/source/src/apps/pilot/hpark/min_test_hpark.cc b/source/src/apps/pilot/hpark/min_test_hpark.cc index 17aebfd38c..b1e6c0aba9 100644 --- a/source/src/apps/pilot/hpark/min_test_hpark.cc +++ b/source/src/apps/pilot/hpark/min_test_hpark.cc @@ -238,7 +238,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( new MinTestMover() ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } diff --git a/source/src/apps/pilot/hpark/mpi_refinement.cc b/source/src/apps/pilot/hpark/mpi_refinement.cc index 0ef8f6ee5f..db41261f35 100644 --- a/source/src/apps/pilot/hpark/mpi_refinement.cc +++ b/source/src/apps/pilot/hpark/mpi_refinement.cc @@ -221,7 +221,7 @@ main( int argc, char * argv [] ) MPI_Barrier( MPI_COMM_WORLD ); MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/hpark/test_bbmc.org.cc b/source/src/apps/pilot/hpark/test_bbmc.org.cc index 947ec19156..29ad42fa22 100644 --- a/source/src/apps/pilot/hpark/test_bbmc.org.cc +++ b/source/src/apps/pilot/hpark/test_bbmc.org.cc @@ -281,7 +281,7 @@ int main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ian/cluster_ligand_poses.cc b/source/src/apps/pilot/ian/cluster_ligand_poses.cc index 80e0265c5a..a84d8be53b 100644 --- a/source/src/apps/pilot/ian/cluster_ligand_poses.cc +++ b/source/src/apps/pilot/ian/cluster_ligand_poses.cc @@ -207,7 +207,7 @@ main( int argc, char * argv [] ) } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { //YOU ADD + } catch (utility::excn::Exception const & e ) { //YOU ADD std::cout << "caught exception " << e.msg() << std::endl; //YOU ADD return -1; } diff --git a/source/src/apps/pilot/ian/ligand_evis.cc b/source/src/apps/pilot/ian/ligand_evis.cc index e20eea8882..2ee77ec65f 100644 --- a/source/src/apps/pilot/ian/ligand_evis.cc +++ b/source/src/apps/pilot/ian/ligand_evis.cc @@ -394,7 +394,7 @@ main( int argc, char * argv [] ) basic::Warning() << "No structures processed. Existing output files may have been skipped, did you mean to delete them?" << std::endl; jobdist.shutdown(); // under BOINC, this will cause program exit! - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ian/ligdock_confidence.cc b/source/src/apps/pilot/ian/ligdock_confidence.cc index 68ec31f6ac..3a13dee2e1 100644 --- a/source/src/apps/pilot/ian/ligdock_confidence.cc +++ b/source/src/apps/pilot/ian/ligdock_confidence.cc @@ -203,7 +203,7 @@ main( int argc, char * argv [] ) } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ian/redo_rms_atomtree_diffs.cc b/source/src/apps/pilot/ian/redo_rms_atomtree_diffs.cc index 5bdfb73877..771582bbe2 100644 --- a/source/src/apps/pilot/ian/redo_rms_atomtree_diffs.cc +++ b/source/src/apps/pilot/ian/redo_rms_atomtree_diffs.cc @@ -168,7 +168,7 @@ main( int argc, char * argv [] ) if ( num_structures_processed == 0 ) basic::Warning() << "No structures processed. Existing output files may have been skipped, did you mean to delete them?" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ian/select_best_unique_ligand_poses_jd1.cc b/source/src/apps/pilot/ian/select_best_unique_ligand_poses_jd1.cc index f4cb443ac1..b9a8a6ac1d 100644 --- a/source/src/apps/pilot/ian/select_best_unique_ligand_poses_jd1.cc +++ b/source/src/apps/pilot/ian/select_best_unique_ligand_poses_jd1.cc @@ -158,7 +158,7 @@ main( int argc, char * argv [] ) TR << "Selected " << selected_poses.size() << " poses overall" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jacob/cxdesign.cc b/source/src/apps/pilot/jacob/cxdesign.cc index 0554be21df..54ef603f4f 100644 --- a/source/src/apps/pilot/jacob/cxdesign.cc +++ b/source/src/apps/pilot/jacob/cxdesign.cc @@ -470,7 +470,7 @@ int main(int argc, char *argv[]) { cxdock_design(pnat,fn,ssamp,iss,irt,ic,cbc); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jacob/cxdock.cc b/source/src/apps/pilot/jacob/cxdock.cc index d205851dcc..4147fc84bc 100644 --- a/source/src/apps/pilot/jacob/cxdock.cc +++ b/source/src/apps/pilot/jacob/cxdock.cc @@ -585,7 +585,7 @@ int main(int argc, char *argv[]) { //visualize(pnat); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jadolfbr/AntibodyInfoRMLoader.cc b/source/src/apps/pilot/jadolfbr/AntibodyInfoRMLoader.cc index 0e2d818a38..ca193e8d3a 100644 --- a/source/src/apps/pilot/jadolfbr/AntibodyInfoRMLoader.cc +++ b/source/src/apps/pilot/jadolfbr/AntibodyInfoRMLoader.cc @@ -55,7 +55,7 @@ AntibodyInfoRMLoader::create_resource( using numeric::xyzVector; using std::getline; using std::string; - using utility::excn::EXCN_Msg_Exception; + using utility::excn::Exception; using utility::split; using utility::vector1; @@ -80,7 +80,7 @@ AntibodyInfoRMLoader::create_resource( std::ostringstream err; err << "The input coordinates must specify a point in three-dimensional space, but the point on line "; err << lines_read << " of " << locator_id << " has " << point_coords.size() << " coordinates listed."; - throw EXCN_Msg_Exception(err.str()); + throw CREATE_EXCEPTION(Exception, err.str()); } surf_coords[lines_read] = xyzVector(lexical_cast(point_coords[1]),lexical_cast(point_coords[2]), lexical_cast(point_coords[3])); @@ -88,13 +88,13 @@ AntibodyInfoRMLoader::create_resource( if (lines_read > number_of_points) { - throw EXCN_Msg_Exception( "AntibodyInfoRMLoader expected to be given exactly three points to " \ + throw CREATE_EXCEPTION(Exception, "AntibodyInfoRMLoader expected to be given exactly three points to " \ "define the periodicity of the surface, but more than three points were provided in " + locator_id + "."); } else if (lines_read < number_of_points) { - throw EXCN_Msg_Exception( "AntibodyInfoRMLoader expected to be given exactly three points to " \ + throw CREATE_EXCEPTION(Exception, "AntibodyInfoRMLoader expected to be given exactly three points to " \ "define the periodicity of the surface, but less than three points were provided in " + locator_id + "."); } diff --git a/source/src/apps/pilot/jadolfbr/antibody_design/graft_design_cdrs.cc b/source/src/apps/pilot/jadolfbr/antibody_design/graft_design_cdrs.cc index 0c525ac278..8653908564 100644 --- a/source/src/apps/pilot/jadolfbr/antibody_design/graft_design_cdrs.cc +++ b/source/src/apps/pilot/jadolfbr/antibody_design/graft_design_cdrs.cc @@ -112,7 +112,7 @@ int main(int argc, char* argv[]){ protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new GraftDesignCDRs )); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cout << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/jadolfbr/antibody_design/prob_design_cdrs.cc b/source/src/apps/pilot/jadolfbr/antibody_design/prob_design_cdrs.cc index c6230a5f8f..dd785eab10 100644 --- a/source/src/apps/pilot/jadolfbr/antibody_design/prob_design_cdrs.cc +++ b/source/src/apps/pilot/jadolfbr/antibody_design/prob_design_cdrs.cc @@ -59,7 +59,7 @@ int main(int argc, char* argv[]){ devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go(new Designer); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cout << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/jadolfbr/cluster_utilities/relax_cdrs.cc b/source/src/apps/pilot/jadolfbr/cluster_utilities/relax_cdrs.cc index 6bc95502e0..b49885e667 100644 --- a/source/src/apps/pilot/jadolfbr/cluster_utilities/relax_cdrs.cc +++ b/source/src/apps/pilot/jadolfbr/cluster_utilities/relax_cdrs.cc @@ -85,7 +85,7 @@ int main(int argc, char* argv[]){ std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jadolfbr/model_antibody_basic.cc b/source/src/apps/pilot/jadolfbr/model_antibody_basic.cc index 254e1ee979..e5cae916ea 100644 --- a/source/src/apps/pilot/jadolfbr/model_antibody_basic.cc +++ b/source/src/apps/pilot/jadolfbr/model_antibody_basic.cc @@ -253,7 +253,7 @@ int main(int argc, char* argv[]) AntibodyInfoOP ab_info( new AntibodyInfoOP(pose)); //protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new AntibodyDesignProtocol )); - }catch(utility::excn::EXCN_Base & excn){ + }catch (utility::excn::Exception & excn){ std::cout << "Exception: "<go( queen ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jadolfbr/test_neighborhood_selector.cc b/source/src/apps/pilot/jadolfbr/test_neighborhood_selector.cc index 02350f92fe..6fba0991f2 100644 --- a/source/src/apps/pilot/jadolfbr/test_neighborhood_selector.cc +++ b/source/src/apps/pilot/jadolfbr/test_neighborhood_selector.cc @@ -129,7 +129,7 @@ main( int argc, char * argv [] ) //protocols::jd2::JobDistributor::get_instance()->go( mover_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jadolfbr/test_symmetry.cc b/source/src/apps/pilot/jadolfbr/test_symmetry.cc index 660f761550..fb76ed8e92 100644 --- a/source/src/apps/pilot/jadolfbr/test_symmetry.cc +++ b/source/src/apps/pilot/jadolfbr/test_symmetry.cc @@ -200,7 +200,7 @@ main( int argc, char * argv [] ) pose->dump_pdb("/Users/jadolfbr/2ciw_symm.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jadolfbr/testing/class_tests.cc b/source/src/apps/pilot/jadolfbr/testing/class_tests.cc index 41a9578821..18233c31c0 100644 --- a/source/src/apps/pilot/jadolfbr/testing/class_tests.cc +++ b/source/src/apps/pilot/jadolfbr/testing/class_tests.cc @@ -232,7 +232,7 @@ int main(int argc, char* argv[]){ option.add( interface, "dock_chains interface definition, optional, ex LH_A. Can handle any number of chains. "); devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go(new InterfaceFeaturesTests); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cout << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/jadolfbr/testing/test_grafting.cc b/source/src/apps/pilot/jadolfbr/testing/test_grafting.cc index 9641505c6d..5ec6ed6117 100644 --- a/source/src/apps/pilot/jadolfbr/testing/test_grafting.cc +++ b/source/src/apps/pilot/jadolfbr/testing/test_grafting.cc @@ -235,7 +235,7 @@ int main(int argc, char* argv[]){ //option.add( mode, "rb_min or cart "); devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go(new myspace::GraftTester()); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cout << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/james/add_ligand.cc b/source/src/apps/pilot/james/add_ligand.cc index 8b5cbf833d..0f0e4412af 100644 --- a/source/src/apps/pilot/james/add_ligand.cc +++ b/source/src/apps/pilot/james/add_ligand.cc @@ -150,7 +150,7 @@ main( int argc, char* argv[] ) { query_pose.dump_pdb( "pose_with_ligand.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/analyze_casp9.cc b/source/src/apps/pilot/james/analyze_casp9.cc index 40f96b8d57..5ca1195819 100644 --- a/source/src/apps/pilot/james/analyze_casp9.cc +++ b/source/src/apps/pilot/james/analyze_casp9.cc @@ -281,7 +281,7 @@ main( int argc, char* argv [] ) { << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/angle_recovery_stats.cc b/source/src/apps/pilot/james/angle_recovery_stats.cc index 2951223400..53c9738460 100644 --- a/source/src/apps/pilot/james/angle_recovery_stats.cc +++ b/source/src/apps/pilot/james/angle_recovery_stats.cc @@ -323,7 +323,7 @@ main( int argc, char* argv [] ) { << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/angles.cc b/source/src/apps/pilot/james/angles.cc index 6f16612deb..9f11092e4d 100644 --- a/source/src/apps/pilot/james/angles.cc +++ b/source/src/apps/pilot/james/angles.cc @@ -159,7 +159,7 @@ int main( int argc, char* argv [] ) { } // for ( unsigned int i = 1; i <= mypose->size(); ++i ) } // for ( iter = pdbfiles.begin(); iter != pdbfiles.end(); ++iter ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/anneal_align.cc b/source/src/apps/pilot/james/anneal_align.cc index a62d291ca5..ed620cfa41 100644 --- a/source/src/apps/pilot/james/anneal_align.cc +++ b/source/src/apps/pilot/james/anneal_align.cc @@ -279,7 +279,7 @@ main( int argc, char* argv [] ) std::cout << *it << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/assemble_domains_jd2.cc b/source/src/apps/pilot/james/assemble_domains_jd2.cc index 0dfbe44680..e7f49713c4 100644 --- a/source/src/apps/pilot/james/assemble_domains_jd2.cc +++ b/source/src/apps/pilot/james/assemble_domains_jd2.cc @@ -94,7 +94,7 @@ main( int argc, char * argv [] ) { // execution JobDistributor::get_instance()->go(container); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/basic_thread.cc b/source/src/apps/pilot/james/basic_thread.cc index c6b32445f0..8cd09d260d 100644 --- a/source/src/apps/pilot/james/basic_thread.cc +++ b/source/src/apps/pilot/james/basic_thread.cc @@ -190,7 +190,7 @@ main( int argc, char* argv [] ) { modeled_pose.dump_pdb( output_name ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/boost_hacks.cc b/source/src/apps/pilot/james/boost_hacks.cc index c503c8738a..12cfa8669e 100644 --- a/source/src/apps/pilot/james/boost_hacks.cc +++ b/source/src/apps/pilot/james/boost_hacks.cc @@ -75,7 +75,7 @@ main( int argc, char * argv [] ) { // std::cout << it->first() << " => " << it->secong() << std::endl; //} - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/build_template.cc b/source/src/apps/pilot/james/build_template.cc index c037d067e2..2d3fd0a72c 100644 --- a/source/src/apps/pilot/james/build_template.cc +++ b/source/src/apps/pilot/james/build_template.cc @@ -134,7 +134,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( build_template ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/burial.cc b/source/src/apps/pilot/james/burial.cc index 5f9894c83f..63eae18169 100644 --- a/source/src/apps/pilot/james/burial.cc +++ b/source/src/apps/pilot/james/burial.cc @@ -119,7 +119,7 @@ main( int argc, char* argv [] ) } // for ( unsigned int i = 1; i <= pose.size(); ++i ) } // for ( iter = pdbfiles.begin(); iter != pdbfiles.end(); ++iter ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { return -1; std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/james/ca_build.cc b/source/src/apps/pilot/james/ca_build.cc index 8474868ed8..20243e21c2 100644 --- a/source/src/apps/pilot/james/ca_build.cc +++ b/source/src/apps/pilot/james/ca_build.cc @@ -249,7 +249,7 @@ main( int argc, char* argv [] ) { } // gap_extend } // gap_open - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/cartesian.cc b/source/src/apps/pilot/james/cartesian.cc index e56d508700..e2bd716c37 100644 --- a/source/src/apps/pilot/james/cartesian.cc +++ b/source/src/apps/pilot/james/cartesian.cc @@ -92,7 +92,7 @@ main( int /*argc*/, char* /*argv*/ [] ) { std::cout << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/casp9_superdev.cc b/source/src/apps/pilot/james/casp9_superdev.cc index 454f7c1432..aebfa6e5d9 100644 --- a/source/src/apps/pilot/james/casp9_superdev.cc +++ b/source/src/apps/pilot/james/casp9_superdev.cc @@ -224,7 +224,7 @@ main( int argc, char * argv [] ) { not_universal_main( *mover ); mover->print_stats(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/compare_features.cc b/source/src/apps/pilot/james/compare_features.cc index c17c7d5f30..9bf91b7ed6 100644 --- a/source/src/apps/pilot/james/compare_features.cc +++ b/source/src/apps/pilot/james/compare_features.cc @@ -175,7 +175,7 @@ main( int argc, char * argv [] ) { basic::prof_show(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/constraints_matrix.cc b/source/src/apps/pilot/james/constraints_matrix.cc index 68c7db30f6..8019bd70fe 100644 --- a/source/src/apps/pilot/james/constraints_matrix.cc +++ b/source/src/apps/pilot/james/constraints_matrix.cc @@ -223,7 +223,7 @@ main( int argc, char * argv [] ) output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/constraints_viewer.cc b/source/src/apps/pilot/james/constraints_viewer.cc index e400ce98cf..17cff5f823 100644 --- a/source/src/apps/pilot/james/constraints_viewer.cc +++ b/source/src/apps/pilot/james/constraints_viewer.cc @@ -122,7 +122,7 @@ main( int argc, char * argv [] ) { utility_exit_with_message( "Error: file exists: " + filename ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/copy_hack.cc b/source/src/apps/pilot/james/copy_hack.cc index fd6978045e..2db01a6c85 100644 --- a/source/src/apps/pilot/james/copy_hack.cc +++ b/source/src/apps/pilot/james/copy_hack.cc @@ -69,7 +69,7 @@ main( int argc, char * argv [] ) { ); protocols::jobdist::not_universal_main( *mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/cs_align.cc b/source/src/apps/pilot/james/cs_align.cc index a24f0624d5..2471d7c9d1 100644 --- a/source/src/apps/pilot/james/cs_align.cc +++ b/source/src/apps/pilot/james/cs_align.cc @@ -181,7 +181,7 @@ main( int argc, char* argv [] ) { output << *it << std::endl; } // for ( it in aligns ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/cst_func.cc b/source/src/apps/pilot/james/cst_func.cc index e51c803246..01f6423254 100644 --- a/source/src/apps/pilot/james/cst_func.cc +++ b/source/src/apps/pilot/james/cst_func.cc @@ -112,7 +112,7 @@ main( int argc, char * argv [] ) f->show_definition( std::cout ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/cst_quality.cc b/source/src/apps/pilot/james/cst_quality.cc index ddf673f9bc..9b9beaeaa6 100644 --- a/source/src/apps/pilot/james/cst_quality.cc +++ b/source/src/apps/pilot/james/cst_quality.cc @@ -231,7 +231,7 @@ main( int argc, char * argv [] ) output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/density_grid.cc b/source/src/apps/pilot/james/density_grid.cc index 858dad1122..cc14fbab5a 100644 --- a/source/src/apps/pilot/james/density_grid.cc +++ b/source/src/apps/pilot/james/density_grid.cc @@ -293,7 +293,7 @@ main( int argc, char* argv [] ) { prof_show(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/design_profile.cc b/source/src/apps/pilot/james/design_profile.cc index a9fd20ff4c..041ba8737a 100644 --- a/source/src/apps/pilot/james/design_profile.cc +++ b/source/src/apps/pilot/james/design_profile.cc @@ -128,7 +128,7 @@ main( int argc, char * argv [] ) { ComputeProfileMover mover( n_designs ); protocols::jobdist::not_universal_main( mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/distances.cc b/source/src/apps/pilot/james/distances.cc index 0a5750fac3..e793a272e0 100644 --- a/source/src/apps/pilot/james/distances.cc +++ b/source/src/apps/pilot/james/distances.cc @@ -167,7 +167,7 @@ main( int argc, char* argv [] ) //output.close(); } // for ( iter = pdbfiles.begin(); iter != pdbfiles.end(); ++iter ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/dp_align.cc b/source/src/apps/pilot/james/dp_align.cc index 98e71b2c08..cb038905d5 100644 --- a/source/src/apps/pilot/james/dp_align.cc +++ b/source/src/apps/pilot/james/dp_align.cc @@ -133,7 +133,7 @@ main( int argc, char* argv [] ) protocols::jobdist::not_universal_main( mover ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/exhaustive_align.cc b/source/src/apps/pilot/james/exhaustive_align.cc index 56a59f7167..a579f9d636 100644 --- a/source/src/apps/pilot/james/exhaustive_align.cc +++ b/source/src/apps/pilot/james/exhaustive_align.cc @@ -183,7 +183,7 @@ main( int argc, char* argv [] ) { output << *it << std::endl; } // for ( it in aligns ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/fast_cm.cc b/source/src/apps/pilot/james/fast_cm.cc index c15aea06fd..0edb903823 100644 --- a/source/src/apps/pilot/james/fast_cm.cc +++ b/source/src/apps/pilot/james/fast_cm.cc @@ -245,7 +245,7 @@ main( int argc, char * argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/filter_sequences.cc b/source/src/apps/pilot/james/filter_sequences.cc index b00ab0af14..f4a2d48898 100644 --- a/source/src/apps/pilot/james/filter_sequences.cc +++ b/source/src/apps/pilot/james/filter_sequences.cc @@ -205,7 +205,7 @@ main( int argc, char* argv [] ) prof_show(); } // for two_letter_codes - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/hybrid.cc b/source/src/apps/pilot/james/hybrid.cc index cd34243175..9bb61e6fff 100644 --- a/source/src/apps/pilot/james/hybrid.cc +++ b/source/src/apps/pilot/james/hybrid.cc @@ -289,7 +289,7 @@ main( int argc, char* argv [] ) { tr.Debug << "finished rescoring alignments." << std::endl; tr.flush_all_channels(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jcluster.cc b/source/src/apps/pilot/james/jcluster.cc index a8c4bba7c7..111ca01d3e 100644 --- a/source/src/apps/pilot/james/jcluster.cc +++ b/source/src/apps/pilot/james/jcluster.cc @@ -163,7 +163,7 @@ main( int argc, char* argv [] ) { //print_debug_information( responsibilities ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jdock.cc b/source/src/apps/pilot/james/jdock.cc index bd211ac938..325a522880 100644 --- a/source/src/apps/pilot/james/jdock.cc +++ b/source/src/apps/pilot/james/jdock.cc @@ -199,7 +199,7 @@ main( int argc, char * argv [] ) { std::string const fn_out( "post_min_final.pdb" ); pose.dump_pdb(fn_out); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jidealize.cc b/source/src/apps/pilot/james/jidealize.cc index 725abd068b..111015602d 100644 --- a/source/src/apps/pilot/james/jidealize.cc +++ b/source/src/apps/pilot/james/jidealize.cc @@ -72,7 +72,7 @@ main( int argc, char * argv [] ) not_universal_main( idealizer ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jrelax.cc b/source/src/apps/pilot/james/jrelax.cc index 3735e943ab..3aedf52a58 100644 --- a/source/src/apps/pilot/james/jrelax.cc +++ b/source/src/apps/pilot/james/jrelax.cc @@ -72,7 +72,7 @@ main( int argc, char * argv [] ) { } not_universal_main( *protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jscore.cc b/source/src/apps/pilot/james/jscore.cc index bd3f4628a1..c5f11b2cce 100644 --- a/source/src/apps/pilot/james/jscore.cc +++ b/source/src/apps/pilot/james/jscore.cc @@ -76,7 +76,7 @@ main( int argc, char * argv [] ) { } not_universal_main( *mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/jseq.cc b/source/src/apps/pilot/james/jseq.cc index e834ead966..5c06a73515 100644 --- a/source/src/apps/pilot/james/jseq.cc +++ b/source/src/apps/pilot/james/jseq.cc @@ -86,7 +86,7 @@ main( int argc, char * argv [] ) { not_universal_main( *mover ); mover->print_seqs( std::cout ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/kdtree_disulf.cc b/source/src/apps/pilot/james/kdtree_disulf.cc index 63ea25aaa0..ff6bcd311b 100644 --- a/source/src/apps/pilot/james/kdtree_disulf.cc +++ b/source/src/apps/pilot/james/kdtree_disulf.cc @@ -204,7 +204,7 @@ main( int argc, char* argv [] ) { std::cout << kdtree_time << ' ' << naive_time << ' ' << max_dist << std::endl; //std::cout << kdtree_time << ' ' << max_dist << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/make_artificial_centroids.cc b/source/src/apps/pilot/james/make_artificial_centroids.cc index b9bd20a884..4db993b416 100644 --- a/source/src/apps/pilot/james/make_artificial_centroids.cc +++ b/source/src/apps/pilot/james/make_artificial_centroids.cc @@ -162,7 +162,7 @@ main( int argc, char * argv [] ) { } pose.dump_pdb( "artificial_centroid.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/make_profile.cc b/source/src/apps/pilot/james/make_profile.cc index 2c3d4a3465..3cb1ed3459 100644 --- a/source/src/apps/pilot/james/make_profile.cc +++ b/source/src/apps/pilot/james/make_profile.cc @@ -133,7 +133,7 @@ main( int argc, char* argv [] ) } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/mammoth_hack.cc b/source/src/apps/pilot/james/mammoth_hack.cc index 1833fd431e..0a42e753d3 100644 --- a/source/src/apps/pilot/james/mammoth_hack.cc +++ b/source/src/apps/pilot/james/mammoth_hack.cc @@ -708,7 +708,7 @@ main( int argc, char * argv [] ) { //); //std::cout << ss_align << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/medal_test.cc b/source/src/apps/pilot/james/medal_test.cc index ccc86d7033..0e2688327d 100644 --- a/source/src/apps/pilot/james/medal_test.cc +++ b/source/src/apps/pilot/james/medal_test.cc @@ -160,7 +160,7 @@ main( int argc, char* argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/min_cst.cc b/source/src/apps/pilot/james/min_cst.cc index d0af33fe15..c58b5e0bf4 100644 --- a/source/src/apps/pilot/james/min_cst.cc +++ b/source/src/apps/pilot/james/min_cst.cc @@ -168,7 +168,7 @@ main( int argc, char* argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/model_quality.cc b/source/src/apps/pilot/james/model_quality.cc index 2f488ca662..fa4546f675 100644 --- a/source/src/apps/pilot/james/model_quality.cc +++ b/source/src/apps/pilot/james/model_quality.cc @@ -447,7 +447,7 @@ main( int argc, char * argv [] ) { dist_output.close(); torsion_output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/per_residue_features.cc b/source/src/apps/pilot/james/per_residue_features.cc index 2a3caf708a..5c89cc6df4 100644 --- a/source/src/apps/pilot/james/per_residue_features.cc +++ b/source/src/apps/pilot/james/per_residue_features.cc @@ -177,7 +177,7 @@ int main( int argc, char* argv [] ) { } // for ( unsigned int i = 1; i <= mypose->size(); ++i ) } // while input.has_another_pose() - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/phi_hack.cc b/source/src/apps/pilot/james/phi_hack.cc index 72a51f99de..2073afed35 100644 --- a/source/src/apps/pilot/james/phi_hack.cc +++ b/source/src/apps/pilot/james/phi_hack.cc @@ -107,7 +107,7 @@ main( int argc, char* argv [] ) { ss->fill_struct( fold_pose, tag ); sfd.write_silent_struct( *ss, option[ out::file::silent ]() ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/pick_frags.cc b/source/src/apps/pilot/james/pick_frags.cc index 2f439570c7..e9a4951268 100644 --- a/source/src/apps/pilot/james/pick_frags.cc +++ b/source/src/apps/pilot/james/pick_frags.cc @@ -484,7 +484,7 @@ main( int argc, char* argv [] ) std::cout << "end of program." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/prof_search.cc b/source/src/apps/pilot/james/prof_search.cc index d4bacbf9ea..5c64c1c86c 100644 --- a/source/src/apps/pilot/james/prof_search.cc +++ b/source/src/apps/pilot/james/prof_search.cc @@ -258,7 +258,7 @@ main( int argc, char* argv [] ) { output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/remap_aln.cc b/source/src/apps/pilot/james/remap_aln.cc index 710e4cce88..1ce2742315 100644 --- a/source/src/apps/pilot/james/remap_aln.cc +++ b/source/src/apps/pilot/james/remap_aln.cc @@ -134,7 +134,7 @@ main( int argc, char* argv [] ) { } // for align_fns output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/sc_interaction.cc b/source/src/apps/pilot/james/sc_interaction.cc index cc11b0a51e..c054ace64f 100644 --- a/source/src/apps/pilot/james/sc_interaction.cc +++ b/source/src/apps/pilot/james/sc_interaction.cc @@ -186,7 +186,7 @@ main( int argc, char* argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/score_silent_cst.cc b/source/src/apps/pilot/james/score_silent_cst.cc index f0b74f6c15..e7828f4234 100644 --- a/source/src/apps/pilot/james/score_silent_cst.cc +++ b/source/src/apps/pilot/james/score_silent_cst.cc @@ -217,7 +217,7 @@ main( int argc, char* argv[] ) } // for ss in SilentFileData output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/seqdb_stats.cc b/source/src/apps/pilot/james/seqdb_stats.cc index a9d1eb07fb..7c792c2347 100644 --- a/source/src/apps/pilot/james/seqdb_stats.cc +++ b/source/src/apps/pilot/james/seqdb_stats.cc @@ -117,7 +117,7 @@ main( int argc, char* argv [] ) } out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/silent_cst_quality.cc b/source/src/apps/pilot/james/silent_cst_quality.cc index 3583bc0a11..326c07ffb4 100644 --- a/source/src/apps/pilot/james/silent_cst_quality.cc +++ b/source/src/apps/pilot/james/silent_cst_quality.cc @@ -317,7 +317,7 @@ main( int argc, char * argv [] ) = ConstraintStatsMoverOP( static_cast< ConstraintStatsMover * > ( mover() ) ); downcast->print_stats( output ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/simple_cm.cc b/source/src/apps/pilot/james/simple_cm.cc index 079d138be1..cff8c38e34 100644 --- a/source/src/apps/pilot/james/simple_cm.cc +++ b/source/src/apps/pilot/james/simple_cm.cc @@ -286,7 +286,7 @@ main( int argc, char* argv [] ) { } // for ( it in aligns ) } // if option[ in::file::template_pdb ].user() - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/sparta_superdev.cc b/source/src/apps/pilot/james/sparta_superdev.cc index af7e0aedd0..b6c314d341 100644 --- a/source/src/apps/pilot/james/sparta_superdev.cc +++ b/source/src/apps/pilot/james/sparta_superdev.cc @@ -308,7 +308,7 @@ main( int argc, char * argv [] ) { not_universal_main( *mover ); mover->print_stats(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/super.cc b/source/src/apps/pilot/james/super.cc index 89f88ca290..65d67147ac 100644 --- a/source/src/apps/pilot/james/super.cc +++ b/source/src/apps/pilot/james/super.cc @@ -134,7 +134,7 @@ main( int argc, char * argv [] ) { not_universal_main( *mover ); mover->print_stats(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/superdev.cc b/source/src/apps/pilot/james/superdev.cc index 3afce654ad..77817b1507 100644 --- a/source/src/apps/pilot/james/superdev.cc +++ b/source/src/apps/pilot/james/superdev.cc @@ -234,7 +234,7 @@ main( int argc, char * argv [] ) { not_universal_main( *mover ); mover->print_stats(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/james/thread_fast.cc b/source/src/apps/pilot/james/thread_fast.cc index 1d9d41d43f..4fe4712a28 100644 --- a/source/src/apps/pilot/james/thread_fast.cc +++ b/source/src/apps/pilot/james/thread_fast.cc @@ -346,7 +346,7 @@ main( int argc, char* argv [] ) { tr.Debug << "finished rescoring alignments." << std::endl; tr.flush(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/detect_symmetry.cc b/source/src/apps/pilot/javierbq/detect_symmetry.cc index 256d74a718..70386b7a02 100644 --- a/source/src/apps/pilot/javierbq/detect_symmetry.cc +++ b/source/src/apps/pilot/javierbq/detect_symmetry.cc @@ -168,7 +168,7 @@ int main( int argc, char** argv ) { // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/domains.cc b/source/src/apps/pilot/javierbq/domains.cc index f3b40cfc28..808d4d436c 100644 --- a/source/src/apps/pilot/javierbq/domains.cc +++ b/source/src/apps/pilot/javierbq/domains.cc @@ -285,7 +285,7 @@ main ( int argc, char* argv[] ){ TR << "match: " << dd.ss_match(*p, ss_matches) << std::endl; dd.sheet_match(p, ss_matches); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/fragment_based_design.cc b/source/src/apps/pilot/javierbq/fragment_based_design.cc index ab945bda78..e1990b497c 100644 --- a/source/src/apps/pilot/javierbq/fragment_based_design.cc +++ b/source/src/apps/pilot/javierbq/fragment_based_design.cc @@ -160,7 +160,7 @@ int main( int argc, char** argv ) { // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/fragment_sequence_quality.cc b/source/src/apps/pilot/javierbq/fragment_sequence_quality.cc index 0bb190cd0b..18e57c8e2c 100644 --- a/source/src/apps/pilot/javierbq/fragment_sequence_quality.cc +++ b/source/src/apps/pilot/javierbq/fragment_sequence_quality.cc @@ -168,7 +168,7 @@ int main( int argc, char** argv ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/swap_elements.cc b/source/src/apps/pilot/javierbq/swap_elements.cc index 62f05cd62b..5791093a50 100644 --- a/source/src/apps/pilot/javierbq/swap_elements.cc +++ b/source/src/apps/pilot/javierbq/swap_elements.cc @@ -687,7 +687,7 @@ int main( int argc, char** argv ) { // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/javierbq/test_serialize.cc b/source/src/apps/pilot/javierbq/test_serialize.cc index 5bc108feea..e714a78132 100644 --- a/source/src/apps/pilot/javierbq/test_serialize.cc +++ b/source/src/apps/pilot/javierbq/test_serialize.cc @@ -114,7 +114,7 @@ main ( int argc, char* argv[] ){ TR << "size of pose to unflatten " << p2.size() << std::endl; TR << "ss:" << p2.secstruct() << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/TwoChainInterface.cc b/source/src/apps/pilot/jcorn/TwoChainInterface.cc index b71bb1a417..523f9a8501 100644 --- a/source/src/apps/pilot/jcorn/TwoChainInterface.cc +++ b/source/src/apps/pilot/jcorn/TwoChainInterface.cc @@ -170,7 +170,7 @@ main( int argc, char* argv[] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/TwoChainTenANeighbors.cc b/source/src/apps/pilot/jcorn/TwoChainTenANeighbors.cc index b1b8cd2268..79c301cd04 100644 --- a/source/src/apps/pilot/jcorn/TwoChainTenANeighbors.cc +++ b/source/src/apps/pilot/jcorn/TwoChainTenANeighbors.cc @@ -171,7 +171,7 @@ main( int argc, char* argv[] ) TI << *chain1 << *chain2 << " " << interface.second << std::endl; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/hbond_connect.cc b/source/src/apps/pilot/jcorn/hbond_connect.cc index 31b1df2b1d..d9986b4a00 100644 --- a/source/src/apps/pilot/jcorn/hbond_connect.cc +++ b/source/src/apps/pilot/jcorn/hbond_connect.cc @@ -270,7 +270,7 @@ main( int argc, char * argv [] ) } } // for pdbnames - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/hh_test.cc b/source/src/apps/pilot/jcorn/hh_test.cc index 0f28e39339..66084cf6c4 100644 --- a/source/src/apps/pilot/jcorn/hh_test.cc +++ b/source/src/apps/pilot/jcorn/hh_test.cc @@ -66,7 +66,7 @@ main( int argc, char * argv [] ) new_set = stubset->cluster(); new_set->write_all( "clustered.stubs" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/hotspot_hash.cc b/source/src/apps/pilot/jcorn/hotspot_hash.cc index 9717d7bb6b..14f5a5170d 100644 --- a/source/src/apps/pilot/jcorn/hotspot_hash.cc +++ b/source/src/apps/pilot/jcorn/hotspot_hash.cc @@ -455,7 +455,7 @@ main( int argc, char * argv [] ) cut_stubs->write_all( newfname); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jcorn/hshash_utils.cc b/source/src/apps/pilot/jcorn/hshash_utils.cc index b8f84a3857..bfc8859d93 100644 --- a/source/src/apps/pilot/jcorn/hshash_utils.cc +++ b/source/src/apps/pilot/jcorn/hshash_utils.cc @@ -292,7 +292,7 @@ main( int argc, char * argv [] ) } // if hashout_fname } // for hashname - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jd2/jd2memtest.cc b/source/src/apps/pilot/jd2/jd2memtest.cc index f6fb8d027a..9543605e8e 100644 --- a/source/src/apps/pilot/jd2/jd2memtest.cc +++ b/source/src/apps/pilot/jd2/jd2memtest.cc @@ -34,7 +34,7 @@ int main( int argc, char* argv[] ) T("jd2memtest") << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jd2/jd2test.cc b/source/src/apps/pilot/jd2/jd2test.cc index b9542ca704..57d5dc23ad 100644 --- a/source/src/apps/pilot/jd2/jd2test.cc +++ b/source/src/apps/pilot/jd2/jd2test.cc @@ -207,14 +207,14 @@ main( int argc, char * argv [] ) test_mover->set_fail_no_retry_ = true; try { protocols::jd2::JobDistributor::get_instance()->go(test_mover); - } catch( utility::excn::EXCN_JD2Failure const & e ) { + } catch (utility::excn::JD2Failure const & e ) { TR << "successfully caught JD2 exception after fail_no_retry" << std::endl; } } else if ( set_fail_bad_input ) { test_mover->set_fail_bad_input_ = true; try { protocols::jd2::JobDistributor::get_instance()->go(test_mover); - } catch( utility::excn::EXCN_JD2Failure const & e ) { + } catch (utility::excn::JD2Failure const & e ) { TR << "successfully caught JD2 exception after fail_bad_input" << std::endl; } } else { @@ -222,7 +222,7 @@ main( int argc, char * argv [] ) TR << "*********************successful completion**************************" << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jianqing/Ncaa_Crosslink.cc b/source/src/apps/pilot/jianqing/Ncaa_Crosslink.cc index 72349f8da1..45ca52febc 100644 --- a/source/src/apps/pilot/jianqing/Ncaa_Crosslink.cc +++ b/source/src/apps/pilot/jianqing/Ncaa_Crosslink.cc @@ -45,7 +45,7 @@ main( int argc, char * argv [] ) // NcaaPreCrosslinkOP npc; // npc = new NcaaPreCrosslink(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jianqing/snugdock.cc b/source/src/apps/pilot/jianqing/snugdock.cc index 428c626d11..17ecf4cbc8 100644 --- a/source/src/apps/pilot/jianqing/snugdock.cc +++ b/source/src/apps/pilot/jianqing/snugdock.cc @@ -38,7 +38,7 @@ main( int argc, char * argv [] ) SnugDockProtocolOP snugdock( new SnugDockProtocol ); JobDistributor::get_instance()->go( snugdock ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jim/optE_test.cc b/source/src/apps/pilot/jim/optE_test.cc index 093b4aef2b..66a38d471a 100644 --- a/source/src/apps/pilot/jim/optE_test.cc +++ b/source/src/apps/pilot/jim/optE_test.cc @@ -999,7 +999,7 @@ main( int argc, char * argv [] ) //simple_opte_test(); iterative_optE(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1 } diff --git a/source/src/apps/pilot/jim/use_asn_motifs.cc b/source/src/apps/pilot/jim/use_asn_motifs.cc index fb43d04309..b96ab81d98 100644 --- a/source/src/apps/pilot/jim/use_asn_motifs.cc +++ b/source/src/apps/pilot/jim/use_asn_motifs.cc @@ -240,7 +240,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); build_asn_motifs(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jjgray/antibody_metrics.cc b/source/src/apps/pilot/jjgray/antibody_metrics.cc index 63cf6af02b..1c5f440c0d 100644 --- a/source/src/apps/pilot/jjgray/antibody_metrics.cc +++ b/source/src/apps/pilot/jjgray/antibody_metrics.cc @@ -71,7 +71,7 @@ main( int argc, char* argv[] ){ std::pair q = kink_dihedral(pose, ab_info); TR << "q: " << q.first << " " << q.second << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } @@ -98,7 +98,7 @@ main( int argc, char* argv[] ){ // TR<<*ab_m_h3<go(ab_m_h3); // -// } catch ( utility::excn::EXCN_Base const & e ) { +// } catch (utility::excn::Exception const & e ) { // std::cout << "caught exception " << e.msg() << std::endl; // } //} diff --git a/source/src/apps/pilot/jkleman/add_membrane.cc b/source/src/apps/pilot/jkleman/add_membrane.cc index 5748daf6a5..bb20b0507d 100644 --- a/source/src/apps/pilot/jkleman/add_membrane.cc +++ b/source/src/apps/pilot/jkleman/add_membrane.cc @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -59,7 +59,7 @@ main( int argc, char * argv [] ) { // call jobdistributor on sequence mover JobDistributor::get_instance()->go( addmem ); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/input_from_cmd.cc b/source/src/apps/pilot/jkleman/input_from_cmd.cc index 39ee3404d2..f2320b54e9 100644 --- a/source/src/apps/pilot/jkleman/input_from_cmd.cc +++ b/source/src/apps/pilot/jkleman/input_from_cmd.cc @@ -75,7 +75,7 @@ main( int argc, char * argv [] ) // create MP pose create_MPpose(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/jkleman/interface_statistics.cc b/source/src/apps/pilot/jkleman/interface_statistics.cc index efa5c56827..eaa05db850 100644 --- a/source/src/apps/pilot/jkleman/interface_statistics.cc +++ b/source/src/apps/pilot/jkleman/interface_statistics.cc @@ -1417,7 +1417,7 @@ main( int argc, char * argv [] ) MPInterfaceStatisticsOP mpis( new MPInterfaceStatistics() ); JobDistributor::get_instance()->go(mpis); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mp_find_interface.cc b/source/src/apps/pilot/jkleman/mp_find_interface.cc index ba09d1d7fb..c94c12ac89 100644 --- a/source/src/apps/pilot/jkleman/mp_find_interface.cc +++ b/source/src/apps/pilot/jkleman/mp_find_interface.cc @@ -42,7 +42,7 @@ main( int argc, char * argv [] ) MPFindInterfaceMoverOP mfi( new MPFindInterfaceMover() ); JobDistributor::get_instance()->go(mfi); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mp_find_interface_test.cc b/source/src/apps/pilot/jkleman/mp_find_interface_test.cc index d85c0e0694..80e1b836c5 100644 --- a/source/src/apps/pilot/jkleman/mp_find_interface_test.cc +++ b/source/src/apps/pilot/jkleman/mp_find_interface_test.cc @@ -474,7 +474,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mp_parameters.cc b/source/src/apps/pilot/jkleman/mp_parameters.cc index 42baf111fb..1106ace2e2 100644 --- a/source/src/apps/pilot/jkleman/mp_parameters.cc +++ b/source/src/apps/pilot/jkleman/mp_parameters.cc @@ -573,7 +573,7 @@ main( int argc, char * argv [] ) user_overwrites_options(); check_options(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/jkleman/mp_qrtest.cc b/source/src/apps/pilot/jkleman/mp_qrtest.cc index 36b41fd835..beef85443e 100644 --- a/source/src/apps/pilot/jkleman/mp_qrtest.cc +++ b/source/src/apps/pilot/jkleman/mp_qrtest.cc @@ -811,7 +811,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go(mprr); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mp_quick_relax.cc b/source/src/apps/pilot/jkleman/mp_quick_relax.cc index bbd086dabd..47c4160f6a 100644 --- a/source/src/apps/pilot/jkleman/mp_quick_relax.cc +++ b/source/src/apps/pilot/jkleman/mp_quick_relax.cc @@ -42,7 +42,7 @@ main( int argc, char * argv [] ) mqr->add_membrane_again( true ); JobDistributor::get_instance()->go(mqr); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mp_relax_partners_separately.cc b/source/src/apps/pilot/jkleman/mp_relax_partners_separately.cc index e454337855..d06e70fd9d 100644 --- a/source/src/apps/pilot/jkleman/mp_relax_partners_separately.cc +++ b/source/src/apps/pilot/jkleman/mp_relax_partners_separately.cc @@ -41,7 +41,7 @@ main( int argc, char * argv [] ) QuickRelaxPartnersSeparatelyOP qr( new QuickRelaxPartnersSeparately() ); JobDistributor::get_instance()->go(qr); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpdocking.cc b/source/src/apps/pilot/jkleman/mpdocking.cc index 8b4bd610f3..a385598ddc 100644 --- a/source/src/apps/pilot/jkleman/mpdocking.cc +++ b/source/src/apps/pilot/jkleman/mpdocking.cc @@ -42,7 +42,7 @@ main( int argc, char * argv [] ) MPDockingMoverOP mpdm( new MPDockingMover() ); JobDistributor::get_instance()->go(mpdm); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpdocking_setup.cc b/source/src/apps/pilot/jkleman/mpdocking_setup.cc index b512d9e3cf..05b6c1f963 100644 --- a/source/src/apps/pilot/jkleman/mpdocking_setup.cc +++ b/source/src/apps/pilot/jkleman/mpdocking_setup.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) MPDockingSetupMoverOP mpdsm( new MPDockingSetupMover() ); mpdsm->apply(pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpfolding.cc b/source/src/apps/pilot/jkleman/mpfolding.cc index 7643970fa9..58cbfe10f9 100644 --- a/source/src/apps/pilot/jkleman/mpfolding.cc +++ b/source/src/apps/pilot/jkleman/mpfolding.cc @@ -498,7 +498,7 @@ main( int argc, char * argv [] ) MPFoldingMoverOP mpfm( new MPFoldingMover() ); JobDistributor::get_instance()->go(mpfm); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpframework_test.cc b/source/src/apps/pilot/jkleman/mpframework_test.cc index 70b3dae07d..a63fe47bfb 100644 --- a/source/src/apps/pilot/jkleman/mpframework_test.cc +++ b/source/src/apps/pilot/jkleman/mpframework_test.cc @@ -286,7 +286,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpframework_test1.cc b/source/src/apps/pilot/jkleman/mpframework_test1.cc index 77f166e921..3d56316cb6 100644 --- a/source/src/apps/pilot/jkleman/mpframework_test1.cc +++ b/source/src/apps/pilot/jkleman/mpframework_test1.cc @@ -230,7 +230,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/mpframework_test2.cc b/source/src/apps/pilot/jkleman/mpframework_test2.cc index f437ec977c..b153f6c65b 100644 --- a/source/src/apps/pilot/jkleman/mpframework_test2.cc +++ b/source/src/apps/pilot/jkleman/mpframework_test2.cc @@ -751,7 +751,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/per_residue_sc_sasa.cc b/source/src/apps/pilot/jkleman/per_residue_sc_sasa.cc index 37a765446d..f3ece416d1 100644 --- a/source/src/apps/pilot/jkleman/per_residue_sc_sasa.cc +++ b/source/src/apps/pilot/jkleman/per_residue_sc_sasa.cc @@ -57,7 +57,7 @@ main( int argc, char * argv [] ) // cry if PDB not given if ( ! option[OptionKeys::in::file::s].user() ) { - throw new utility::excn::EXCN_Msg_Exception("Please provide PDB file!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide PDB file!"); } // read in pose @@ -74,7 +74,7 @@ main( int argc, char * argv [] ) } } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/range_relax.cc b/source/src/apps/pilot/jkleman/range_relax.cc index 2a1c09d378..dc61f181f2 100644 --- a/source/src/apps/pilot/jkleman/range_relax.cc +++ b/source/src/apps/pilot/jkleman/range_relax.cc @@ -47,7 +47,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go( relax ); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/simple_rotamer_recovery.cc b/source/src/apps/pilot/jkleman/simple_rotamer_recovery.cc index b53dc230ce..3a5fdebddc 100644 --- a/source/src/apps/pilot/jkleman/simple_rotamer_recovery.cc +++ b/source/src/apps/pilot/jkleman/simple_rotamer_recovery.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -133,7 +133,7 @@ main( int argc, char * argv [] ) simple_rotamer_recovery(); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/spanfile_from_pdb.cc b/source/src/apps/pilot/jkleman/spanfile_from_pdb.cc index c6dc74f05c..e94f5f5dd4 100644 --- a/source/src/apps/pilot/jkleman/spanfile_from_pdb.cc +++ b/source/src/apps/pilot/jkleman/spanfile_from_pdb.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -78,7 +78,7 @@ Pose read_pose() { // cry if PDB not given if ( ! option[OptionKeys::in::file::s].user() ) { - throw new utility::excn::EXCN_Msg_Exception("Please provide PDB file!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide PDB file!"); } // read in pose @@ -203,7 +203,7 @@ main( int argc, char * argv [] ) spanfile_from_pdb(); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jkleman/transform_into_membrane.cc b/source/src/apps/pilot/jkleman/transform_into_membrane.cc index ca1356011d..08cc3e53ba 100644 --- a/source/src/apps/pilot/jkleman/transform_into_membrane.cc +++ b/source/src/apps/pilot/jkleman/transform_into_membrane.cc @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -59,7 +59,7 @@ main( int argc, char * argv [] ) { // call jobdistributor on sequence mover JobDistributor::get_instance()->go( seq ); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/compute_ddgs.cc b/source/src/apps/pilot/johnk/compute_ddgs.cc index 13ae1e2d9b..50ac9436b5 100644 --- a/source/src/apps/pilot/johnk/compute_ddgs.cc +++ b/source/src/apps/pilot/johnk/compute_ddgs.cc @@ -230,7 +230,7 @@ main( int argc, char * argv [] ) std::cout << "Successfully finished computing ddGs" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/david_check_pocket.cc b/source/src/apps/pilot/johnk/david_check_pocket.cc index 1b2b31eaf1..7bb6e1e541 100644 --- a/source/src/apps/pilot/johnk/david_check_pocket.cc +++ b/source/src/apps/pilot/johnk/david_check_pocket.cc @@ -241,7 +241,7 @@ main( int argc, char * argv [] ) std::cout << "Successfully finished relaxing backbone around central residue" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/david_open_pocket.cc b/source/src/apps/pilot/johnk/david_open_pocket.cc index 634ee685ad..d283d8c65b 100644 --- a/source/src/apps/pilot/johnk/david_open_pocket.cc +++ b/source/src/apps/pilot/johnk/david_open_pocket.cc @@ -244,7 +244,7 @@ main( int argc, char * argv [] ) std::cout << "Successfully finished relaxing backbone around central residue" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/hotspot_test.cc b/source/src/apps/pilot/johnk/hotspot_test.cc index ca2377fce8..67cc449cae 100644 --- a/source/src/apps/pilot/johnk/hotspot_test.cc +++ b/source/src/apps/pilot/johnk/hotspot_test.cc @@ -190,7 +190,7 @@ main( int argc, char * argv [] ) std::cout << "JK Successfully finishing hotspot test" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_exact_geometric_solvation.cc b/source/src/apps/pilot/johnk/johnk_exact_geometric_solvation.cc index de01ef1eed..82958cd45f 100644 --- a/source/src/apps/pilot/johnk/johnk_exact_geometric_solvation.cc +++ b/source/src/apps/pilot/johnk/johnk_exact_geometric_solvation.cc @@ -160,7 +160,7 @@ main( int argc, char * argv [] ) TR << "Done computing solvation energies" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_gapless_threading.cc b/source/src/apps/pilot/johnk/johnk_gapless_threading.cc index 691d1c3151..29361d6946 100644 --- a/source/src/apps/pilot/johnk/johnk_gapless_threading.cc +++ b/source/src/apps/pilot/johnk/johnk_gapless_threading.cc @@ -114,7 +114,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished replacing sequence." << std::endl; TR << "Made " << num_mut << " mutations, preserved sequence at " << num_preserved << " positions." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_interface_geosol_minimization.cc b/source/src/apps/pilot/johnk/johnk_interface_geosol_minimization.cc index 9bf88309eb..d16e30c35f 100644 --- a/source/src/apps/pilot/johnk/johnk_interface_geosol_minimization.cc +++ b/source/src/apps/pilot/johnk/johnk_interface_geosol_minimization.cc @@ -198,7 +198,7 @@ main( int argc, char * argv [] ) TR << "jk done analysis" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_interface_recompute_score_and_rmsd.cc b/source/src/apps/pilot/johnk/johnk_interface_recompute_score_and_rmsd.cc index d61ac2d89e..f3dac79b88 100644 --- a/source/src/apps/pilot/johnk/johnk_interface_recompute_score_and_rmsd.cc +++ b/source/src/apps/pilot/johnk/johnk_interface_recompute_score_and_rmsd.cc @@ -160,7 +160,7 @@ main( int argc, char * argv [] ) outstream.close(); outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_parametrize_geometric_solvation.cc b/source/src/apps/pilot/johnk/johnk_parametrize_geometric_solvation.cc index 68d9b20aef..0f2f1ce8aa 100644 --- a/source/src/apps/pilot/johnk/johnk_parametrize_geometric_solvation.cc +++ b/source/src/apps/pilot/johnk/johnk_parametrize_geometric_solvation.cc @@ -596,7 +596,7 @@ main( int argc, char * argv [] ) TR << "jk finished computing desired geometric solvation potential" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/johnk_recompute_score_and_rmsd.cc b/source/src/apps/pilot/johnk/johnk_recompute_score_and_rmsd.cc index 303ebf3e8f..9b62cd8d8e 100644 --- a/source/src/apps/pilot/johnk/johnk_recompute_score_and_rmsd.cc +++ b/source/src/apps/pilot/johnk/johnk_recompute_score_and_rmsd.cc @@ -105,7 +105,7 @@ main( int argc, char * argv [] ) outstream.close(); outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/justin_identify_holes.cc b/source/src/apps/pilot/johnk/justin_identify_holes.cc index 0c250ffb78..8b8b17678a 100644 --- a/source/src/apps/pilot/johnk/justin_identify_holes.cc +++ b/source/src/apps/pilot/johnk/justin_identify_holes.cc @@ -109,7 +109,7 @@ main( int argc, char * argv [] ) // outstream.close(); // outstream.clear(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/justin_local_backrub.cc b/source/src/apps/pilot/johnk/justin_local_backrub.cc index 97bbf8fe47..8c4f0c211a 100644 --- a/source/src/apps/pilot/johnk/justin_local_backrub.cc +++ b/source/src/apps/pilot/johnk/justin_local_backrub.cc @@ -313,7 +313,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished relaxing backbone around central cluster" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/metrics_test.cc b/source/src/apps/pilot/johnk/metrics_test.cc index 62ddf63a4f..a651471051 100644 --- a/source/src/apps/pilot/johnk/metrics_test.cc +++ b/source/src/apps/pilot/johnk/metrics_test.cc @@ -195,7 +195,7 @@ main( int argc, char * argv [] ) std::cout << "JK Successfully finishing hotspot test" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/nadeem_compensatory_mutation.cc b/source/src/apps/pilot/johnk/nadeem_compensatory_mutation.cc index 78dd9c305d..27c255a65d 100644 --- a/source/src/apps/pilot/johnk/nadeem_compensatory_mutation.cc +++ b/source/src/apps/pilot/johnk/nadeem_compensatory_mutation.cc @@ -199,7 +199,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished redesigning compensatory mutations" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/nadeem_find_destabilizing_mutation.cc b/source/src/apps/pilot/johnk/nadeem_find_destabilizing_mutation.cc index b1b7fd4256..111b518f95 100644 --- a/source/src/apps/pilot/johnk/nadeem_find_destabilizing_mutation.cc +++ b/source/src/apps/pilot/johnk/nadeem_find_destabilizing_mutation.cc @@ -234,7 +234,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished computing ddGs" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/old_test_geosol_minimization.cc b/source/src/apps/pilot/johnk/old_test_geosol_minimization.cc index ff65f27d0c..3d46f6e738 100644 --- a/source/src/apps/pilot/johnk/old_test_geosol_minimization.cc +++ b/source/src/apps/pilot/johnk/old_test_geosol_minimization.cc @@ -105,7 +105,7 @@ main( int argc, char * argv [] ) TR << "jk finished testing derivatives" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/ragul_backbone_diversity.cc b/source/src/apps/pilot/johnk/ragul_backbone_diversity.cc index b787ce4273..b8849288d8 100644 --- a/source/src/apps/pilot/johnk/ragul_backbone_diversity.cc +++ b/source/src/apps/pilot/johnk/ragul_backbone_diversity.cc @@ -176,7 +176,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished relaxing backbone" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/srirupa_phosphoArg_build_rotamers.cc b/source/src/apps/pilot/johnk/srirupa_phosphoArg_build_rotamers.cc index 324a2eb719..fbaa962b98 100644 --- a/source/src/apps/pilot/johnk/srirupa_phosphoArg_build_rotamers.cc +++ b/source/src/apps/pilot/johnk/srirupa_phosphoArg_build_rotamers.cc @@ -304,7 +304,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished building Args" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/johnk/srirupa_two_loops.cc b/source/src/apps/pilot/johnk/srirupa_two_loops.cc index c0a0e36835..3f2e9627fd 100644 --- a/source/src/apps/pilot/johnk/srirupa_two_loops.cc +++ b/source/src/apps/pilot/johnk/srirupa_two_loops.cc @@ -219,7 +219,7 @@ main( int argc, char * argv [] ) TR << "Successfully finished relaxing backbone" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/josh/motif_loop_build.cc b/source/src/apps/pilot/josh/motif_loop_build.cc index cc12820fc2..ee0840e0cd 100644 --- a/source/src/apps/pilot/josh/motif_loop_build.cc +++ b/source/src/apps/pilot/josh/motif_loop_build.cc @@ -30,7 +30,7 @@ int main( int argc, char * argv[] ) this_run.apply(pose); //pose.dump_pdb("final_model.pdb"); std::cout << "******Sucessfull Run!******\n\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/jrporter/topo_driver.cc b/source/src/apps/pilot/jrporter/topo_driver.cc index 4a2d4dede0..62547fcf4b 100644 --- a/source/src/apps/pilot/jrporter/topo_driver.cc +++ b/source/src/apps/pilot/jrporter/topo_driver.cc @@ -158,7 +158,7 @@ int main( int argc, char** argv ){ try { test_chunk( pose ); - } catch ( utility::excn::EXCN_Msg_Exception excn ){ + } catch (utility::excn::Exception excn ){ std::cout << excn << std::endl; std::exit( 1 ); } diff --git a/source/src/apps/pilot/jstev/collect_features.cc b/source/src/apps/pilot/jstev/collect_features.cc index f0da1bd5e4..2692418f8e 100644 --- a/source/src/apps/pilot/jstev/collect_features.cc +++ b/source/src/apps/pilot/jstev/collect_features.cc @@ -371,7 +371,7 @@ main(int argc, char* argv[]){ iter->print_features(std::cout); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kblacklock/loodo.cc b/source/src/apps/pilot/kblacklock/loodo.cc index 7c94c00393..2c0a872c13 100644 --- a/source/src/apps/pilot/kblacklock/loodo.cc +++ b/source/src/apps/pilot/kblacklock/loodo.cc @@ -1131,7 +1131,7 @@ int main(int argc, char *argv[]) caphitRTs.close(); DebugRTs.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kblacklock/transform_loodo.cc b/source/src/apps/pilot/kblacklock/transform_loodo.cc index 36fedbc761..d1f9217dae 100644 --- a/source/src/apps/pilot/kblacklock/transform_loodo.cc +++ b/source/src/apps/pilot/kblacklock/transform_loodo.cc @@ -138,7 +138,7 @@ int main( int argc, char * argv [] ) { } stream.close(); - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kdrew/inverse_rotlib_dump.cc b/source/src/apps/pilot/kdrew/inverse_rotlib_dump.cc index 4019ae57a0..56ce658b2e 100644 --- a/source/src/apps/pilot/kdrew/inverse_rotlib_dump.cc +++ b/source/src/apps/pilot/kdrew/inverse_rotlib_dump.cc @@ -126,7 +126,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( IRD_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kdrew/ld_converter.cc b/source/src/apps/pilot/kdrew/ld_converter.cc index 0b625ea5e8..ac73ca2c4f 100644 --- a/source/src/apps/pilot/kdrew/ld_converter.cc +++ b/source/src/apps/pilot/kdrew/ld_converter.cc @@ -164,7 +164,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( LDC_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kdrew/oop_creator.cc b/source/src/apps/pilot/kdrew/oop_creator.cc index fd6d51eda0..f627594f38 100644 --- a/source/src/apps/pilot/kdrew/oop_creator.cc +++ b/source/src/apps/pilot/kdrew/oop_creator.cc @@ -191,7 +191,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( OC_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kdrew/oop_dock_design.cc b/source/src/apps/pilot/kdrew/oop_dock_design.cc index acf8faf486..5d04c1940f 100644 --- a/source/src/apps/pilot/kdrew/oop_dock_design.cc +++ b/source/src/apps/pilot/kdrew/oop_dock_design.cc @@ -284,7 +284,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( ODDM_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kdrew/scaffold_matcher.cc b/source/src/apps/pilot/kdrew/scaffold_matcher.cc index 501aeb4111..ad0a246ff8 100644 --- a/source/src/apps/pilot/kdrew/scaffold_matcher.cc +++ b/source/src/apps/pilot/kdrew/scaffold_matcher.cc @@ -145,7 +145,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( HP_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/FastGap.cc b/source/src/apps/pilot/kenjung/FastGap.cc index a9227f6d1c..6d4b7cd1bc 100644 --- a/source/src/apps/pilot/kenjung/FastGap.cc +++ b/source/src/apps/pilot/kenjung/FastGap.cc @@ -95,7 +95,7 @@ main( int argc, char * argv [] ) (it->second).dump_pdb(m); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/elscripts.cc b/source/src/apps/pilot/kenjung/elscripts.cc index 4686bf0bdf..b8e52bb242 100644 --- a/source/src/apps/pilot/kenjung/elscripts.cc +++ b/source/src/apps/pilot/kenjung/elscripts.cc @@ -164,7 +164,7 @@ main( int argc, char * argv [] ) role.go(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/fragpdb.cc b/source/src/apps/pilot/kenjung/fragpdb.cc index 89dae95a40..d38cea988b 100644 --- a/source/src/apps/pilot/kenjung/fragpdb.cc +++ b/source/src/apps/pilot/kenjung/fragpdb.cc @@ -125,7 +125,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/loophash_createfiltereddb.cc b/source/src/apps/pilot/kenjung/loophash_createfiltereddb.cc index edd8069363..db9de9167c 100644 --- a/source/src/apps/pilot/kenjung/loophash_createfiltereddb.cc +++ b/source/src/apps/pilot/kenjung/loophash_createfiltereddb.cc @@ -96,7 +96,7 @@ main( int argc, char * argv [] ) TR << "Saving partition..." << std::endl; try { loop_hash_library->save_db(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( TR ); TR << "Exception occured!" << std::endl; MPI_Abort( MPI_COMM_WORLD, 1 ); @@ -135,7 +135,7 @@ main( int argc, char * argv [] ) } // Future: Extra step that strips out backbone sequences that aren't used // Would be a pain because all the indexes would be shifted - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( TR ); MPI_Abort( MPI_COMM_WORLD, 1 ); } @@ -149,7 +149,7 @@ main( int argc, char * argv [] ) loop_hash_library->sort(); try { loop_hash_library->save_db(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( TR ); MPI_Abort( MPI_COMM_WORLD, 1 ); } @@ -167,7 +167,7 @@ main( int argc, char * argv [] ) TR << "Total time: " << (endtime - starttime) / 60 << " min" << std::endl; } #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/lua_test.cc b/source/src/apps/pilot/kenjung/lua_test.cc index f6c9036d05..68b1c7f84b 100644 --- a/source/src/apps/pilot/kenjung/lua_test.cc +++ b/source/src/apps/pilot/kenjung/lua_test.cc @@ -108,7 +108,7 @@ main( int argc, char * argv [] ) trmain << lua_tostring(lstate_, -1) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/pose_serialize_test.cc b/source/src/apps/pilot/kenjung/pose_serialize_test.cc index 4ebc5d4ce0..a6f48a89bc 100644 --- a/source/src/apps/pilot/kenjung/pose_serialize_test.cc +++ b/source/src/apps/pilot/kenjung/pose_serialize_test.cc @@ -77,7 +77,7 @@ main( int argc, char * argv [] ) trmain << "dumping" << std::endl; out->dump_pdb(option[ m::file]().name()+".redump"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/sixdtreeTEST.cc b/source/src/apps/pilot/kenjung/sixdtreeTEST.cc index ec44d8d3b0..8a48597e33 100644 --- a/source/src/apps/pilot/kenjung/sixdtreeTEST.cc +++ b/source/src/apps/pilot/kenjung/sixdtreeTEST.cc @@ -70,7 +70,7 @@ main( int argc, char * argv [] ) TR << *itr << std::endl; } */ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kenjung/symfragrm.cc b/source/src/apps/pilot/kenjung/symfragrm.cc index f5c7582c27..ca73959d29 100644 --- a/source/src/apps/pilot/kenjung/symfragrm.cc +++ b/source/src/apps/pilot/kenjung/symfragrm.cc @@ -96,7 +96,7 @@ main( int argc, char * argv [] ) TR << bin_index << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder2.cc b/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder2.cc index 1c5bd0120b..349247bf9d 100644 --- a/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder2.cc +++ b/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder2.cc @@ -635,7 +635,7 @@ int main(int argc, char* argv[]) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder3.cc b/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder3.cc index bf2d395b9b..389d61487c 100644 --- a/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder3.cc +++ b/source/src/apps/pilot/kevin/BuriedUnsatPolarsFinder3.cc @@ -229,7 +229,7 @@ int main(int argc, char* argv[]) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/buns.cc b/source/src/apps/pilot/kevin/buns.cc index 14558f37fb..e984bb99cb 100644 --- a/source/src/apps/pilot/kevin/buns.cc +++ b/source/src/apps/pilot/kevin/buns.cc @@ -333,7 +333,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/bur_nodon_tyr.cc b/source/src/apps/pilot/kevin/bur_nodon_tyr.cc index 2654f9e3ca..c57d7f82f7 100644 --- a/source/src/apps/pilot/kevin/bur_nodon_tyr.cc +++ b/source/src/apps/pilot/kevin/bur_nodon_tyr.cc @@ -265,7 +265,7 @@ int main( int argc, char* argv[] ) { pdb++; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/khSandbox.cc b/source/src/apps/pilot/kevin/khSandbox.cc index 1c4ccdef4c..b246f044f8 100644 --- a/source/src/apps/pilot/kevin/khSandbox.cc +++ b/source/src/apps/pilot/kevin/khSandbox.cc @@ -151,7 +151,7 @@ int main(int argc, char* argv[]) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/khSandbox2.cc b/source/src/apps/pilot/kevin/khSandbox2.cc index 87bbc357c1..83406d7e61 100644 --- a/source/src/apps/pilot/kevin/khSandbox2.cc +++ b/source/src/apps/pilot/kevin/khSandbox2.cc @@ -84,7 +84,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/khXtal_water_bunsat.cc b/source/src/apps/pilot/kevin/khXtal_water_bunsat.cc index f04592519b..a598e9bf62 100644 --- a/source/src/apps/pilot/kevin/khXtal_water_bunsat.cc +++ b/source/src/apps/pilot/kevin/khXtal_water_bunsat.cc @@ -251,7 +251,7 @@ int main( int argc, char* argv[] ) { TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/read_l_print_pdbinfo.cc b/source/src/apps/pilot/kevin/read_l_print_pdbinfo.cc index 07f941a74a..e2df4b67ef 100644 --- a/source/src/apps/pilot/kevin/read_l_print_pdbinfo.cc +++ b/source/src/apps/pilot/kevin/read_l_print_pdbinfo.cc @@ -285,7 +285,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/sasa_buns.cc b/source/src/apps/pilot/kevin/sasa_buns.cc index 64143ca30c..5af06e7ce1 100644 --- a/source/src/apps/pilot/kevin/sasa_buns.cc +++ b/source/src/apps/pilot/kevin/sasa_buns.cc @@ -330,7 +330,7 @@ int main( int argc, char* argv[] ) { TR << "separation: " << sep << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/template.cc b/source/src/apps/pilot/kevin/template.cc index a2a86565f5..23e18936ad 100644 --- a/source/src/apps/pilot/kevin/template.cc +++ b/source/src/apps/pilot/kevin/template.cc @@ -140,7 +140,7 @@ int main(int argc, char* argv[]) TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/vsasa_buns.cc b/source/src/apps/pilot/kevin/vsasa_buns.cc index 9a5a3d31b7..a52845197c 100644 --- a/source/src/apps/pilot/kevin/vsasa_buns.cc +++ b/source/src/apps/pilot/kevin/vsasa_buns.cc @@ -574,7 +574,7 @@ int main(int argc, char* argv[]) //std::cout << "separation: " << sep << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kevin/vsasa_pdbcode_res.cc b/source/src/apps/pilot/kevin/vsasa_pdbcode_res.cc index f86e73874c..23a2b146cc 100644 --- a/source/src/apps/pilot/kevin/vsasa_pdbcode_res.cc +++ b/source/src/apps/pilot/kevin/vsasa_pdbcode_res.cc @@ -301,7 +301,7 @@ int main(int argc, char* argv[]) buns_stats(pdb_list, AHdist, hb_geom_strat1, vsasa_calc, burial_cutoff); - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } return 0; diff --git a/source/src/apps/pilot/kevin/wat_distances.cc b/source/src/apps/pilot/kevin/wat_distances.cc index 40870c2541..97cdf82463 100644 --- a/source/src/apps/pilot/kevin/wat_distances.cc +++ b/source/src/apps/pilot/kevin/wat_distances.cc @@ -203,7 +203,7 @@ int main( int argc, char* argv[] ) { TR << "************************d**o**n**e**************************************" << std::endl; - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/kkappel/analyze_docked_RNA_motifs.cc b/source/src/apps/pilot/kkappel/analyze_docked_RNA_motifs.cc index 78be87ff32..1d0a2e39d6 100644 --- a/source/src/apps/pilot/kkappel/analyze_docked_RNA_motifs.cc +++ b/source/src/apps/pilot/kkappel/analyze_docked_RNA_motifs.cc @@ -333,7 +333,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kkappel/calculate_distances.cc b/source/src/apps/pilot/kkappel/calculate_distances.cc index 5e583b9b68..4b7288714e 100644 --- a/source/src/apps/pilot/kkappel/calculate_distances.cc +++ b/source/src/apps/pilot/kkappel/calculate_distances.cc @@ -855,7 +855,7 @@ int main( int argc, char ** argv ) { devel::init( argc, argv ); calculate_distances(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kkappel/check_rnp_coarse.cc b/source/src/apps/pilot/kkappel/check_rnp_coarse.cc index 33f1c7c712..a2febb51c6 100644 --- a/source/src/apps/pilot/kkappel/check_rnp_coarse.cc +++ b/source/src/apps/pilot/kkappel/check_rnp_coarse.cc @@ -142,7 +142,7 @@ int main( int argc, char ** argv ) { devel::init( argc, argv ); check_structures(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kkappel/get_rmsd.cc b/source/src/apps/pilot/kkappel/get_rmsd.cc index 2f00ef0d85..b1ffe8f5b0 100644 --- a/source/src/apps/pilot/kkappel/get_rmsd.cc +++ b/source/src/apps/pilot/kkappel/get_rmsd.cc @@ -347,7 +347,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kkappel/score_rnp_lowres.cc b/source/src/apps/pilot/kkappel/score_rnp_lowres.cc index fabaa5c42d..0cf0c1dfc2 100644 --- a/source/src/apps/pilot/kkappel/score_rnp_lowres.cc +++ b/source/src/apps/pilot/kkappel/score_rnp_lowres.cc @@ -153,7 +153,7 @@ int main( int argc, char ** argv ) { devel::init( argc, argv ); check_structures(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kuichan/design_disulfide.cc b/source/src/apps/pilot/kuichan/design_disulfide.cc index 35a4593a2a..0904b19b0a 100644 --- a/source/src/apps/pilot/kuichan/design_disulfide.cc +++ b/source/src/apps/pilot/kuichan/design_disulfide.cc @@ -230,7 +230,7 @@ int main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/kyleb/fragment_extract.cc b/source/src/apps/pilot/kyleb/fragment_extract.cc index 689512345b..e6bbc34e6b 100644 --- a/source/src/apps/pilot/kyleb/fragment_extract.cc +++ b/source/src/apps/pilot/kyleb/fragment_extract.cc @@ -186,7 +186,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/labonte/debug_labontes_current_work.cc b/source/src/apps/pilot/labonte/debug_labontes_current_work.cc index 929cdc5075..3b93127eed 100644 --- a/source/src/apps/pilot/labonte/debug_labontes_current_work.cc +++ b/source/src/apps/pilot/labonte/debug_labontes_current_work.cc @@ -124,7 +124,7 @@ main( int argc, char *argv[] ) }*/ //pose.dump_pdb( "" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/labonte/glycosyltransferase.cc b/source/src/apps/pilot/labonte/glycosyltransferase.cc index 7fa2b0449c..be5bf869bc 100644 --- a/source/src/apps/pilot/labonte/glycosyltransferase.cc +++ b/source/src/apps/pilot/labonte/glycosyltransferase.cc @@ -49,7 +49,7 @@ main( int argc, char *argv[] ) // Distribute the mover. jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return FAILURE; } diff --git a/source/src/apps/pilot/labonte/load_crazy_sugars.cc b/source/src/apps/pilot/labonte/load_crazy_sugars.cc index 22cb21c89e..62afdb371f 100644 --- a/source/src/apps/pilot/labonte/load_crazy_sugars.cc +++ b/source/src/apps/pilot/labonte/load_crazy_sugars.cc @@ -45,7 +45,7 @@ main( int argc, char *argv[] ) pose_from_file( crazy_sugar, PATH + "fix5-trimerized_chainA_w_LINKs.pdb" , core::import_pose::PDB_file); cout << crazy_sugar << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/pilot/labonte/test_ResidueProperties.cc b/source/src/apps/pilot/labonte/test_ResidueProperties.cc index fda5453b95..a964222612 100644 --- a/source/src/apps/pilot/labonte/test_ResidueProperties.cc +++ b/source/src/apps/pilot/labonte/test_ResidueProperties.cc @@ -91,7 +91,7 @@ main( int argc, char *argv[] ) cout << pose.residue( 1 ) << endl; - } catch ( excn::EXCN_Base const & e ) { + } catch (excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/pilot/labonte/test_glycan_linkages.cc b/source/src/apps/pilot/labonte/test_glycan_linkages.cc index ceaf8869c7..03bb1929be 100644 --- a/source/src/apps/pilot/labonte/test_glycan_linkages.cc +++ b/source/src/apps/pilot/labonte/test_glycan_linkages.cc @@ -111,7 +111,7 @@ main( int argc, char *argv[] ) std::cout << "Output pose packed with RotamerTrialsMover." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return FAILURE; } diff --git a/source/src/apps/pilot/labonte/test_sugar_torsion_getters_and_setters.cc b/source/src/apps/pilot/labonte/test_sugar_torsion_getters_and_setters.cc index acac683691..dbd4a5ea4c 100644 --- a/source/src/apps/pilot/labonte/test_sugar_torsion_getters_and_setters.cc +++ b/source/src/apps/pilot/labonte/test_sugar_torsion_getters_and_setters.cc @@ -98,7 +98,7 @@ main( int argc, char *argv[] ) cout << " Setting omega to 180. "; pose.set_omega(3, 180.0); cout << "Omega is now " << pose.omega(3) << endl << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "caught exception " << e.msg() << endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/deepMove.cc b/source/src/apps/pilot/lemmon/deepMove.cc index f47c43e6d0..22bc95f44f 100644 --- a/source/src/apps/pilot/lemmon/deepMove.cc +++ b/source/src/apps/pilot/lemmon/deepMove.cc @@ -95,7 +95,7 @@ int main(int argc, char* argv[]) pose.dump_pdb(output); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/ligand_design.cc b/source/src/apps/pilot/lemmon/ligand_design.cc index e59e55c28e..c3aa54edbf 100644 --- a/source/src/apps/pilot/lemmon/ligand_design.cc +++ b/source/src/apps/pilot/lemmon/ligand_design.cc @@ -59,7 +59,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go(new protocols::ligand_docking::GrowLigand("X")); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/pack.cc b/source/src/apps/pilot/lemmon/pack.cc index 127db203c0..85825d1409 100644 --- a/source/src/apps/pilot/lemmon/pack.cc +++ b/source/src/apps/pilot/lemmon/pack.cc @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) pose.dump_scored_pdb(output, *score_fxn); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/protonatePack.cc b/source/src/apps/pilot/lemmon/protonatePack.cc index fe013d1cc4..1cfc8cd363 100644 --- a/source/src/apps/pilot/lemmon/protonatePack.cc +++ b/source/src/apps/pilot/lemmon/protonatePack.cc @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) const std::string output("output.pdb"); pose.dump_pdb(output); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/randomMove.cc b/source/src/apps/pilot/lemmon/randomMove.cc index 399b628581..2b233954ab 100644 --- a/source/src/apps/pilot/lemmon/randomMove.cc +++ b/source/src/apps/pilot/lemmon/randomMove.cc @@ -69,7 +69,7 @@ int main(int argc, char* argv[]) const std::string output("output.pdb"); pose.dump_scored_pdb(output, *mover.scorefxn()); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/readAndWrite.cc b/source/src/apps/pilot/lemmon/readAndWrite.cc index c6e71bff85..847b6d5a6e 100644 --- a/source/src/apps/pilot/lemmon/readAndWrite.cc +++ b/source/src/apps/pilot/lemmon/readAndWrite.cc @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) const std::string output("output.pdb"); pose.dump_pdb(output); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lemmon/simpleScore.cc b/source/src/apps/pilot/lemmon/simpleScore.cc index 975366658b..f02ab1803f 100644 --- a/source/src/apps/pilot/lemmon/simpleScore.cc +++ b/source/src/apps/pilot/lemmon/simpleScore.cc @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) const std::string output("output.pdb"); pose.dump_scored_pdb(output, scoreFunction); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lin/SymmAbrelax.cc b/source/src/apps/pilot/lin/SymmAbrelax.cc index 5a1ef5d4a3..f32000a698 100644 --- a/source/src/apps/pilot/lin/SymmAbrelax.cc +++ b/source/src/apps/pilot/lin/SymmAbrelax.cc @@ -321,7 +321,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lin/SymmSilentFile.cc b/source/src/apps/pilot/lin/SymmSilentFile.cc index 32b77a7a31..6a87a40350 100644 --- a/source/src/apps/pilot/lin/SymmSilentFile.cc +++ b/source/src/apps/pilot/lin/SymmSilentFile.cc @@ -164,7 +164,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lior/CycDsulf.cc b/source/src/apps/pilot/lior/CycDsulf.cc index 0c5da5687e..a80daa1f5c 100644 --- a/source/src/apps/pilot/lior/CycDsulf.cc +++ b/source/src/apps/pilot/lior/CycDsulf.cc @@ -375,7 +375,7 @@ int main (int argc, char** argv) { workpose.dump_pdb("Job_"+int2string(s)+".pdb"); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lior/CycPepMain.cc b/source/src/apps/pilot/lior/CycPepMain.cc index 86b2213728..95e89bc0fc 100644 --- a/source/src/apps/pilot/lior/CycPepMain.cc +++ b/source/src/apps/pilot/lior/CycPepMain.cc @@ -300,7 +300,7 @@ main( int argc, char * argv [] ) // protocols::jobdist::main_plain_mover( *fpDock); //protocols::jobdist::universal_main(*fpDock); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/lior/feature_schema_generator.cc b/source/src/apps/pilot/lior/feature_schema_generator.cc index 18a3f81319..ec9c3e68f5 100644 --- a/source/src/apps/pilot/lior/feature_schema_generator.cc +++ b/source/src/apps/pilot/lior/feature_schema_generator.cc @@ -23,7 +23,7 @@ main( int argc, char * argv [] ) std::cout<add_new( *ss, best_decoy, addr, true, new_level ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/ensemble_generator.cc b/source/src/apps/pilot/liz/ensemble_generator.cc index cc7e2719b7..a5bf7aee8d 100644 --- a/source/src/apps/pilot/liz/ensemble_generator.cc +++ b/source/src/apps/pilot/liz/ensemble_generator.cc @@ -504,7 +504,7 @@ main( int argc, char* argv [] ) create_ensemble(pose, *scorefxn , (no_pdb.erase(0,(no_pdb.find_last_of("/")+1)))); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/ensemble_generator_score12_sidechain.cc b/source/src/apps/pilot/liz/ensemble_generator_score12_sidechain.cc index e2c8a2b474..ee89ad29fc 100644 --- a/source/src/apps/pilot/liz/ensemble_generator_score12_sidechain.cc +++ b/source/src/apps/pilot/liz/ensemble_generator_score12_sidechain.cc @@ -521,7 +521,7 @@ main( int argc, char* argv [] ) create_ensemble(pose, scorefxn , (no_pdb.erase(0,(no_pdb.find_last_of("/")+1)))); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/ensemble_generator_using_mover.cc b/source/src/apps/pilot/liz/ensemble_generator_using_mover.cc index 95c517962e..cb0d6ce624 100644 --- a/source/src/apps/pilot/liz/ensemble_generator_using_mover.cc +++ b/source/src/apps/pilot/liz/ensemble_generator_using_mover.cc @@ -154,7 +154,7 @@ main( int argc, char* argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/minimize_with_constraints.cc b/source/src/apps/pilot/liz/minimize_with_constraints.cc index 1380feab3e..1e8e018836 100644 --- a/source/src/apps/pilot/liz/minimize_with_constraints.cc +++ b/source/src/apps/pilot/liz/minimize_with_constraints.cc @@ -165,7 +165,7 @@ main( int argc, char* argv [] ) // jobdist->dump_pose_and_map( curr_job->output_tag(curr_nstruct), pose ); // output PDB - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/minimize_with_cst.cc b/source/src/apps/pilot/liz/minimize_with_cst.cc index 5b08bf3f30..20b869736b 100644 --- a/source/src/apps/pilot/liz/minimize_with_cst.cc +++ b/source/src/apps/pilot/liz/minimize_with_cst.cc @@ -415,7 +415,7 @@ main( int argc, char* argv [] ) //then minimize } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/monomer_ddg.cc b/source/src/apps/pilot/liz/monomer_ddg.cc index 7190d07bf7..ce59cd9b69 100644 --- a/source/src/apps/pilot/liz/monomer_ddg.cc +++ b/source/src/apps/pilot/liz/monomer_ddg.cc @@ -566,7 +566,7 @@ main( int argc, char * argv [] ) } ddg_output << std::endl; //end - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/sasa.cc b/source/src/apps/pilot/liz/sasa.cc index 3eeb822f65..4a7577e721 100644 --- a/source/src/apps/pilot/liz/sasa.cc +++ b/source/src/apps/pilot/liz/sasa.cc @@ -279,7 +279,7 @@ main( int argc, char* argv [] ) << nbrs[i] << " " << F( width, precision, fa_atr[i] )<< " " << F( width, precision, fa_sol[i] ) << " " << files[f] << "\n"; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/score_ddgs.cc b/source/src/apps/pilot/liz/score_ddgs.cc index ace2a7677e..50f3588e11 100644 --- a/source/src/apps/pilot/liz/score_ddgs.cc +++ b/source/src/apps/pilot/liz/score_ddgs.cc @@ -560,7 +560,7 @@ main(int argc, char* argv []){ print_verbose_ddgs(mut,wt,sfxn,mean,min,experimental_value,outfile); } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/test_canonical_mover.cc b/source/src/apps/pilot/liz/test_canonical_mover.cc index 4adacc903e..f7e3a85591 100644 --- a/source/src/apps/pilot/liz/test_canonical_mover.cc +++ b/source/src/apps/pilot/liz/test_canonical_mover.cc @@ -29,7 +29,7 @@ main( int argc, char * argv [] ){ protocols::canonical_sampling::canonical_sampling_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/liz/test_scmcmover.cc b/source/src/apps/pilot/liz/test_scmcmover.cc index fdbc4ae970..d88ed6d572 100644 --- a/source/src/apps/pilot/liz/test_scmcmover.cc +++ b/source/src/apps/pilot/liz/test_scmcmover.cc @@ -151,7 +151,7 @@ main(int argc, char* argv []){ (*sfxn)( pose ); sfxn->show( pose ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/luki/sc.cc b/source/src/apps/pilot/luki/sc.cc index 70d02a97f4..2150bb6c12 100644 --- a/source/src/apps/pilot/luki/sc.cc +++ b/source/src/apps/pilot/luki/sc.cc @@ -143,7 +143,7 @@ main( int argc, char * argv [] ) std::cout << count << " structures processed." << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mdsmith/ligand_motifs.cc b/source/src/apps/pilot/mdsmith/ligand_motifs.cc index d4f352ff79..a0a6f6904c 100644 --- a/source/src/apps/pilot/mdsmith/ligand_motifs.cc +++ b/source/src/apps/pilot/mdsmith/ligand_motifs.cc @@ -598,7 +598,7 @@ process_file_list() Pose pose; try{ core::import_pose::pose_from_file( pose, pdb_name , core::import_pose::PDB_file); - } catch( utility::excn::EXCN_BadInput excn ) { + } catch (utility::excn::BadInput excn ) { std::cout << "Got stuck in missing heavyatom loop, continuing" << std::endl; continue; } @@ -626,7 +626,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); process_file_list(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mdsmith/motif_ligand_packer_design.cc b/source/src/apps/pilot/mdsmith/motif_ligand_packer_design.cc index 77a9cd2140..7fb3c41ab2 100644 --- a/source/src/apps/pilot/mdsmith/motif_ligand_packer_design.cc +++ b/source/src/apps/pilot/mdsmith/motif_ligand_packer_design.cc @@ -190,7 +190,7 @@ main( int argc, char * argv [] ) std::cout << "SUCCESSFUL COMPLETION" << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/load_membrane_pose.cc b/source/src/apps/pilot/membrane/load_membrane_pose.cc index 31dcf4aadc..fcb2f4f0af 100644 --- a/source/src/apps/pilot/membrane/load_membrane_pose.cc +++ b/source/src/apps/pilot/membrane/load_membrane_pose.cc @@ -120,7 +120,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/membrane_ddG.cc b/source/src/apps/pilot/membrane/membrane_ddG.cc index e3be43ff62..f3ca6f8dbf 100644 --- a/source/src/apps/pilot/membrane/membrane_ddG.cc +++ b/source/src/apps/pilot/membrane/membrane_ddG.cc @@ -175,7 +175,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/membrane_relax.cc b/source/src/apps/pilot/membrane/membrane_relax.cc index 8b36bd61de..6a8f609287 100644 --- a/source/src/apps/pilot/membrane/membrane_relax.cc +++ b/source/src/apps/pilot/membrane/membrane_relax.cc @@ -81,7 +81,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/membrane_symdocking.cc b/source/src/apps/pilot/membrane/membrane_symdocking.cc index 49c7000b15..a12254ad03 100644 --- a/source/src/apps/pilot/membrane/membrane_symdocking.cc +++ b/source/src/apps/pilot/membrane/membrane_symdocking.cc @@ -60,7 +60,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/mp_rsd_energies.cc b/source/src/apps/pilot/membrane/mp_rsd_energies.cc index 3e4df9b8ff..c5800f5483 100644 --- a/source/src/apps/pilot/membrane/mp_rsd_energies.cc +++ b/source/src/apps/pilot/membrane/mp_rsd_energies.cc @@ -205,7 +205,7 @@ main( int argc, char* argv [] ) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/membrane/view_membrane_protein.cc b/source/src/apps/pilot/membrane/view_membrane_protein.cc index de7205aa3d..02c10791c3 100644 --- a/source/src/apps/pilot/membrane/view_membrane_protein.cc +++ b/source/src/apps/pilot/membrane/view_membrane_protein.cc @@ -111,7 +111,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/alignanalyse.cc b/source/src/apps/pilot/mike/alignanalyse.cc index aa568cb490..06f6873778 100644 --- a/source/src/apps/pilot/mike/alignanalyse.cc +++ b/source/src/apps/pilot/mike/alignanalyse.cc @@ -343,7 +343,7 @@ main( int argc, char * argv [] ) out.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/batchrelax.cc b/source/src/apps/pilot/mike/batchrelax.cc index 76aac841bd..460f252d8b 100644 --- a/source/src/apps/pilot/mike/batchrelax.cc +++ b/source/src/apps/pilot/mike/batchrelax.cc @@ -153,7 +153,7 @@ main( int argc, char * argv [] ) } // nstruct for } // while - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/crossaln.cc b/source/src/apps/pilot/mike/crossaln.cc index 1d2aa51ba7..9285d9512d 100644 --- a/source/src/apps/pilot/mike/crossaln.cc +++ b/source/src/apps/pilot/mike/crossaln.cc @@ -167,7 +167,7 @@ main( int argc, char* argv [] ) { } output.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/energy_diff.cc b/source/src/apps/pilot/mike/energy_diff.cc index 851deb9815..dabab71b99 100644 --- a/source/src/apps/pilot/mike/energy_diff.cc +++ b/source/src/apps/pilot/mike/energy_diff.cc @@ -164,7 +164,7 @@ main( int argc, char * argv [] ) pose1.dump_pdb("pdb1.pdb"); pose2.dump_pdb("pdb2.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/evolution.cc b/source/src/apps/pilot/mike/evolution.cc index 8dd96f6c59..a8142f8375 100644 --- a/source/src/apps/pilot/mike/evolution.cc +++ b/source/src/apps/pilot/mike/evolution.cc @@ -532,7 +532,7 @@ main( int argc, char * argv [] ) outfile.close(); std::cout << "Normal termination." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/inlinetest.cc b/source/src/apps/pilot/mike/inlinetest.cc index d3d6accea6..6287546c51 100644 --- a/source/src/apps/pilot/mike/inlinetest.cc +++ b/source/src/apps/pilot/mike/inlinetest.cc @@ -96,7 +96,7 @@ main( int argc, char * argv [] ) // std::cout << __FILE__ << __LINE__ << std::endl; // } //std::cout << __FILE__ << __LINE__ << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash.cc b/source/src/apps/pilot/mike/loophash.cc index f965b85cff..e2888cd5f7 100644 --- a/source/src/apps/pilot/mike/loophash.cc +++ b/source/src/apps/pilot/mike/loophash.cc @@ -82,7 +82,7 @@ #include #include #include -#include +#include static basic::Tracer TR( "main" ); @@ -571,14 +571,14 @@ main( int argc, char * argv [] ) try{ //protocols::jd2::JobDistributor::get_instance()->go( loop_hash_library ); protocols::jd2::JobDistributor::get_instance()->go( lh_sampler ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( TR.Info ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash_analyse.cc b/source/src/apps/pilot/mike/loophash_analyse.cc index 9fc95513d3..db11c583fe 100644 --- a/source/src/apps/pilot/mike/loophash_analyse.cc +++ b/source/src/apps/pilot/mike/loophash_analyse.cc @@ -447,14 +447,14 @@ main( int argc, char * argv [] ) // Normal mode with external loophash library try{ protocols::jd2::JobDistributor::get_instance()->go( lh_analyze ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash_cenrelax.cc b/source/src/apps/pilot/mike/loophash_cenrelax.cc index 25c14b2c18..088b95266d 100644 --- a/source/src/apps/pilot/mike/loophash_cenrelax.cc +++ b/source/src/apps/pilot/mike/loophash_cenrelax.cc @@ -504,14 +504,14 @@ main( int argc, char * argv [] ) try{ //protocols::jd2::JobDistributor::get_instance()->go( loop_hash_library ); protocols::jd2::JobDistributor::get_instance()->go( lh_sampler ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash_createdb.cc b/source/src/apps/pilot/mike/loophash_createdb.cc index 2cf684c8b7..e704e9b911 100644 --- a/source/src/apps/pilot/mike/loophash_createdb.cc +++ b/source/src/apps/pilot/mike/loophash_createdb.cc @@ -77,7 +77,7 @@ main( int argc, char * argv [] ) loop_hash_library->create_db(); loop_hash_library->save_db(); TR << "Finished creating loophash library" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash_mpi.cc b/source/src/apps/pilot/mike/loophash_mpi.cc index 19bc56ae53..6eb9d3d0f1 100644 --- a/source/src/apps/pilot/mike/loophash_mpi.cc +++ b/source/src/apps/pilot/mike/loophash_mpi.cc @@ -135,7 +135,7 @@ main( int argc, char * argv [] ) MPI_Barrier( MPI_COMM_WORLD ); MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/loophash_test.cc b/source/src/apps/pilot/mike/loophash_test.cc index 62ab93e0ae..ad35f00a75 100644 --- a/source/src/apps/pilot/mike/loophash_test.cc +++ b/source/src/apps/pilot/mike/loophash_test.cc @@ -180,7 +180,7 @@ int main( int argc, char * argv [] ) new_bs_loaded.print(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/make_cst.cc b/source/src/apps/pilot/mike/make_cst.cc index fd8f46c6d9..e207ceac9d 100644 --- a/source/src/apps/pilot/mike/make_cst.cc +++ b/source/src/apps/pilot/mike/make_cst.cc @@ -73,7 +73,7 @@ main( int argc, char * argv [] ) MoverOP mover = cec; protocols::jd2::JobDistributor::get_instance()->go( mover ); cec->createConstraints( std::cout ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/md.cc b/source/src/apps/pilot/mike/md.cc index d811876e75..b16ed16759 100644 --- a/source/src/apps/pilot/mike/md.cc +++ b/source/src/apps/pilot/mike/md.cc @@ -198,14 +198,14 @@ main( int argc, char * argv [] ) try{ protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/mikejd2test.cc b/source/src/apps/pilot/mike/mikejd2test.cc index cbf57df745..e52baeecb8 100644 --- a/source/src/apps/pilot/mike/mikejd2test.cc +++ b/source/src/apps/pilot/mike/mikejd2test.cc @@ -223,7 +223,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/mike/minbench.cc b/source/src/apps/pilot/mike/minbench.cc index a7141d8054..ceda98998c 100644 --- a/source/src/apps/pilot/mike/minbench.cc +++ b/source/src/apps/pilot/mike/minbench.cc @@ -146,7 +146,7 @@ main( int argc, char * argv [] ) MoverOP protocol = new Benchmark(); protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/rama_test.cc b/source/src/apps/pilot/mike/rama_test.cc index 264d0dfa31..2e3b1e1f35 100644 --- a/source/src/apps/pilot/mike/rama_test.cc +++ b/source/src/apps/pilot/mike/rama_test.cc @@ -143,7 +143,7 @@ main( int argc, char * argv [] ) MoverOP protocol = new RamaTestMover(); protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/relax_viewer.cc b/source/src/apps/pilot/mike/relax_viewer.cc index cf6e77b8dd..5a3ff27152 100644 --- a/source/src/apps/pilot/mike/relax_viewer.cc +++ b/source/src/apps/pilot/mike/relax_viewer.cc @@ -134,7 +134,7 @@ main( int argc, char * argv [] ) // options, random initialization devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/rosetta_backend.cc b/source/src/apps/pilot/mike/rosetta_backend.cc index 5474f46a7a..a9f2f55c60 100644 --- a/source/src/apps/pilot/mike/rosetta_backend.cc +++ b/source/src/apps/pilot/mike/rosetta_backend.cc @@ -107,7 +107,7 @@ class RosettaJob { utility::json_spirit::mArray::const_iterator it = parsed_json_task_array.begin(); if ( parsed_json_task_array.begin()->type() != utility::json_spirit::obj_type ) { - throw utility::excn::EXCN_Msg_Exception("JSON error: expected an object for tasklist member:'"); + throw CREATE_EXCEPTION(utility::excn::Exception, "JSON error: expected an object for tasklist member:'"); }; const utility::json_spirit::mObject &parsed_json = parsed_json_task_array.begin()->get_obj(); @@ -117,7 +117,7 @@ class RosettaJob { payload = get_string( parsed_json, "payload" ); taskname_ = get_string( parsed_json, "name" ); } -catch( utility::excn::EXCN_Msg_Exception &excn ){ +catch (utility::excn::Exception &excn ){ TR.Error << "EXCEPTION: " << excn.msg() << std::endl; // print the exception message to the Error stream. } @@ -127,7 +127,7 @@ catch( utility::excn::EXCN_Msg_Exception &excn ){ try{ parsed_payload = utility::json_spirit::read_mObject( payload ); } -catch( utility::excn::EXCN_Msg_Exception &excn ){ +catch (utility::excn::Exception &excn ){ std::cout << "Error extracting payload" << std::endl; TR.Error << "EXCEPTION: " << excn.msg() << std::endl; // print the exception message to the Error stream. return false; @@ -144,7 +144,7 @@ catch( utility::excn::EXCN_Msg_Exception &excn ){ try{ job_data_string = get_string( parsed_payload, "job_data" ); } -catch( utility::excn::EXCN_Msg_Exception &excn ){ +catch (utility::excn::Exception &excn ){ std::cout << "Error extracting job_data from RPC request" << std::endl; TR.Error << "EXCEPTION: " << excn.msg() << std::endl; // print the exception message to the Error stream. return false; @@ -157,7 +157,7 @@ catch( utility::excn::EXCN_Msg_Exception &excn ){ rpc_ = new protocols::rpc::JSON_RPC( job_data_string, false, basic_init_ ); // intrpret the actual RPC contents. } -catch ( utility::excn::EXCN_Base& excn ) { +catch (utility::excn::Exception& excn ) { return_results_to_server( true ); return false; } @@ -236,7 +236,7 @@ catch ( utility::excn::EXCN_Base& excn ) { try{ rpc_->run(); } -catch ( utility::excn::EXCN_Base& excn ) { +catch (utility::excn::Exception& excn ) { return_results_to_server( true ); return false; } @@ -326,7 +326,7 @@ main( int argc, char * argv [] ) RosettaBackend backend( server, &basic_init ); backend.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "Caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/rosetta_native_client.cc b/source/src/apps/pilot/mike/rosetta_native_client.cc index d61be85781..911c487bd1 100644 --- a/source/src/apps/pilot/mike/rosetta_native_client.cc +++ b/source/src/apps/pilot/mike/rosetta_native_client.cc @@ -286,12 +286,12 @@ void RosettaInstance::RosettaThread(){ // Capture the CPU time spent root.push_back( utility::json_spirit::Pair( "cputime", (int) rpc->runtime() ) ); } - catch( utility::excn::EXCN_Msg_Exception &excn ){ + catch (utility::excn::Exception &excn ){ root.push_back( utility::json_spirit::Pair( "error", excn.msg() ) ); } } - catch( utility::excn::EXCN_Msg_Exception &excn ){ + catch (utility::excn::Exception &excn ){ // we're here because the constructuor of JSON_RPC failed - capture the message of the Exception root.push_back( utility::json_spirit::Pair( "error", excn.msg() ) ); } diff --git a/source/src/apps/pilot/mike/sctrials.cc b/source/src/apps/pilot/mike/sctrials.cc index 8511d77f6d..eccf0c53db 100644 --- a/source/src/apps/pilot/mike/sctrials.cc +++ b/source/src/apps/pilot/mike/sctrials.cc @@ -225,7 +225,7 @@ main( int argc, char * argv [] ) MoverOP protocol = new ScTrials(); protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/shake.cc b/source/src/apps/pilot/mike/shake.cc index 6dddc94bf5..5faa8dafe8 100644 --- a/source/src/apps/pilot/mike/shake.cc +++ b/source/src/apps/pilot/mike/shake.cc @@ -70,7 +70,7 @@ main( int argc, char * argv [] ) ssm->set_mc_temperature( 3 ); MoverOP mover = ssm; protocols::jd2::JobDistributor::get_instance()->go( mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/silent2cst.cc b/source/src/apps/pilot/mike/silent2cst.cc index 454f2aa12d..ece90e8802 100644 --- a/source/src/apps/pilot/mike/silent2cst.cc +++ b/source/src/apps/pilot/mike/silent2cst.cc @@ -156,13 +156,13 @@ main( int argc, char * argv [] ) using namespace protocols::jd2; try{ JobDistributor::get_instance()->go( mover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/silent2frag.cc b/source/src/apps/pilot/mike/silent2frag.cc index df15beefcf..32676a4aa5 100644 --- a/source/src/apps/pilot/mike/silent2frag.cc +++ b/source/src/apps/pilot/mike/silent2frag.cc @@ -134,7 +134,7 @@ main( int argc, char * argv [] ) capture3mers->write( prefix + "aa3mer.1_3" ); capture9mers->write( prefix + "aa9mer.1_3" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/testderiv.cc b/source/src/apps/pilot/mike/testderiv.cc index 2fcac9d4af..4d2986b71e 100644 --- a/source/src/apps/pilot/mike/testderiv.cc +++ b/source/src/apps/pilot/mike/testderiv.cc @@ -208,7 +208,7 @@ main( int argc, char * argv [] ) // // (*scorefxn)(*pose); // scorefxn->show(std::cout, *pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/testloop.cc b/source/src/apps/pilot/mike/testloop.cc index 391ed63e69..0b113b4028 100644 --- a/source/src/apps/pilot/mike/testloop.cc +++ b/source/src/apps/pilot/mike/testloop.cc @@ -39,7 +39,7 @@ main( int argc, char * argv [] ) protocols::loops::Loops myloops; myloops.read_loop_file("testloops.loopfile" ); myloops.grow_all_loops(202, 4.0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mike/testmpi.cc b/source/src/apps/pilot/mike/testmpi.cc index 8c9c71d182..0fa9e1bcc3 100644 --- a/source/src/apps/pilot/mike/testmpi.cc +++ b/source/src/apps/pilot/mike/testmpi.cc @@ -81,7 +81,7 @@ main( int argc, char * argv [] ) /// /// core::Real a=1e-20; /// for( int inf=0; inf < 1; inf=inf) a = a*1.00000001; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/momeara/features_database_schema.cc b/source/src/apps/pilot/momeara/features_database_schema.cc index fa593b4baa..4c95566436 100644 --- a/source/src/apps/pilot/momeara/features_database_schema.cc +++ b/source/src/apps/pilot/momeara/features_database_schema.cc @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -71,7 +71,7 @@ main( int argc, char* argv [] ) { sessionOP db_session(get_db_session()); write_schema_to_db(db_session); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/momeara/format_converter.cc b/source/src/apps/pilot/momeara/format_converter.cc index 0d3260a63c..214fc1434c 100644 --- a/source/src/apps/pilot/momeara/format_converter.cc +++ b/source/src/apps/pilot/momeara/format_converter.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include @@ -185,7 +185,7 @@ main( int argc, char* argv [] ) { // start the job protocols::jd2::JobDistributor::get_instance()->go( mover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/momeara/hbond_param_sweep.cc b/source/src/apps/pilot/momeara/hbond_param_sweep.cc index 0bbdf00b1f..69416a6d25 100644 --- a/source/src/apps/pilot/momeara/hbond_param_sweep.cc +++ b/source/src/apps/pilot/momeara/hbond_param_sweep.cc @@ -851,7 +851,7 @@ main( int argc, char ** argv ) (hb_conformation.run_example_hbond_sweep ("SER", "HG", "GLY", "O", steps)); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/momeara/hbonds_test.cc b/source/src/apps/pilot/momeara/hbonds_test.cc index d9d1b3b1cc..aeedbdf4c1 100644 --- a/source/src/apps/pilot/momeara/hbonds_test.cc +++ b/source/src/apps/pilot/momeara/hbonds_test.cc @@ -101,7 +101,7 @@ main( int argc, char * argv [] ) for ( std::vector< FileName >::iterator i = pdb_file_names.begin(), i_end = pdb_file_names.end(); i != i_end; ++i ) { dump_hbonds( i->name() ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/momeara/report_hbonds.cc b/source/src/apps/pilot/momeara/report_hbonds.cc index 70ecfd0fe3..7a96964e8d 100644 --- a/source/src/apps/pilot/momeara/report_hbonds.cc +++ b/source/src/apps/pilot/momeara/report_hbonds.cc @@ -515,7 +515,7 @@ int main( int argc, char* argv[] ) devel::init(argc, argv); JobDistributor::get_instance()->go(new HBondReporter); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/monica/dock_test.cc b/source/src/apps/pilot/monica/dock_test.cc index 6e85c26cb2..a635307d5f 100644 --- a/source/src/apps/pilot/monica/dock_test.cc +++ b/source/src/apps/pilot/monica/dock_test.cc @@ -196,7 +196,7 @@ main( int argc, char * argv [] ) rb_test(); std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/monica/monica_relax.cc b/source/src/apps/pilot/monica/monica_relax.cc index f4bce9c01b..b5d0328e69 100644 --- a/source/src/apps/pilot/monica/monica_relax.cc +++ b/source/src/apps/pilot/monica/monica_relax.cc @@ -58,7 +58,7 @@ main( int argc, char * argv [] ) protocols::jobdist::main_plain_mover( *relax); std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/monica/moves_test.cc b/source/src/apps/pilot/monica/moves_test.cc index 1eb1bd579e..c95cdfd923 100644 --- a/source/src/apps/pilot/monica/moves_test.cc +++ b/source/src/apps/pilot/monica/moves_test.cc @@ -148,7 +148,7 @@ main( int argc, char * argv [] ) small_moves_test( pose ); pose = start_pose; shear_moves_test( pose ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mpacella/surface_docking.cc b/source/src/apps/pilot/mpacella/surface_docking.cc index 524226df70..22ed42a219 100644 --- a/source/src/apps/pilot/mpacella/surface_docking.cc +++ b/source/src/apps/pilot/mpacella/surface_docking.cc @@ -35,7 +35,7 @@ main( int argc, char * argv [] ) SurfaceDockingProtocolOP dp = new SurfaceDockingProtocol(); JobDistributor::get_instance()->go(dp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/mseetin/convert_pdb_to_silent_file.cc b/source/src/apps/pilot/mseetin/convert_pdb_to_silent_file.cc index 7eb4e5dc69..729fb262bb 100644 --- a/source/src/apps/pilot/mseetin/convert_pdb_to_silent_file.cc +++ b/source/src/apps/pilot/mseetin/convert_pdb_to_silent_file.cc @@ -266,7 +266,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/murphp/inv_kin_lig_loop_design.cc b/source/src/apps/pilot/murphp/inv_kin_lig_loop_design.cc index 81d396c85d..feb718b1e7 100644 --- a/source/src/apps/pilot/murphp/inv_kin_lig_loop_design.cc +++ b/source/src/apps/pilot/murphp/inv_kin_lig_loop_design.cc @@ -171,7 +171,7 @@ int main( int argc, char ** argv ) { cout << "Finished " << curr_job->output_tag(curr_nstruct) << " in " << (long)(pdb_end_time - pdb_start_time) << " seconds.\n"; } // loop over jobs and nstructs jobdist.shutdown(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nannemdp/params2pdb.cc b/source/src/apps/pilot/nannemdp/params2pdb.cc index 2a2547c0eb..2f1a45023e 100644 --- a/source/src/apps/pilot/nannemdp/params2pdb.cc +++ b/source/src/apps/pilot/nannemdp/params2pdb.cc @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) out.close(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/calc_ddG.cc b/source/src/apps/pilot/neil/calc_ddG.cc index af1db6bc9e..fed647f8c7 100644 --- a/source/src/apps/pilot/neil/calc_ddG.cc +++ b/source/src/apps/pilot/neil/calc_ddG.cc @@ -151,7 +151,7 @@ main (int argc, char *argv[]) func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/char_native.cc b/source/src/apps/pilot/neil/char_native.cc index b1e2570ef4..eb1c114b7c 100644 --- a/source/src/apps/pilot/neil/char_native.cc +++ b/source/src/apps/pilot/neil/char_native.cc @@ -542,7 +542,7 @@ main (int argc, char *argv[]) } else { func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/coiled_coil_search.cc b/source/src/apps/pilot/neil/coiled_coil_search.cc index 345bfe605e..ceb21304e4 100644 --- a/source/src/apps/pilot/neil/coiled_coil_search.cc +++ b/source/src/apps/pilot/neil/coiled_coil_search.cc @@ -344,7 +344,7 @@ main (int argc, char *argv[]){ } // for Size nc } // ifile - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/des_pos_ddG.cc b/source/src/apps/pilot/neil/des_pos_ddG.cc index f1f2b36353..4810fb64ed 100644 --- a/source/src/apps/pilot/neil/des_pos_ddG.cc +++ b/source/src/apps/pilot/neil/des_pos_ddG.cc @@ -511,7 +511,7 @@ main (int argc, char *argv[]) func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/design_symm.bak.110314.cc b/source/src/apps/pilot/neil/design_symm.bak.110314.cc index dabe9d869a..f36685f8d8 100644 --- a/source/src/apps/pilot/neil/design_symm.bak.110314.cc +++ b/source/src/apps/pilot/neil/design_symm.bak.110314.cc @@ -583,7 +583,7 @@ main (int argc, char *argv[]) } else { func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/design_symm.cc b/source/src/apps/pilot/neil/design_symm.cc index fec888984e..d8e300618f 100644 --- a/source/src/apps/pilot/neil/design_symm.cc +++ b/source/src/apps/pilot/neil/design_symm.cc @@ -705,7 +705,7 @@ main (int argc, char *argv[]) } else { func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/design_symm_110330_good.cc b/source/src/apps/pilot/neil/design_symm_110330_good.cc index 8e5e1ca947..3bc34f2c3f 100644 --- a/source/src/apps/pilot/neil/design_symm_110330_good.cc +++ b/source/src/apps/pilot/neil/design_symm_110330_good.cc @@ -723,7 +723,7 @@ main (int argc, char *argv[]) } else { func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/design_symm_no_hack_elec.cc b/source/src/apps/pilot/neil/design_symm_no_hack_elec.cc index ddd312bb56..5a7fa6a6eb 100644 --- a/source/src/apps/pilot/neil/design_symm_no_hack_elec.cc +++ b/source/src/apps/pilot/neil/design_symm_no_hack_elec.cc @@ -584,7 +584,7 @@ main (int argc, char *argv[]) } else { func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/enumeration_test.cc b/source/src/apps/pilot/neil/enumeration_test.cc index d46f08c1bd..3876762b6c 100644 --- a/source/src/apps/pilot/neil/enumeration_test.cc +++ b/source/src/apps/pilot/neil/enumeration_test.cc @@ -284,7 +284,7 @@ main (int argc, char *argv[]) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/matdes_design.cc b/source/src/apps/pilot/neil/matdes_design.cc index 34ab851a20..037fb9c79d 100644 --- a/source/src/apps/pilot/neil/matdes_design.cc +++ b/source/src/apps/pilot/neil/matdes_design.cc @@ -848,7 +848,7 @@ main (int argc, char *argv[]) void* (*func)(void*) = &dostuff; func(NULL); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/matdes_design_2comp.cc b/source/src/apps/pilot/neil/matdes_design_2comp.cc index 2dff8e86f0..df4f744431 100644 --- a/source/src/apps/pilot/neil/matdes_design_2comp.cc +++ b/source/src/apps/pilot/neil/matdes_design_2comp.cc @@ -963,7 +963,7 @@ main (int argc, char *argv[]) void* (*func)(void*) = &dostuff; func(NULL); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/matdes_dock.cc b/source/src/apps/pilot/neil/matdes_dock.cc index b0f7e842b0..f59c1513cf 100644 --- a/source/src/apps/pilot/neil/matdes_dock.cc +++ b/source/src/apps/pilot/neil/matdes_dock.cc @@ -254,7 +254,7 @@ main (int argc, char *argv[]) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/matdes_mutalyze.cc b/source/src/apps/pilot/neil/matdes_mutalyze.cc index 2e96734fc5..78c6d5fafa 100644 --- a/source/src/apps/pilot/neil/matdes_mutalyze.cc +++ b/source/src/apps/pilot/neil/matdes_mutalyze.cc @@ -798,7 +798,7 @@ main (int argc, char *argv[]) void* (*func)(void*) = &dostuff; func(NULL); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/relax_building_block.cc b/source/src/apps/pilot/neil/relax_building_block.cc index f89d48757d..c1350e1ac8 100644 --- a/source/src/apps/pilot/neil/relax_building_block.cc +++ b/source/src/apps/pilot/neil/relax_building_block.cc @@ -195,7 +195,7 @@ main (int argc, char *argv[]) func(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/symdock_enum.cc b/source/src/apps/pilot/neil/symdock_enum.cc index bd1ab5c294..e5c3640e58 100644 --- a/source/src/apps/pilot/neil/symdock_enum.cc +++ b/source/src/apps/pilot/neil/symdock_enum.cc @@ -714,7 +714,7 @@ int main (int argc, char *argv[]) { try{ devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/neil/symdock_enum_3_1.cc b/source/src/apps/pilot/neil/symdock_enum_3_1.cc index 7561eb7c07..37e4643112 100644 --- a/source/src/apps/pilot/neil/symdock_enum_3_1.cc +++ b/source/src/apps/pilot/neil/symdock_enum_3_1.cc @@ -1045,7 +1045,7 @@ int main (int argc, char *argv[]) { try{ devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nikolas/r_SymDock_viewer.cc b/source/src/apps/pilot/nikolas/r_SymDock_viewer.cc index e8d6141e65..ea6aa2b4b6 100644 --- a/source/src/apps/pilot/nikolas/r_SymDock_viewer.cc +++ b/source/src/apps/pilot/nikolas/r_SymDock_viewer.cc @@ -96,7 +96,7 @@ main( int argc, char * argv [] ) } else { SymDock_main_local(NULL); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nikolas/r_segment_rdc.cc b/source/src/apps/pilot/nikolas/r_segment_rdc.cc index 02e742bee1..2ce40b85bf 100644 --- a/source/src/apps/pilot/nikolas/r_segment_rdc.cc +++ b/source/src/apps/pilot/nikolas/r_segment_rdc.cc @@ -85,14 +85,14 @@ int main( int argc, char * argv [] ){ protocols::jd2::JobDistributor::get_instance()->go( scoremover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nir/PeptideDeriver.cc b/source/src/apps/pilot/nir/PeptideDeriver.cc index daee04b9ee..6561e00b55 100644 --- a/source/src/apps/pilot/nir/PeptideDeriver.cc +++ b/source/src/apps/pilot/nir/PeptideDeriver.cc @@ -191,7 +191,7 @@ main( int argc, char * argv [] ) // pose = *(oneChainPose (orig_pose, 2)); // derive(pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nmarze/elliptical_ip.cc b/source/src/apps/pilot/nmarze/elliptical_ip.cc index d3fbeb7b6c..703acb73a9 100644 --- a/source/src/apps/pilot/nmarze/elliptical_ip.cc +++ b/source/src/apps/pilot/nmarze/elliptical_ip.cc @@ -55,7 +55,7 @@ main( int argc, char * argv [] ) // protocols::docking::EllipsoidalRandomizationMoverOP elliptical_ip = new protocols::docking::EllipsoidalRandomizationMover( 1, false ); protocols::jd2::JobDistributor::get_instance()->go( elliptical_ip ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nmarze/hemagg_trimer.cc b/source/src/apps/pilot/nmarze/hemagg_trimer.cc index b394b2dbe2..49be2bfde6 100644 --- a/source/src/apps/pilot/nmarze/hemagg_trimer.cc +++ b/source/src/apps/pilot/nmarze/hemagg_trimer.cc @@ -105,7 +105,7 @@ main( int argc, char * argv [] ) HemaggTrimerOP hemagg_trimer = new HemaggTrimer; protocols::jd2::JobDistributor::get_instance()->go( hemagg_trimer ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/cluster.cc b/source/src/apps/pilot/nobuyasu/cluster.cc index 49c07c2970..529b77d9a9 100644 --- a/source/src/apps/pilot/nobuyasu/cluster.cc +++ b/source/src/apps/pilot/nobuyasu/cluster.cc @@ -279,7 +279,7 @@ main( int argc, char * argv [] ) { << "s\n Total: " << time_total - time_start << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/fldsgn.cc b/source/src/apps/pilot/nobuyasu/fldsgn.cc index dd4dad6843..c9b9bf9634 100644 --- a/source/src/apps/pilot/nobuyasu/fldsgn.cc +++ b/source/src/apps/pilot/nobuyasu/fldsgn.cc @@ -130,7 +130,7 @@ int main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( graphics_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/flxbb.cc b/source/src/apps/pilot/nobuyasu/flxbb.cc index 86826d020d..b1ba900933 100644 --- a/source/src/apps/pilot/nobuyasu/flxbb.cc +++ b/source/src/apps/pilot/nobuyasu/flxbb.cc @@ -91,7 +91,7 @@ main( int argc, char * argv [] ) protocols::flxbb::FlxbbDesign_main(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/foldptn.cc b/source/src/apps/pilot/nobuyasu/foldptn.cc index d919d6090b..3ade245047 100644 --- a/source/src/apps/pilot/nobuyasu/foldptn.cc +++ b/source/src/apps/pilot/nobuyasu/foldptn.cc @@ -296,7 +296,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/frag2profile.cc b/source/src/apps/pilot/nobuyasu/frag2profile.cc index 88852b66ea..0a4c11127b 100644 --- a/source/src/apps/pilot/nobuyasu/frag2profile.cc +++ b/source/src/apps/pilot/nobuyasu/frag2profile.cc @@ -282,7 +282,7 @@ main( int argc, char * argv [] ) } output_ << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/local_rmsd.cc b/source/src/apps/pilot/nobuyasu/local_rmsd.cc index e149670d63..1f201d3302 100644 --- a/source/src/apps/pilot/nobuyasu/local_rmsd.cc +++ b/source/src/apps/pilot/nobuyasu/local_rmsd.cc @@ -203,7 +203,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/make_blueprint.cc b/source/src/apps/pilot/nobuyasu/make_blueprint.cc index 8869a029c1..d24aeb7499 100644 --- a/source/src/apps/pilot/nobuyasu/make_blueprint.cc +++ b/source/src/apps/pilot/nobuyasu/make_blueprint.cc @@ -135,7 +135,7 @@ main( int argc, char * argv [] ) << std::endl; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/make_frag_ssdep.cc b/source/src/apps/pilot/nobuyasu/make_frag_ssdep.cc index 16592f35e6..026e6879f0 100644 --- a/source/src/apps/pilot/nobuyasu/make_frag_ssdep.cc +++ b/source/src/apps/pilot/nobuyasu/make_frag_ssdep.cc @@ -185,7 +185,7 @@ main( int argc, char * argv [] ) // output fragments FragmentIO().write_data( option[ output ], *fragset ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/ncontact.cc b/source/src/apps/pilot/nobuyasu/ncontact.cc index 67de3516c3..f675960e37 100644 --- a/source/src/apps/pilot/nobuyasu/ncontact.cc +++ b/source/src/apps/pilot/nobuyasu/ncontact.cc @@ -308,7 +308,7 @@ main( int argc, char * argv [] ) protocol = new CountContact( dist, sep ); universal_main( *protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/pair_distance.cc b/source/src/apps/pilot/nobuyasu/pair_distance.cc index bc6c71fb09..0e2ec356b9 100644 --- a/source/src/apps/pilot/nobuyasu/pair_distance.cc +++ b/source/src/apps/pilot/nobuyasu/pair_distance.cc @@ -338,7 +338,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/pick_bab.cc b/source/src/apps/pilot/nobuyasu/pick_bab.cc index aba1d2139d..07630e3889 100644 --- a/source/src/apps/pilot/nobuyasu/pick_bab.cc +++ b/source/src/apps/pilot/nobuyasu/pick_bab.cc @@ -485,7 +485,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/pick_lowestscore_pose.cc b/source/src/apps/pilot/nobuyasu/pick_lowestscore_pose.cc index 77fb78ff97..fb691788ae 100644 --- a/source/src/apps/pilot/nobuyasu/pick_lowestscore_pose.cc +++ b/source/src/apps/pilot/nobuyasu/pick_lowestscore_pose.cc @@ -195,7 +195,7 @@ main( int argc, char * argv [] ) ite++; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/rama.cc b/source/src/apps/pilot/nobuyasu/rama.cc index 9d6fb1ba9c..980a7d0481 100644 --- a/source/src/apps/pilot/nobuyasu/rama.cc +++ b/source/src/apps/pilot/nobuyasu/rama.cc @@ -86,7 +86,7 @@ main( int argc, char * argv [] ) << F( 8, 2, pose.phi( ii ) ) << F( 8, 2, pose.psi( ii ) ) << F( 8, 2, pose.omega( ii ) ) << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/sasa.cc b/source/src/apps/pilot/nobuyasu/sasa.cc index 6fd197a6d5..65f9867f22 100644 --- a/source/src/apps/pilot/nobuyasu/sasa.cc +++ b/source/src/apps/pilot/nobuyasu/sasa.cc @@ -195,7 +195,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/nobuyasu/score_delete_segments.cc b/source/src/apps/pilot/nobuyasu/score_delete_segments.cc index b75bc4f168..909a3d9d9e 100644 --- a/source/src/apps/pilot/nobuyasu/score_delete_segments.cc +++ b/source/src/apps/pilot/nobuyasu/score_delete_segments.cc @@ -210,7 +210,7 @@ main( int argc, char * argv [] ) // run protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/FragsToAtomDist.cc b/source/src/apps/pilot/olli/FragsToAtomDist.cc index 5948633481..52595bc4ab 100644 --- a/source/src/apps/pilot/olli/FragsToAtomDist.cc +++ b/source/src/apps/pilot/olli/FragsToAtomDist.cc @@ -22,7 +22,7 @@ #include #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -57,7 +57,7 @@ int main( int argc, char * argv []) protocols::noesy_assign::FragsToAtomDist Atomdist1; Atomdist1.generate_from_frag_file( option[ fragments ](), full_sequence, option[ cycles ](), option[ freq ]() ); Atomdist1.write_hist_to_file( option[ OptionKeys::distances ]() ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); std::exit( 1 ); } diff --git a/source/src/apps/pilot/olli/cloud_app.cc b/source/src/apps/pilot/olli/cloud_app.cc index 3a6518e25b..bf21b8dbe4 100644 --- a/source/src/apps/pilot/olli/cloud_app.cc +++ b/source/src/apps/pilot/olli/cloud_app.cc @@ -158,7 +158,7 @@ int main( int argc, char** argv ) { theArchiveManager.save_archive(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; std::exit( 1 ); } diff --git a/source/src/apps/pilot/olli/r_abrelax.cc b/source/src/apps/pilot/olli/r_abrelax.cc index 59420afbd5..2c94df1c2e 100644 --- a/source/src/apps/pilot/olli/r_abrelax.cc +++ b/source/src/apps/pilot/olli/r_abrelax.cc @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -109,11 +109,11 @@ main( int argc, char * argv [] ) mem_tr << "devel::init" << std::endl; // protocols::abinitio::Broker_main(); protocols::jd2::JobDistributor::get_instance()->go( NULL ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_assign_clusters.cc b/source/src/apps/pilot/olli/r_assign_clusters.cc index 5ee250266e..77317458cb 100644 --- a/source/src/apps/pilot/olli/r_assign_clusters.cc +++ b/source/src/apps/pilot/olli/r_assign_clusters.cc @@ -44,7 +44,7 @@ #include //Auto Headers -#include +#include #include static basic::Tracer tr( "main" ); @@ -148,10 +148,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_broker.cc b/source/src/apps/pilot/olli/r_broker.cc index 9e632b9406..ad5f34d39d 100644 --- a/source/src/apps/pilot/olli/r_broker.cc +++ b/source/src/apps/pilot/olli/r_broker.cc @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include // C++ headers @@ -53,7 +53,7 @@ void run() { void* rBroker_main_local( void* ) { try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); } @@ -65,7 +65,7 @@ int main( int argc, char * argv [] ) { register_options_broker(); devel::init( argc, argv ); //d protocols::viewer::viewer_main( rBroker_main_local ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_build_hotspot_loops.cc b/source/src/apps/pilot/olli/r_build_hotspot_loops.cc index 06d4943867..022cdc363c 100644 --- a/source/src/apps/pilot/olli/r_build_hotspot_loops.cc +++ b/source/src/apps/pilot/olli/r_build_hotspot_loops.cc @@ -444,7 +444,7 @@ main( int argc, char * argv [] ) register_options(); devel::init( argc, argv ); LoopBuild_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_check_chainbreak.cc b/source/src/apps/pilot/olli/r_check_chainbreak.cc index d5a9762d86..4efd5ab559 100644 --- a/source/src/apps/pilot/olli/r_check_chainbreak.cc +++ b/source/src/apps/pilot/olli/r_check_chainbreak.cc @@ -270,7 +270,7 @@ int main( int argc, char** argv ) { Application app; app.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_convert_frags.cc b/source/src/apps/pilot/olli/r_convert_frags.cc index b38eb508ee..0ca9828860 100644 --- a/source/src/apps/pilot/olli/r_convert_frags.cc +++ b/source/src/apps/pilot/olli/r_convert_frags.cc @@ -92,7 +92,7 @@ int main( int argc, char** argv ) { } FragmentIO().write_data( option[ OptionKeys::o ](), *new_frags ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_count_neighbours.cc b/source/src/apps/pilot/olli/r_count_neighbours.cc index aae5cedafb..7c0e35b736 100644 --- a/source/src/apps/pilot/olli/r_count_neighbours.cc +++ b/source/src/apps/pilot/olli/r_count_neighbours.cc @@ -67,7 +67,7 @@ //Auto Headers #include #include -#include +#include #include @@ -280,10 +280,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_coupled_sidechain.cc b/source/src/apps/pilot/olli/r_coupled_sidechain.cc index d25b21a57b..3bb786c5bf 100644 --- a/source/src/apps/pilot/olli/r_coupled_sidechain.cc +++ b/source/src/apps/pilot/olli/r_coupled_sidechain.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) // devel::init_random_generators(3,numeric::random::_RND_TestRun_, "mt19937"); //JQX from Sergery JobDistributor::get_instance()->go( new CoupledSidechainProtocol() ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_cst_tool.cc b/source/src/apps/pilot/olli/r_cst_tool.cc index 529a4a37ed..6036827909 100644 --- a/source/src/apps/pilot/olli/r_cst_tool.cc +++ b/source/src/apps/pilot/olli/r_cst_tool.cc @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include @@ -264,10 +264,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_dock_tempered.cc b/source/src/apps/pilot/olli/r_dock_tempered.cc index b972e5a4f5..3432f11682 100644 --- a/source/src/apps/pilot/olli/r_dock_tempered.cc +++ b/source/src/apps/pilot/olli/r_dock_tempered.cc @@ -45,7 +45,7 @@ main( int argc, char * argv [] ) // devel::init_random_generators(3,numeric::random::_RND_TestRun_, "mt19937"); //JQX from Sergery JobDistributor::get_instance()->go( protocols::moves::MoverOP( new TemperedDocking() ) ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_fold_cst.cc b/source/src/apps/pilot/olli/r_fold_cst.cc index 559edef2cd..0efa9b7c87 100644 --- a/source/src/apps/pilot/olli/r_fold_cst.cc +++ b/source/src/apps/pilot/olli/r_fold_cst.cc @@ -626,7 +626,7 @@ main( int argc, char * argv [] ) //FoldConstraint::register_options() devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_frag_picker.cc b/source/src/apps/pilot/olli/r_frag_picker.cc index e79b93470d..0633b44597 100644 --- a/source/src/apps/pilot/olli/r_frag_picker.cc +++ b/source/src/apps/pilot/olli/r_frag_picker.cc @@ -266,7 +266,7 @@ int main( int argc, char** argv ) { app.setup(); app.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_frag_quality.cc b/source/src/apps/pilot/olli/r_frag_quality.cc index 147ec3fb10..3ed7913972 100644 --- a/source/src/apps/pilot/olli/r_frag_quality.cc +++ b/source/src/apps/pilot/olli/r_frag_quality.cc @@ -990,7 +990,7 @@ int main( int argc, char** argv ) { } // now try some frag insertion and look if jump-qual stays invariant } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_local_rdc.cc b/source/src/apps/pilot/olli/r_local_rdc.cc index 7d1438c922..1cfaf1db82 100644 --- a/source/src/apps/pilot/olli/r_local_rdc.cc +++ b/source/src/apps/pilot/olli/r_local_rdc.cc @@ -328,7 +328,7 @@ int main( int argc, char** argv ) { << F(10,4, rmsd ) << std::endl; } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_min_check.cc b/source/src/apps/pilot/olli/r_min_check.cc index 843862757b..af79c15549 100644 --- a/source/src/apps/pilot/olli/r_min_check.cc +++ b/source/src/apps/pilot/olli/r_min_check.cc @@ -51,7 +51,7 @@ #include //Auto Headers -#include +#include #include #include @@ -140,10 +140,10 @@ main( int argc, char * argv [] ) // try{ run(); - // } catch ( utility::excn::EXCN_Base& anExcn ) { + // } catch (utility::excn::Exception& anExcn ) { // anExcn.show( std::cerr ); // } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_mpi.cc b/source/src/apps/pilot/olli/r_mpi.cc index d37fbe7802..cdb619550a 100644 --- a/source/src/apps/pilot/olli/r_mpi.cc +++ b/source/src/apps/pilot/olli/r_mpi.cc @@ -141,10 +141,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_parse_foldtree.cc b/source/src/apps/pilot/olli/r_parse_foldtree.cc index d9fb41ebfe..eb78392042 100644 --- a/source/src/apps/pilot/olli/r_parse_foldtree.cc +++ b/source/src/apps/pilot/olli/r_parse_foldtree.cc @@ -204,7 +204,7 @@ int main( int argc, char** argv ) { ThisApplication app; app.run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_pdb2top.cc b/source/src/apps/pilot/olli/r_pdb2top.cc index 42a403669d..a0848a1026 100644 --- a/source/src/apps/pilot/olli/r_pdb2top.cc +++ b/source/src/apps/pilot/olli/r_pdb2top.cc @@ -217,7 +217,7 @@ int main( int argc, char** argv ) { } } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_play_with_etables.cc b/source/src/apps/pilot/olli/r_play_with_etables.cc index ad42912a40..465682225a 100644 --- a/source/src/apps/pilot/olli/r_play_with_etables.cc +++ b/source/src/apps/pilot/olli/r_play_with_etables.cc @@ -46,7 +46,7 @@ #include #include -#include +#include #include @@ -133,14 +133,14 @@ int main( int argc, char * argv [] ) { } else { protocols::jd2::JobDistributor::get_instance()->go( mover ); } - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { basic::Error() << "ERROR: Exception caught by rosetta_scripts application:" << excn << std::endl; assert(false); // core dump in debug mode std::exit( 1 ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_rmsf.cc b/source/src/apps/pilot/olli/r_rmsf.cc index 1ebdedad98..f08fb407c5 100644 --- a/source/src/apps/pilot/olli/r_rmsf.cc +++ b/source/src/apps/pilot/olli/r_rmsf.cc @@ -66,7 +66,7 @@ //Auto Headers #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -319,10 +319,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_score.cc b/source/src/apps/pilot/olli/r_score.cc index 6cc6dbb7c9..e634425868 100644 --- a/source/src/apps/pilot/olli/r_score.cc +++ b/source/src/apps/pilot/olli/r_score.cc @@ -34,7 +34,7 @@ #include //Auto Headers -#include +#include #include @@ -103,10 +103,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_score_rdc.cc b/source/src/apps/pilot/olli/r_score_rdc.cc index 96e151ac60..4e49d846b3 100644 --- a/source/src/apps/pilot/olli/r_score_rdc.cc +++ b/source/src/apps/pilot/olli/r_score_rdc.cc @@ -53,7 +53,7 @@ #include //Auto Headers -#include +#include #include @@ -233,10 +233,10 @@ main( int argc, char * argv [] ) // try{ run(); - // } catch ( utility::excn::EXCN_Base& anExcn ) { + // } catch (utility::excn::Exception& anExcn ) { // anExcn.show( std::cerr ); // } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_tempered_sidechains.cc b/source/src/apps/pilot/olli/r_tempered_sidechains.cc index 9639ddb790..51d94b403f 100644 --- a/source/src/apps/pilot/olli/r_tempered_sidechains.cc +++ b/source/src/apps/pilot/olli/r_tempered_sidechains.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) // devel::init_random_generators(3,numeric::random::_RND_TestRun_, "mt19937"); //JQX from Sergery JobDistributor::get_instance()->go( protocols::moves::MoverOP( new CoupledSidechainProtocol ) ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olli/r_trjconv.cc b/source/src/apps/pilot/olli/r_trjconv.cc index e2703c2fd1..94c705cab6 100644 --- a/source/src/apps/pilot/olli/r_trjconv.cc +++ b/source/src/apps/pilot/olli/r_trjconv.cc @@ -68,7 +68,7 @@ using namespace abinitio; #include #include -#include +#include class ThisApplication { @@ -387,11 +387,11 @@ main( int argc, char * argv [] ) // else if ( option[ pick_chunks ].user() ) { // app.pick_chunks(); // } else app.run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olungu/Superimpose_Pdbs.cc b/source/src/apps/pilot/olungu/Superimpose_Pdbs.cc index e27dc00fd1..225aface84 100644 --- a/source/src/apps/pilot/olungu/Superimpose_Pdbs.cc +++ b/source/src/apps/pilot/olungu/Superimpose_Pdbs.cc @@ -289,7 +289,7 @@ main( int argc, char* argv[] ) full_pose.dump_scored_pdb( fname, *scorefxn ); out.close(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olungu/multidomain_switch.cc b/source/src/apps/pilot/olungu/multidomain_switch.cc index eec2148f1c..89dfb57152 100644 --- a/source/src/apps/pilot/olungu/multidomain_switch.cc +++ b/source/src/apps/pilot/olungu/multidomain_switch.cc @@ -51,7 +51,7 @@ main( int argc, char* argv[] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/olungu/sasa_interface.cc b/source/src/apps/pilot/olungu/sasa_interface.cc index 3bc5c9dd20..db44d94ecf 100644 --- a/source/src/apps/pilot/olungu/sasa_interface.cc +++ b/source/src/apps/pilot/olungu/sasa_interface.cc @@ -68,7 +68,7 @@ main( int argc, char* argv[] ){ std::cout << "Total charge " << total_charge << std::endl; ParatopeMetric< core::SSize>p_charge = paratope_charge( pose, abinfo ); std::cout << "peritope charge " << p_charge.paratope << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/optE/optE_simple.cc b/source/src/apps/pilot/optE/optE_simple.cc index af169c0a9a..38c6e2f353 100644 --- a/source/src/apps/pilot/optE/optE_simple.cc +++ b/source/src/apps/pilot/optE/optE_simple.cc @@ -481,7 +481,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); simple_opte_test(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/opt_e/optE_simple.cc b/source/src/apps/pilot/opt_e/optE_simple.cc index 96a8b94caa..cb5dddeaba 100644 --- a/source/src/apps/pilot/opt_e/optE_simple.cc +++ b/source/src/apps/pilot/opt_e/optE_simple.cc @@ -480,7 +480,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); simple_opte_test(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/parin/parin_test.cc b/source/src/apps/pilot/parin/parin_test.cc index 11a7447a4d..90cd467224 100644 --- a/source/src/apps/pilot/parin/parin_test.cc +++ b/source/src/apps/pilot/parin/parin_test.cc @@ -3530,11 +3530,9 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } } - - diff --git a/source/src/apps/pilot/phil/analyze_dna.cc b/source/src/apps/pilot/phil/analyze_dna.cc index 32e18dc5dd..e97cd4f22a 100644 --- a/source/src/apps/pilot/phil/analyze_dna.cc +++ b/source/src/apps/pilot/phil/analyze_dna.cc @@ -119,7 +119,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/capri15.cc b/source/src/apps/pilot/phil/capri15.cc index ea6d66d2bb..2bd651e349 100644 --- a/source/src/apps/pilot/phil/capri15.cc +++ b/source/src/apps/pilot/phil/capri15.cc @@ -2217,7 +2217,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/dimer_relax.cc b/source/src/apps/pilot/phil/dimer_relax.cc index 9cd01cdae3..06a06cebba 100644 --- a/source/src/apps/pilot/phil/dimer_relax.cc +++ b/source/src/apps/pilot/phil/dimer_relax.cc @@ -244,7 +244,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/dna_design_test.cc b/source/src/apps/pilot/phil/dna_design_test.cc index cf82a84a61..21774a4b33 100644 --- a/source/src/apps/pilot/phil/dna_design_test.cc +++ b/source/src/apps/pilot/phil/dna_design_test.cc @@ -507,7 +507,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/dna_dr_test.cc b/source/src/apps/pilot/phil/dna_dr_test.cc index cc84582231..a904f551ce 100644 --- a/source/src/apps/pilot/phil/dna_dr_test.cc +++ b/source/src/apps/pilot/phil/dna_dr_test.cc @@ -932,7 +932,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/dna_relax.cc b/source/src/apps/pilot/phil/dna_relax.cc index 8ed16f0b3d..88a9e04502 100644 --- a/source/src/apps/pilot/phil/dna_relax.cc +++ b/source/src/apps/pilot/phil/dna_relax.cc @@ -339,7 +339,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/dna_spec_test.cc b/source/src/apps/pilot/phil/dna_spec_test.cc index 5a8227ae21..b809ba3a11 100644 --- a/source/src/apps/pilot/phil/dna_spec_test.cc +++ b/source/src/apps/pilot/phil/dna_spec_test.cc @@ -4546,7 +4546,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/motif_scan.cc b/source/src/apps/pilot/phil/motif_scan.cc index b11b32b93f..d64fab8f7b 100644 --- a/source/src/apps/pilot/phil/motif_scan.cc +++ b/source/src/apps/pilot/phil/motif_scan.cc @@ -599,7 +599,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/repeat_demo.cc b/source/src/apps/pilot/phil/repeat_demo.cc index 165a75870d..04f659b937 100644 --- a/source/src/apps/pilot/phil/repeat_demo.cc +++ b/source/src/apps/pilot/phil/repeat_demo.cc @@ -271,7 +271,7 @@ main( int argc, char * argv [] ) rebuild_test(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/simple_dna_regression_test.cc b/source/src/apps/pilot/phil/simple_dna_regression_test.cc index b250219a25..45550c9ef4 100644 --- a/source/src/apps/pilot/phil/simple_dna_regression_test.cc +++ b/source/src/apps/pilot/phil/simple_dna_regression_test.cc @@ -4701,7 +4701,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/symtest.cc b/source/src/apps/pilot/phil/symtest.cc index b89ec06869..27de3205e7 100644 --- a/source/src/apps/pilot/phil/symtest.cc +++ b/source/src/apps/pilot/phil/symtest.cc @@ -335,7 +335,7 @@ main( int argc, char * argv [] ) bk_test(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/test1.cc b/source/src/apps/pilot/phil/test1.cc index c5d308cd38..7be9ae96e1 100644 --- a/source/src/apps/pilot/phil/test1.cc +++ b/source/src/apps/pilot/phil/test1.cc @@ -3040,7 +3040,7 @@ main( int argc, char * argv [] ) simple_loop_modeling_test(); exit(0); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/phil/zf_relax.cc b/source/src/apps/pilot/phil/zf_relax.cc index ee7b505adc..631d2e584f 100644 --- a/source/src/apps/pilot/phil/zf_relax.cc +++ b/source/src/apps/pilot/phil/zf_relax.cc @@ -645,7 +645,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ptconway/batchrelax_mpi.cc b/source/src/apps/pilot/ptconway/batchrelax_mpi.cc index 2c18de0bb4..b8398f334c 100644 --- a/source/src/apps/pilot/ptconway/batchrelax_mpi.cc +++ b/source/src/apps/pilot/ptconway/batchrelax_mpi.cc @@ -426,7 +426,7 @@ int main(int argc, char *argv[]) { MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << endl; return -1; } diff --git a/source/src/apps/pilot/ptconway/elec_dens_rot_recov.cc b/source/src/apps/pilot/ptconway/elec_dens_rot_recov.cc index 55cb51c92e..201ecc0231 100644 --- a/source/src/apps/pilot/ptconway/elec_dens_rot_recov.cc +++ b/source/src/apps/pilot/ptconway/elec_dens_rot_recov.cc @@ -372,7 +372,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( new ElecDensMinPackMinMover() ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -404,7 +404,7 @@ main( int argc, char * argv [] ) std::string outfile = basic::options::option[ basic::options::OptionKeys::edrr::prefix ]() + ".flips.txt"; std::ofstream out( outfile.c_str() ); globals::reporter.print_flips( out ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/cstmin.cc b/source/src/apps/pilot/ragul/cstmin.cc index 8cd5543853..3fe1373e2c 100644 --- a/source/src/apps/pilot/ragul/cstmin.cc +++ b/source/src/apps/pilot/ragul/cstmin.cc @@ -112,7 +112,7 @@ int main( int argc, char * argv [] ) // output scored pose ps.dump_scored_pdb(outpfx + "_" + "0001.pdb", *scorefxn); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/gen_rna_pharmacophore.cc b/source/src/apps/pilot/ragul/gen_rna_pharmacophore.cc index 0e213558bf..f60b65430e 100644 --- a/source/src/apps/pilot/ragul/gen_rna_pharmacophore.cc +++ b/source/src/apps/pilot/ragul/gen_rna_pharmacophore.cc @@ -120,7 +120,7 @@ int main( int argc, char * argv [] ){ rphr.cluster_KeyFeatures(keyFeatures_string2, tag); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/get_pharmacophore_without_bound_rna.cc b/source/src/apps/pilot/ragul/get_pharmacophore_without_bound_rna.cc index bcfadb1324..b6d1de2206 100644 --- a/source/src/apps/pilot/ragul/get_pharmacophore_without_bound_rna.cc +++ b/source/src/apps/pilot/ragul/get_pharmacophore_without_bound_rna.cc @@ -347,7 +347,7 @@ int main( int argc, char * argv [] ){ outPDB_stream.close(); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/get_rna_pharmacophore.cc b/source/src/apps/pilot/ragul/get_rna_pharmacophore.cc index becd95941c..5014a0e39e 100644 --- a/source/src/apps/pilot/ragul/get_rna_pharmacophore.cc +++ b/source/src/apps/pilot/ragul/get_rna_pharmacophore.cc @@ -320,7 +320,7 @@ int main( int argc, char * argv [] ){ outPDB_stream.close(); complexrna_sasa_ofile.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/get_rna_pharmacophore_with_water.cc b/source/src/apps/pilot/ragul/get_rna_pharmacophore_with_water.cc index 98f797eda4..dc06735cf0 100644 --- a/source/src/apps/pilot/ragul/get_rna_pharmacophore_with_water.cc +++ b/source/src/apps/pilot/ragul/get_rna_pharmacophore_with_water.cc @@ -348,7 +348,7 @@ int main( int argc, char * argv [] ){ outPDB_stream.close(); complexrna_sasa_ofile.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/get_rna_ring_sasa.cc b/source/src/apps/pilot/ragul/get_rna_ring_sasa.cc index 30c27b9754..0abaf665ee 100644 --- a/source/src/apps/pilot/ragul/get_rna_ring_sasa.cc +++ b/source/src/apps/pilot/ragul/get_rna_ring_sasa.cc @@ -200,7 +200,7 @@ int main( int argc, char * argv [] ){ } complexrna_sasa_ofile.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ragul/ragul_analyze_tcr_interface.cc b/source/src/apps/pilot/ragul/ragul_analyze_tcr_interface.cc index c1bc838c0b..32fa0040f8 100644 --- a/source/src/apps/pilot/ragul/ragul_analyze_tcr_interface.cc +++ b/source/src/apps/pilot/ragul/ragul_analyze_tcr_interface.cc @@ -249,7 +249,7 @@ int main( int argc, char * argv [] ){ std::cout << "Interface_Scores:\t"<< tag <<"\t"<< input_pdb_name <<"\t" << bound_energy <<"\t"<< Interface_Energy <<"\t"<< Total_BSA <<"\t"<< Interface_HB <<"\t"<< Total_packstats <<"\t"<< Interface_unsat <<"\t"<energies().show(std::cout); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpframework_score.cc b/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpframework_score.cc index f1867624d0..23f63c4b69 100644 --- a/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpframework_score.cc +++ b/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpframework_score.cc @@ -75,7 +75,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpscore_integrate.cc b/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpscore_integrate.cc index 2d223fd127..2aa776a0d3 100644 --- a/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpscore_integrate.cc +++ b/source/src/apps/pilot/ralford/archive/framework_devel/scoring/mpscore_integrate.cc @@ -67,7 +67,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/framework_devel/virtual_residue_trees.cc b/source/src/apps/pilot/ralford/archive/framework_devel/virtual_residue_trees.cc index a63226205f..99c7169e5a 100644 --- a/source/src/apps/pilot/ralford/archive/framework_devel/virtual_residue_trees.cc +++ b/source/src/apps/pilot/ralford/archive/framework_devel/virtual_residue_trees.cc @@ -149,7 +149,7 @@ int main( int argc, char* argv[] ) TR << "Done!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/framework_devel/visualize_membrane.cc b/source/src/apps/pilot/ralford/archive/framework_devel/visualize_membrane.cc index ff99519b3f..7749780042 100644 --- a/source/src/apps/pilot/ralford/archive/framework_devel/visualize_membrane.cc +++ b/source/src/apps/pilot/ralford/archive/framework_devel/visualize_membrane.cc @@ -128,7 +128,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/membrane_fa_scorefxn.cc b/source/src/apps/pilot/ralford/archive/membrane_fa_scorefxn.cc index 2525c6a762..34cefa25ed 100644 --- a/source/src/apps/pilot/ralford/archive/membrane_fa_scorefxn.cc +++ b/source/src/apps/pilot/ralford/archive/membrane_fa_scorefxn.cc @@ -111,7 +111,7 @@ int main( int argc, char* argv[] ) MembraneSfxnMoverOP mp( new MembraneSfxnMover() ); JobDistributor::get_instance()->go(mp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/membrane_scorefxn.cc b/source/src/apps/pilot/ralford/archive/membrane_scorefxn.cc index 16bd2cff03..b9d3152052 100644 --- a/source/src/apps/pilot/ralford/archive/membrane_scorefxn.cc +++ b/source/src/apps/pilot/ralford/archive/membrane_scorefxn.cc @@ -117,7 +117,7 @@ int main( int argc, char* argv[] ) MembraneSfxnMoverOP mp( new MembraneSfxnMover() ); JobDistributor::get_instance()->go(mp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/mpframework_integration.cc b/source/src/apps/pilot/ralford/archive/mpframework_integration.cc index f6b68a3059..ca0eeab164 100644 --- a/source/src/apps/pilot/ralford/archive/mpframework_integration.cc +++ b/source/src/apps/pilot/ralford/archive/mpframework_integration.cc @@ -53,7 +53,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/old_applications/membrane_ddG.cc b/source/src/apps/pilot/ralford/archive/old_applications/membrane_ddG.cc index c2554deae6..d6d4334dae 100644 --- a/source/src/apps/pilot/ralford/archive/old_applications/membrane_ddG.cc +++ b/source/src/apps/pilot/ralford/archive/old_applications/membrane_ddG.cc @@ -179,7 +179,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/old_applications/membrane_docking.cc b/source/src/apps/pilot/ralford/archive/old_applications/membrane_docking.cc index 42de0c7faf..7b36d2e9ce 100644 --- a/source/src/apps/pilot/ralford/archive/old_applications/membrane_docking.cc +++ b/source/src/apps/pilot/ralford/archive/old_applications/membrane_docking.cc @@ -103,7 +103,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax.cc b/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax.cc index 18b3851f4c..f78ea16343 100644 --- a/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax.cc +++ b/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax.cc @@ -108,7 +108,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax2.cc b/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax2.cc index 53e4778506..af4afa9f7a 100644 --- a/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax2.cc +++ b/source/src/apps/pilot/ralford/archive/old_applications/membrane_relax2.cc @@ -163,7 +163,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/old_applications/membrane_sampling.cc b/source/src/apps/pilot/ralford/archive/old_applications/membrane_sampling.cc index 6e72ba7cf1..4afc3013e4 100644 --- a/source/src/apps/pilot/ralford/archive/old_applications/membrane_sampling.cc +++ b/source/src/apps/pilot/ralford/archive/old_applications/membrane_sampling.cc @@ -136,7 +136,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/read_mp_pose.cc b/source/src/apps/pilot/ralford/archive/read_mp_pose.cc index 11d9019ede..c4791cd453 100644 --- a/source/src/apps/pilot/ralford/archive/read_mp_pose.cc +++ b/source/src/apps/pilot/ralford/archive/read_mp_pose.cc @@ -68,7 +68,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/archive/read_mp_pose_from_seq.cc b/source/src/apps/pilot/ralford/archive/read_mp_pose_from_seq.cc index 2070ebbae9..e27df2cbe4 100644 --- a/source/src/apps/pilot/ralford/archive/read_mp_pose_from_seq.cc +++ b/source/src/apps/pilot/ralford/archive/read_mp_pose_from_seq.cc @@ -71,7 +71,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/archive/read_pose_from_seq.cc b/source/src/apps/pilot/ralford/archive/read_pose_from_seq.cc index 2070ebbae9..e27df2cbe4 100644 --- a/source/src/apps/pilot/ralford/archive/read_pose_from_seq.cc +++ b/source/src/apps/pilot/ralford/archive/read_pose_from_seq.cc @@ -71,7 +71,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/archive/test_mp_rmsd.cc b/source/src/apps/pilot/ralford/archive/test_mp_rmsd.cc index 93335ea9d4..cb3e25b2f8 100644 --- a/source/src/apps/pilot/ralford/archive/test_mp_rmsd.cc +++ b/source/src/apps/pilot/ralford/archive/test_mp_rmsd.cc @@ -62,7 +62,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/transform_into_mem.cc b/source/src/apps/pilot/ralford/archive/transform_into_mem.cc index d41d86e66c..c7af72f945 100644 --- a/source/src/apps/pilot/ralford/archive/transform_into_mem.cc +++ b/source/src/apps/pilot/ralford/archive/transform_into_mem.cc @@ -104,7 +104,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/transform_into_membrane.cc b/source/src/apps/pilot/ralford/archive/transform_into_membrane.cc index 7400037949..5f65cf3a12 100644 --- a/source/src/apps/pilot/ralford/archive/transform_into_membrane.cc +++ b/source/src/apps/pilot/ralford/archive/transform_into_membrane.cc @@ -74,7 +74,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/translate_membrane_pose.cc b/source/src/apps/pilot/ralford/archive/translate_membrane_pose.cc index b52ca0fe23..f2bdcd1ad3 100644 --- a/source/src/apps/pilot/ralford/archive/translate_membrane_pose.cc +++ b/source/src/apps/pilot/ralford/archive/translate_membrane_pose.cc @@ -102,7 +102,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/translate_view_membrane.cc b/source/src/apps/pilot/ralford/archive/translate_view_membrane.cc index 7a6a74e61a..111c0bdc06 100644 --- a/source/src/apps/pilot/ralford/archive/translate_view_membrane.cc +++ b/source/src/apps/pilot/ralford/archive/translate_view_membrane.cc @@ -104,7 +104,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/version_mpscorefxn.cc b/source/src/apps/pilot/ralford/archive/version_mpscorefxn.cc index 43cbd7f9a5..c358663883 100644 --- a/source/src/apps/pilot/ralford/archive/version_mpscorefxn.cc +++ b/source/src/apps/pilot/ralford/archive/version_mpscorefxn.cc @@ -293,7 +293,7 @@ int main( int argc, char ** argv ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/archive/visualize_membrane.cc b/source/src/apps/pilot/ralford/archive/visualize_membrane.cc index 792436cd5e..fc1fbb7904 100644 --- a/source/src/apps/pilot/ralford/archive/visualize_membrane.cc +++ b/source/src/apps/pilot/ralford/archive/visualize_membrane.cc @@ -79,7 +79,7 @@ main( int argc, char * argv [] ) // create MP pose create_MPpose(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ralford/enumerate_rotamers.cc b/source/src/apps/pilot/ralford/enumerate_rotamers.cc index 5afc721d12..5377636c49 100644 --- a/source/src/apps/pilot/ralford/enumerate_rotamers.cc +++ b/source/src/apps/pilot/ralford/enumerate_rotamers.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) DumpSingleResidueRotamersOP dump_rotamers( new DumpSingleResidueRotamers() ); protocols::jd2::JobDistributor::get_instance()->go( dump_rotamers ); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught Exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/make_canonical_helix.cc b/source/src/apps/pilot/ralford/make_canonical_helix.cc index 9f6fc1a711..b08dab2500 100644 --- a/source/src/apps/pilot/ralford/make_canonical_helix.cc +++ b/source/src/apps/pilot/ralford/make_canonical_helix.cc @@ -98,7 +98,7 @@ main( int argc, char * argv [] ) MakeCanonicalHelixOP make_helix( new MakeCanonicalHelix ); protocols::jd2::JobDistributor::get_instance()->go(make_helix); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught Exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/mp_rsd_energies.cc b/source/src/apps/pilot/ralford/mp_rsd_energies.cc index 4d2742c94e..a347849f76 100644 --- a/source/src/apps/pilot/ralford/mp_rsd_energies.cc +++ b/source/src/apps/pilot/ralford/mp_rsd_energies.cc @@ -205,7 +205,7 @@ main( int argc, char* argv [] ) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/sample_tilt_protocol.cc b/source/src/apps/pilot/ralford/sample_tilt_protocol.cc index 70e73b0787..d1be8b7e73 100644 --- a/source/src/apps/pilot/ralford/sample_tilt_protocol.cc +++ b/source/src/apps/pilot/ralford/sample_tilt_protocol.cc @@ -257,7 +257,7 @@ main( int argc, char * argv [] ) SampleTiltProtocolOP sample_tilt( new SampleTiltProtocol ); protocols::jd2::JobDistributor::get_instance()->go(sample_tilt); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught Exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ralford/version_mpscorefxn.cc b/source/src/apps/pilot/ralford/version_mpscorefxn.cc index 5f094c060e..85d4fed0aa 100644 --- a/source/src/apps/pilot/ralford/version_mpscorefxn.cc +++ b/source/src/apps/pilot/ralford/version_mpscorefxn.cc @@ -297,7 +297,7 @@ int main( int argc, char ** argv ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/assemble_placed_fragments.cc b/source/src/apps/pilot/rayyrw/assemble_placed_fragments.cc index 44d9b93b92..d004b4814e 100644 --- a/source/src/apps/pilot/rayyrw/assemble_placed_fragments.cc +++ b/source/src/apps/pilot/rayyrw/assemble_placed_fragments.cc @@ -117,7 +117,7 @@ int main( int argc, char* argv[] ) outstream.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/cal_nonoverlap_scores.cc b/source/src/apps/pilot/rayyrw/cal_nonoverlap_scores.cc index bf22048971..115b19111a 100644 --- a/source/src/apps/pilot/rayyrw/cal_nonoverlap_scores.cc +++ b/source/src/apps/pilot/rayyrw/cal_nonoverlap_scores.cc @@ -191,7 +191,7 @@ int main( int argc, char* argv[] ) outfn << "#fragA " << "fragB " << "offset " << "gap_size " << "counts " << "closab_score " << "clash_score " << "total_rmsd " << std::endl; outfn << outlines.str(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/cal_overlap_scores.cc b/source/src/apps/pilot/rayyrw/cal_overlap_scores.cc index 0162ee8ba7..4bd18b0f8c 100644 --- a/source/src/apps/pilot/rayyrw/cal_overlap_scores.cc +++ b/source/src/apps/pilot/rayyrw/cal_overlap_scores.cc @@ -170,7 +170,7 @@ int main( int argc, char* argv[] ) outfn << "#fragA " << "fragB " << "offset " << "overlap_score " << "total_rmsd " << std::endl; outfn << outlines.str(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/fastrelax_replonly.cc b/source/src/apps/pilot/rayyrw/fastrelax_replonly.cc index 22edef4f1b..5bc8e34a72 100644 --- a/source/src/apps/pilot/rayyrw/fastrelax_replonly.cc +++ b/source/src/apps/pilot/rayyrw/fastrelax_replonly.cc @@ -62,7 +62,7 @@ main ( int argc, char *argv[] ) { container->add_mover( new protocols::relax::FastRelax(score) ); JobDistributor::get_instance()->go(container); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/place_fragments_into_density.cc b/source/src/apps/pilot/rayyrw/place_fragments_into_density.cc index c02d27c673..c1b5c1a6d2 100644 --- a/source/src/apps/pilot/rayyrw/place_fragments_into_density.cc +++ b/source/src/apps/pilot/rayyrw/place_fragments_into_density.cc @@ -680,7 +680,7 @@ int main(int argc, char* argv[]) { } // positional candidate check } // position check -> only work on some positions } // residual fragments check - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/replonly.cc b/source/src/apps/pilot/rayyrw/replonly.cc index bcdb6881b9..bac2ec3ced 100644 --- a/source/src/apps/pilot/rayyrw/replonly.cc +++ b/source/src/apps/pilot/rayyrw/replonly.cc @@ -61,7 +61,7 @@ main (int argc, char *argv[]) pose.dump_scored_pdb("after.pdb",*score); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rayyrw/score_jd2_replonly.cc b/source/src/apps/pilot/rayyrw/score_jd2_replonly.cc index 56773efe5c..ee8b374735 100644 --- a/source/src/apps/pilot/rayyrw/score_jd2_replonly.cc +++ b/source/src/apps/pilot/rayyrw/score_jd2_replonly.cc @@ -158,7 +158,7 @@ main( int argc, char * argv [] ) try{ add_cmdline_claims(*top_bro_OP, false /*do_I_need_fragments */); } -catch ( utility::excn::EXCN_Exception &excn ) { +catch (utility::excn::Exception &excn ) { excn.show( TR.Error ); utility_exit(); } @@ -191,13 +191,13 @@ catch ( utility::excn::EXCN_Exception &excn ) { try{ JobDistributor::get_instance()->go( container ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/benzene_test.cc b/source/src/apps/pilot/rhiju/benzene_test.cc index edd149f2bc..ec23f232d4 100644 --- a/source/src/apps/pilot/rhiju/benzene_test.cc +++ b/source/src/apps/pilot/rhiju/benzene_test.cc @@ -235,7 +235,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/block_stack_test.cc b/source/src/apps/pilot/rhiju/block_stack_test.cc index 15a18ffe7b..b2f79a6f79 100644 --- a/source/src/apps/pilot/rhiju/block_stack_test.cc +++ b/source/src/apps/pilot/rhiju/block_stack_test.cc @@ -196,7 +196,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/check_cubic_conv.cc b/source/src/apps/pilot/rhiju/check_cubic_conv.cc index 2ba79e7a3b..8ac5aab916 100644 --- a/source/src/apps/pilot/rhiju/check_cubic_conv.cc +++ b/source/src/apps/pilot/rhiju/check_cubic_conv.cc @@ -245,7 +245,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/coarse_rna_test.cc b/source/src/apps/pilot/rhiju/coarse_rna_test.cc index de2746f76a..da6f720dc1 100644 --- a/source/src/apps/pilot/rhiju/coarse_rna_test.cc +++ b/source/src/apps/pilot/rhiju/coarse_rna_test.cc @@ -1694,7 +1694,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/dna_test.cc b/source/src/apps/pilot/rhiju/dna_test.cc index b4ba7bb58f..1a1c36d5f2 100644 --- a/source/src/apps/pilot/rhiju/dna_test.cc +++ b/source/src/apps/pilot/rhiju/dna_test.cc @@ -188,7 +188,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/easy_target_test.cc b/source/src/apps/pilot/rhiju/easy_target_test.cc index a45dd96aaf..b7c8ddc52a 100644 --- a/source/src/apps/pilot/rhiju/easy_target_test.cc +++ b/source/src/apps/pilot/rhiju/easy_target_test.cc @@ -2084,7 +2084,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/entropy_test.cc b/source/src/apps/pilot/rhiju/entropy_test.cc index 4167717e0f..94ccadf7a7 100644 --- a/source/src/apps/pilot/rhiju/entropy_test.cc +++ b/source/src/apps/pilot/rhiju/entropy_test.cc @@ -757,7 +757,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/gcc185_test.cc b/source/src/apps/pilot/rhiju/gcc185_test.cc index 97fc02c0b7..0926c77afd 100644 --- a/source/src/apps/pilot/rhiju/gcc185_test.cc +++ b/source/src/apps/pilot/rhiju/gcc185_test.cc @@ -575,7 +575,7 @@ main( int argc, char * argv [] ) repack_minimize_test(); exit(0); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/generalize_gaussian_chain_func_test.cc b/source/src/apps/pilot/rhiju/generalize_gaussian_chain_func_test.cc index 4be6a4a8f0..5ab6fd530e 100644 --- a/source/src/apps/pilot/rhiju/generalize_gaussian_chain_func_test.cc +++ b/source/src/apps/pilot/rhiju/generalize_gaussian_chain_func_test.cc @@ -121,7 +121,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/get_info.cc b/source/src/apps/pilot/rhiju/get_info.cc index a270982f55..4b5bc95cfb 100644 --- a/source/src/apps/pilot/rhiju/get_info.cc +++ b/source/src/apps/pilot/rhiju/get_info.cc @@ -359,7 +359,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/homolog_finder_farna.cc b/source/src/apps/pilot/rhiju/homolog_finder_farna.cc index 75ffa7d2b9..1880e434e0 100644 --- a/source/src/apps/pilot/rhiju/homolog_finder_farna.cc +++ b/source/src/apps/pilot/rhiju/homolog_finder_farna.cc @@ -236,7 +236,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/OLD_TRIAL_protein_helix_assemble.cc b/source/src/apps/pilot/rhiju/legacy/OLD_TRIAL_protein_helix_assemble.cc index d67810552b..72485f9d88 100644 --- a/source/src/apps/pilot/rhiju/legacy/OLD_TRIAL_protein_helix_assemble.cc +++ b/source/src/apps/pilot/rhiju/legacy/OLD_TRIAL_protein_helix_assemble.cc @@ -317,7 +317,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/TRIAL_protein_helix_assemble.cc b/source/src/apps/pilot/rhiju/legacy/TRIAL_protein_helix_assemble.cc index 89697a1a07..275a1c0c04 100644 --- a/source/src/apps/pilot/rhiju/legacy/TRIAL_protein_helix_assemble.cc +++ b/source/src/apps/pilot/rhiju/legacy/TRIAL_protein_helix_assemble.cc @@ -337,7 +337,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/add_delete_monte_carlo.cc b/source/src/apps/pilot/rhiju/legacy/add_delete_monte_carlo.cc index 4186414504..2163216ddb 100644 --- a/source/src/apps/pilot/rhiju/legacy/add_delete_monte_carlo.cc +++ b/source/src/apps/pilot/rhiju/legacy/add_delete_monte_carlo.cc @@ -532,7 +532,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/erraser_monte_carlo.cc b/source/src/apps/pilot/rhiju/legacy/erraser_monte_carlo.cc index bd05a0a1fc..0ac703c7e2 100644 --- a/source/src/apps/pilot/rhiju/legacy/erraser_monte_carlo.cc +++ b/source/src/apps/pilot/rhiju/legacy/erraser_monte_carlo.cc @@ -284,7 +284,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/stepwise_test.cc b/source/src/apps/pilot/rhiju/legacy/stepwise_test.cc index b683e5e8c3..5d64fa9f82 100644 --- a/source/src/apps/pilot/rhiju/legacy/stepwise_test.cc +++ b/source/src/apps/pilot/rhiju/legacy/stepwise_test.cc @@ -1706,7 +1706,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/turner_rules_test.cc b/source/src/apps/pilot/rhiju/legacy/turner_rules_test.cc index 89c2e89964..d407edab4b 100644 --- a/source/src/apps/pilot/rhiju/legacy/turner_rules_test.cc +++ b/source/src/apps/pilot/rhiju/legacy/turner_rules_test.cc @@ -3386,7 +3386,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/legacy/turner_rules_test_WORKS.cc b/source/src/apps/pilot/rhiju/legacy/turner_rules_test_WORKS.cc index c3d9409cb8..86fc6aca03 100644 --- a/source/src/apps/pilot/rhiju/legacy/turner_rules_test_WORKS.cc +++ b/source/src/apps/pilot/rhiju/legacy/turner_rules_test_WORKS.cc @@ -506,7 +506,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/loop_closure_test.cc b/source/src/apps/pilot/rhiju/loop_closure_test.cc index 511a584779..d06c91858c 100644 --- a/source/src/apps/pilot/rhiju/loop_closure_test.cc +++ b/source/src/apps/pilot/rhiju/loop_closure_test.cc @@ -699,7 +699,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/mg_hires_pdbstats.cc b/source/src/apps/pilot/rhiju/mg_hires_pdbstats.cc index 5da1108a04..db3beb5a53 100644 --- a/source/src/apps/pilot/rhiju/mg_hires_pdbstats.cc +++ b/source/src/apps/pilot/rhiju/mg_hires_pdbstats.cc @@ -274,7 +274,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/mg_lores_pdbstats.cc b/source/src/apps/pilot/rhiju/mg_lores_pdbstats.cc index 5b5bf368bf..384991439b 100644 --- a/source/src/apps/pilot/rhiju/mg_lores_pdbstats.cc +++ b/source/src/apps/pilot/rhiju/mg_lores_pdbstats.cc @@ -361,7 +361,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/morph_pdbs.cc b/source/src/apps/pilot/rhiju/morph_pdbs.cc index eeb8fc8d93..3960ba9d47 100644 --- a/source/src/apps/pilot/rhiju/morph_pdbs.cc +++ b/source/src/apps/pilot/rhiju/morph_pdbs.cc @@ -192,7 +192,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/pack_phosphates.cc b/source/src/apps/pilot/rhiju/pack_phosphates.cc index dd6d8fd0ba..1fd4a66017 100644 --- a/source/src/apps/pilot/rhiju/pack_phosphates.cc +++ b/source/src/apps/pilot/rhiju/pack_phosphates.cc @@ -373,7 +373,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/pack_polar_hydrogens.cc b/source/src/apps/pilot/rhiju/pack_polar_hydrogens.cc index 9270a7f0cb..304e743d2a 100644 --- a/source/src/apps/pilot/rhiju/pack_polar_hydrogens.cc +++ b/source/src/apps/pilot/rhiju/pack_polar_hydrogens.cc @@ -92,7 +92,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/pdbstats_rnahelix.cc b/source/src/apps/pilot/rhiju/pdbstats_rnahelix.cc index 75cac835f5..956a67a408 100644 --- a/source/src/apps/pilot/rhiju/pdbstats_rnahelix.cc +++ b/source/src/apps/pilot/rhiju/pdbstats_rnahelix.cc @@ -219,7 +219,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/pdbstats_test.cc b/source/src/apps/pilot/rhiju/pdbstats_test.cc index f63d91b362..047e151f8e 100644 --- a/source/src/apps/pilot/rhiju/pdbstats_test.cc +++ b/source/src/apps/pilot/rhiju/pdbstats_test.cc @@ -933,7 +933,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/protein_helix_assemble.cc b/source/src/apps/pilot/rhiju/protein_helix_assemble.cc index 2b73305b93..f057938319 100644 --- a/source/src/apps/pilot/rhiju/protein_helix_assemble.cc +++ b/source/src/apps/pilot/rhiju/protein_helix_assemble.cc @@ -311,7 +311,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/rb_entropy.cc b/source/src/apps/pilot/rhiju/rb_entropy.cc index 1ca846e9b7..6f2330a897 100644 --- a/source/src/apps/pilot/rhiju/rb_entropy.cc +++ b/source/src/apps/pilot/rhiju/rb_entropy.cc @@ -309,7 +309,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/read_tensor.cc b/source/src/apps/pilot/rhiju/read_tensor.cc index 6156e78bbf..bca580f5ac 100644 --- a/source/src/apps/pilot/rhiju/read_tensor.cc +++ b/source/src/apps/pilot/rhiju/read_tensor.cc @@ -248,7 +248,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/rna_assemble_test.cc b/source/src/apps/pilot/rhiju/rna_assemble_test.cc index ac7cdfb44b..552787630f 100644 --- a/source/src/apps/pilot/rhiju/rna_assemble_test.cc +++ b/source/src/apps/pilot/rhiju/rna_assemble_test.cc @@ -651,7 +651,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/rna_protein_test.cc b/source/src/apps/pilot/rhiju/rna_protein_test.cc index 2e5fb59e6f..cfcf69b613 100644 --- a/source/src/apps/pilot/rhiju/rna_protein_test.cc +++ b/source/src/apps/pilot/rhiju/rna_protein_test.cc @@ -961,7 +961,7 @@ main( int argc, char * argv [] ) exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/rna_test.cc b/source/src/apps/pilot/rhiju/rna_test.cc index 96b85977f4..536e5a390c 100644 --- a/source/src/apps/pilot/rhiju/rna_test.cc +++ b/source/src/apps/pilot/rhiju/rna_test.cc @@ -4721,7 +4721,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/screen_phosphates.cc b/source/src/apps/pilot/rhiju/screen_phosphates.cc index edd3e74e5d..1d1c2a6b46 100644 --- a/source/src/apps/pilot/rhiju/screen_phosphates.cc +++ b/source/src/apps/pilot/rhiju/screen_phosphates.cc @@ -222,7 +222,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/silly_tag_stuff.cc b/source/src/apps/pilot/rhiju/silly_tag_stuff.cc index 11cca61ec1..2159474fd3 100644 --- a/source/src/apps/pilot/rhiju/silly_tag_stuff.cc +++ b/source/src/apps/pilot/rhiju/silly_tag_stuff.cc @@ -61,7 +61,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/stepwise_centroid_test.cc b/source/src/apps/pilot/rhiju/stepwise_centroid_test.cc index c29b1d7fdd..c23c36bb6c 100644 --- a/source/src/apps/pilot/rhiju/stepwise_centroid_test.cc +++ b/source/src/apps/pilot/rhiju/stepwise_centroid_test.cc @@ -723,7 +723,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/stepwise_helix_test.cc b/source/src/apps/pilot/rhiju/stepwise_helix_test.cc index eaaf279e8a..79c74fd461 100644 --- a/source/src/apps/pilot/rhiju/stepwise_helix_test.cc +++ b/source/src/apps/pilot/rhiju/stepwise_helix_test.cc @@ -887,7 +887,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/stepwise_loop_test.cc b/source/src/apps/pilot/rhiju/stepwise_loop_test.cc index 0de727c257..62caa7d1ef 100644 --- a/source/src/apps/pilot/rhiju/stepwise_loop_test.cc +++ b/source/src/apps/pilot/rhiju/stepwise_loop_test.cc @@ -485,7 +485,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/stepwise_lores_test.cc b/source/src/apps/pilot/rhiju/stepwise_lores_test.cc index ecc610da68..9c04eb71b8 100644 --- a/source/src/apps/pilot/rhiju/stepwise_lores_test.cc +++ b/source/src/apps/pilot/rhiju/stepwise_lores_test.cc @@ -116,7 +116,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rhiju/stepwise_template_test.cc b/source/src/apps/pilot/rhiju/stepwise_template_test.cc index b9ea52f651..c26f3dd906 100644 --- a/source/src/apps/pilot/rhiju/stepwise_template_test.cc +++ b/source/src/apps/pilot/rhiju/stepwise_template_test.cc @@ -679,7 +679,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rjha/MetalInterfaceStructureCreator.cc b/source/src/apps/pilot/rjha/MetalInterfaceStructureCreator.cc index cd0212ea9f..89d096357a 100644 --- a/source/src/apps/pilot/rjha/MetalInterfaceStructureCreator.cc +++ b/source/src/apps/pilot/rjha/MetalInterfaceStructureCreator.cc @@ -351,7 +351,7 @@ main( int argc, char* argv[] ) TR << "************************d**o**n**e**********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rjha/NeighborMatch.cc b/source/src/apps/pilot/rjha/NeighborMatch.cc index b0ae778c61..0eaef473c8 100644 --- a/source/src/apps/pilot/rjha/NeighborMatch.cc +++ b/source/src/apps/pilot/rjha/NeighborMatch.cc @@ -108,7 +108,7 @@ main( int argc, char* argv[] ) TR << std::endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rjha/SurfaceGroups.cc b/source/src/apps/pilot/rjha/SurfaceGroups.cc index 823a324e47..af9bcdd086 100644 --- a/source/src/apps/pilot/rjha/SurfaceGroups.cc +++ b/source/src/apps/pilot/rjha/SurfaceGroups.cc @@ -134,7 +134,7 @@ main( int argc, char* argv[] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rjha/ZincMatchFilter.cc b/source/src/apps/pilot/rjha/ZincMatchFilter.cc index 6f79900ad6..24cdeabcdc 100644 --- a/source/src/apps/pilot/rjha/ZincMatchFilter.cc +++ b/source/src/apps/pilot/rjha/ZincMatchFilter.cc @@ -314,7 +314,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/atom_tree_check.cc b/source/src/apps/pilot/rmoretti/atom_tree_check.cc index 80fc8d7b94..69fce60323 100644 --- a/source/src/apps/pilot/rmoretti/atom_tree_check.cc +++ b/source/src/apps/pilot/rmoretti/atom_tree_check.cc @@ -639,7 +639,7 @@ main( int argc, char * argv [] ) TR << "Done trees" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/rmoretti/bcl_type_check.cc b/source/src/apps/pilot/rmoretti/bcl_type_check.cc index 52da0de6b5..e335141298 100644 --- a/source/src/apps/pilot/rmoretti/bcl_type_check.cc +++ b/source/src/apps/pilot/rmoretti/bcl_type_check.cc @@ -108,7 +108,7 @@ main( int argc, char * argv [] ) TR << "Done outputing typeinfo" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/bootstrap_bcl_types.cc b/source/src/apps/pilot/rmoretti/bootstrap_bcl_types.cc index fa2b419c71..b520403866 100644 --- a/source/src/apps/pilot/rmoretti/bootstrap_bcl_types.cc +++ b/source/src/apps/pilot/rmoretti/bootstrap_bcl_types.cc @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -7133,7 +7133,7 @@ try { std::cout << ">>> read " << acount << " atom types versus " << atoms.size() << " total " << std::endl << std::endl; // read back in. -} catch ( utility::excn::EXCN_Base const & e ) { +} catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/extract_atomtree_diffs_jd1.cc b/source/src/apps/pilot/rmoretti/extract_atomtree_diffs_jd1.cc index 025c36a81d..04b24db777 100644 --- a/source/src/apps/pilot/rmoretti/extract_atomtree_diffs_jd1.cc +++ b/source/src/apps/pilot/rmoretti/extract_atomtree_diffs_jd1.cc @@ -188,7 +188,7 @@ main( int argc, char * argv [] ) } return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/ligand_dock_jd1.cc b/source/src/apps/pilot/rmoretti/ligand_dock_jd1.cc index 59fe164ed5..a2e51dd24d 100644 --- a/source/src/apps/pilot/rmoretti/ligand_dock_jd1.cc +++ b/source/src/apps/pilot/rmoretti/ligand_dock_jd1.cc @@ -250,7 +250,7 @@ main( int argc, char * argv [] ) return ligand_dock_main_jd1(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/ligand_rpkmin_jd1.cc b/source/src/apps/pilot/rmoretti/ligand_rpkmin_jd1.cc index be4954ad3c..d3deca89b1 100644 --- a/source/src/apps/pilot/rmoretti/ligand_rpkmin_jd1.cc +++ b/source/src/apps/pilot/rmoretti/ligand_rpkmin_jd1.cc @@ -159,7 +159,7 @@ main( int argc, char * argv [] ) protocols::jobdist::main_plain_pdb_mover(*dockingProtocol, dockingProtocol->get_scorefxn()); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/molfile_read_test.cc b/source/src/apps/pilot/rmoretti/molfile_read_test.cc index fa55ae130a..9167b1bee4 100644 --- a/source/src/apps/pilot/rmoretti/molfile_read_test.cc +++ b/source/src/apps/pilot/rmoretti/molfile_read_test.cc @@ -106,7 +106,7 @@ main( int argc, char * argv [] ) TR << "Done with output test." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/rmoretti/restype_kin_output.cc b/source/src/apps/pilot/rmoretti/restype_kin_output.cc index 93631c3cc1..c0651a7812 100644 --- a/source/src/apps/pilot/rmoretti/restype_kin_output.cc +++ b/source/src/apps/pilot/rmoretti/restype_kin_output.cc @@ -88,7 +88,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/rosetta_retype_check.cc b/source/src/apps/pilot/rmoretti/rosetta_retype_check.cc index fb3539651b..4ff691bebd 100644 --- a/source/src/apps/pilot/rmoretti/rosetta_retype_check.cc +++ b/source/src/apps/pilot/rmoretti/rosetta_retype_check.cc @@ -92,7 +92,7 @@ main( int argc, char * argv [] ) TR << "Done outputing typeinfo" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rmoretti/rts_check.cc b/source/src/apps/pilot/rmoretti/rts_check.cc index 35371e19fa..f551d85999 100644 --- a/source/src/apps/pilot/rmoretti/rts_check.cc +++ b/source/src/apps/pilot/rmoretti/rts_check.cc @@ -173,7 +173,7 @@ main( int argc, char * argv [] ) TR << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/ronj/analyze_ddG.cc b/source/src/apps/pilot/ronj/analyze_ddG.cc index 0bf07ebe2e..87bf7ff175 100644 --- a/source/src/apps/pilot/ronj/analyze_ddG.cc +++ b/source/src/apps/pilot/ronj/analyze_ddG.cc @@ -495,7 +495,7 @@ int main( int argc, char* argv[] ) { print_energies( ddG_energies, scorefxn ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/find_position_matches_using_inverse_rotamers.cc b/source/src/apps/pilot/ronj/find_position_matches_using_inverse_rotamers.cc index 30ee2bfa4b..36c8f6ff63 100644 --- a/source/src/apps/pilot/ronj/find_position_matches_using_inverse_rotamers.cc +++ b/source/src/apps/pilot/ronj/find_position_matches_using_inverse_rotamers.cc @@ -777,7 +777,7 @@ main( int argc, char * argv [] ) { fclose( fout ); TR << "Done." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/hydrophobic_patch_stats_calculator.cc b/source/src/apps/pilot/ronj/hydrophobic_patch_stats_calculator.cc index cf15dd2808..495676d0f0 100644 --- a/source/src/apps/pilot/ronj/hydrophobic_patch_stats_calculator.cc +++ b/source/src/apps/pilot/ronj/hydrophobic_patch_stats_calculator.cc @@ -2699,7 +2699,7 @@ main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/report_hbonds_for_plugin.cc b/source/src/apps/pilot/ronj/report_hbonds_for_plugin.cc index c792816ac6..b52f5d2515 100644 --- a/source/src/apps/pilot/ronj/report_hbonds_for_plugin.cc +++ b/source/src/apps/pilot/ronj/report_hbonds_for_plugin.cc @@ -399,7 +399,7 @@ int main( int argc, char* argv[] ) { devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new HBondReporter ) ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/rss_energy_calculator.cc b/source/src/apps/pilot/ronj/rss_energy_calculator.cc index 8461410ad8..cc594a8ba8 100644 --- a/source/src/apps/pilot/ronj/rss_energy_calculator.cc +++ b/source/src/apps/pilot/ronj/rss_energy_calculator.cc @@ -520,7 +520,7 @@ main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/surface_optE_parallel.cc b/source/src/apps/pilot/ronj/surface_optE_parallel.cc index 3cad47cfb4..f74bea5b1b 100644 --- a/source/src/apps/pilot/ronj/surface_optE_parallel.cc +++ b/source/src/apps/pilot/ronj/surface_optE_parallel.cc @@ -43,7 +43,7 @@ main( int argc, char * argv [] ) { #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/ronj/surfacescore.cc b/source/src/apps/pilot/ronj/surfacescore.cc index 228148f64c..7a25559708 100644 --- a/source/src/apps/pilot/ronj/surfacescore.cc +++ b/source/src/apps/pilot/ronj/surfacescore.cc @@ -676,7 +676,7 @@ main( int argc, char* argv[] ) { } // now do it all over for another structure - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rpache/calibrate_pdb_via_sidechain_optimization.cc b/source/src/apps/pilot/rpache/calibrate_pdb_via_sidechain_optimization.cc index e11d2c1270..72d4c9ea5e 100644 --- a/source/src/apps/pilot/rpache/calibrate_pdb_via_sidechain_optimization.cc +++ b/source/src/apps/pilot/rpache/calibrate_pdb_via_sidechain_optimization.cc @@ -167,7 +167,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rpache/create_clash-based_repack_shell.cc b/source/src/apps/pilot/rpache/create_clash-based_repack_shell.cc index ced66c23ad..213ad3d61c 100644 --- a/source/src/apps/pilot/rpache/create_clash-based_repack_shell.cc +++ b/source/src/apps/pilot/rpache/create_clash-based_repack_shell.cc @@ -33,7 +33,7 @@ // Utility headers #include -#include +#include #include #include @@ -114,7 +114,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rpache/generate_matcher_constraints.cc b/source/src/apps/pilot/rpache/generate_matcher_constraints.cc index 4cf7cc576f..ea45b2f684 100644 --- a/source/src/apps/pilot/rpache/generate_matcher_constraints.cc +++ b/source/src/apps/pilot/rpache/generate_matcher_constraints.cc @@ -338,7 +338,7 @@ int main( int argc, char * argv [] ) TR << "torsion_AB " << numeric::constants::d::radians_to_degrees * numeric::dihedral_radians( vu2, vu1, vd1, vd2 ) << std::endl; TR << "torsion_B " << numeric::constants::d::radians_to_degrees * numeric::dihedral_radians( vu3, vu2, vu1, vd1 ) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rpache/score_protein_ligand_interactions.cc b/source/src/apps/pilot/rpache/score_protein_ligand_interactions.cc index 2e7ff0b0fc..932a4a730c 100644 --- a/source/src/apps/pilot/rpache/score_protein_ligand_interactions.cc +++ b/source/src/apps/pilot/rpache/score_protein_ligand_interactions.cc @@ -139,7 +139,7 @@ int main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/compute_disulfide_matching_score.cc b/source/src/apps/pilot/rvernon/compute_disulfide_matching_score.cc index 86aa833148..70f03c2f37 100644 --- a/source/src/apps/pilot/rvernon/compute_disulfide_matching_score.cc +++ b/source/src/apps/pilot/rvernon/compute_disulfide_matching_score.cc @@ -398,7 +398,7 @@ main( int argc, char* argv [] ) //FileName fn( name ); //VallReader vall( name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/create_disulfide_alldata.cc b/source/src/apps/pilot/rvernon/create_disulfide_alldata.cc index 8698264aa4..ee20966c24 100644 --- a/source/src/apps/pilot/rvernon/create_disulfide_alldata.cc +++ b/source/src/apps/pilot/rvernon/create_disulfide_alldata.cc @@ -380,7 +380,7 @@ main( int argc, char* argv [] ) //FileName fn( name ); //VallReader vall( name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/create_disulfide_angle_statistics.cc b/source/src/apps/pilot/rvernon/create_disulfide_angle_statistics.cc index 63494f6365..ea9f8012a3 100644 --- a/source/src/apps/pilot/rvernon/create_disulfide_angle_statistics.cc +++ b/source/src/apps/pilot/rvernon/create_disulfide_angle_statistics.cc @@ -340,7 +340,7 @@ main( int argc, char* argv [] ) //FileName fn( name ); //VallReader vall( name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/create_disulfide_database.cc b/source/src/apps/pilot/rvernon/create_disulfide_database.cc index 960837b086..9a98e6f1f5 100644 --- a/source/src/apps/pilot/rvernon/create_disulfide_database.cc +++ b/source/src/apps/pilot/rvernon/create_disulfide_database.cc @@ -383,7 +383,7 @@ main( int argc, char* argv [] ) infile >> pdb_file_location >> res1 >> res2; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/create_disulfide_distance_statistics.cc b/source/src/apps/pilot/rvernon/create_disulfide_distance_statistics.cc index 1f9b37738e..659a6af5fb 100644 --- a/source/src/apps/pilot/rvernon/create_disulfide_distance_statistics.cc +++ b/source/src/apps/pilot/rvernon/create_disulfide_distance_statistics.cc @@ -365,7 +365,7 @@ main( int argc, char* argv [] ) //FileName fn( name ); //VallReader vall( name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/create_disulfide_fa_angle_statistics.cc b/source/src/apps/pilot/rvernon/create_disulfide_fa_angle_statistics.cc index 4d2e8672eb..22077bfaa5 100644 --- a/source/src/apps/pilot/rvernon/create_disulfide_fa_angle_statistics.cc +++ b/source/src/apps/pilot/rvernon/create_disulfide_fa_angle_statistics.cc @@ -356,7 +356,7 @@ main( int argc, char* argv [] ) //FileName fn( name ); //VallReader vall( name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_distances_for_fragpicker.cc b/source/src/apps/pilot/rvernon/pcs_distances_for_fragpicker.cc index 9f8bc369cd..ee9d5c420f 100644 --- a/source/src/apps/pilot/rvernon/pcs_distances_for_fragpicker.cc +++ b/source/src/apps/pilot/rvernon/pcs_distances_for_fragpicker.cc @@ -356,7 +356,7 @@ main( int argc, char* argv [] ) infile >> outfile_location;// >> res1 >> res2 >> native_location; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances.cc b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances.cc index 4360cc2821..bb9cbbb586 100644 --- a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances.cc +++ b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances.cc @@ -303,7 +303,7 @@ main( int argc, char* argv [] ) } // int main( int argc, char * argv [] ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances2.cc b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances2.cc index b2440e3be2..58997b2629 100644 --- a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances2.cc +++ b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances2.cc @@ -375,7 +375,7 @@ main( int argc, char* argv [] ) infile >> outfile_location;// >> res1 >> res2 >> native_location; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances_wRMS.cc b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances_wRMS.cc index 78024ef293..a47d54bc12 100644 --- a/source/src/apps/pilot/rvernon/pcs_fragments_to_distances_wRMS.cc +++ b/source/src/apps/pilot/rvernon/pcs_fragments_to_distances_wRMS.cc @@ -379,7 +379,7 @@ main( int argc, char* argv [] ) infile >> outfile_location;// >> res1 >> res2 >> native_location; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_score_individual_residues.cc b/source/src/apps/pilot/rvernon/pcs_score_individual_residues.cc index ce62ee8369..d116ac1309 100644 --- a/source/src/apps/pilot/rvernon/pcs_score_individual_residues.cc +++ b/source/src/apps/pilot/rvernon/pcs_score_individual_residues.cc @@ -365,7 +365,7 @@ main( int argc, char* argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_score_residues.cc b/source/src/apps/pilot/rvernon/pcs_score_residues.cc index 23c68e5091..9949ddb168 100644 --- a/source/src/apps/pilot/rvernon/pcs_score_residues.cc +++ b/source/src/apps/pilot/rvernon/pcs_score_residues.cc @@ -278,7 +278,7 @@ main( int argc, char* argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_score_select.cc b/source/src/apps/pilot/rvernon/pcs_score_select.cc index 36cfb7297e..b526028c59 100644 --- a/source/src/apps/pilot/rvernon/pcs_score_select.cc +++ b/source/src/apps/pilot/rvernon/pcs_score_select.cc @@ -258,7 +258,7 @@ main( int argc, char* argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/pcs_score_select_helices.cc b/source/src/apps/pilot/rvernon/pcs_score_select_helices.cc index 82760ae197..9a12f6fa8f 100644 --- a/source/src/apps/pilot/rvernon/pcs_score_select_helices.cc +++ b/source/src/apps/pilot/rvernon/pcs_score_select_helices.cc @@ -402,7 +402,7 @@ main( int argc, char* argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/print_disulfide_scorefunctions.cc b/source/src/apps/pilot/rvernon/print_disulfide_scorefunctions.cc index bf0deac7b1..b79bdc9c03 100644 --- a/source/src/apps/pilot/rvernon/print_disulfide_scorefunctions.cc +++ b/source/src/apps/pilot/rvernon/print_disulfide_scorefunctions.cc @@ -71,7 +71,7 @@ main( int argc, char* argv [] ) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/rvernon/score_sidechain_sasa.cc b/source/src/apps/pilot/rvernon/score_sidechain_sasa.cc index b011e7115f..207eedaebc 100644 --- a/source/src/apps/pilot/rvernon/score_sidechain_sasa.cc +++ b/source/src/apps/pilot/rvernon/score_sidechain_sasa.cc @@ -190,7 +190,7 @@ main( int argc, char* argv [] ) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sarel/hotspot_stub_constraint_test.cc b/source/src/apps/pilot/sarel/hotspot_stub_constraint_test.cc index 06c3a79da2..94b3cdeef6 100644 --- a/source/src/apps/pilot/sarel/hotspot_stub_constraint_test.cc +++ b/source/src/apps/pilot/sarel/hotspot_stub_constraint_test.cc @@ -154,7 +154,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/ColorsDemo.cc b/source/src/apps/pilot/sergey/ColorsDemo.cc index 73e5056256..faf4841e03 100644 --- a/source/src/apps/pilot/sergey/ColorsDemo.cc +++ b/source/src/apps/pilot/sergey/ColorsDemo.cc @@ -80,15 +80,15 @@ int main( int argc, char * argv [] ) //assert( "Plain Assert Example" == empty_string ); //try { // debug_assert( "Debug Assert Example" == empty_string ); - //} catch ( utility::excn::EXCN_Base const & e ) {} + //} catch (utility::excn::Exception const & e ) {} //try { // runtime_assert( "Runtime Assert Example" == empty_string ); - //} catch ( utility::excn::EXCN_Base const & e ) {} + //} catch (utility::excn::Exception const & e ) {} utility_exit_with_message("\nExample of utility_exit_with_message..."); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/ComparingTracerExample.cc b/source/src/apps/pilot/sergey/ComparingTracerExample.cc index c31d14317c..a5e37a67f0 100644 --- a/source/src/apps/pilot/sergey/ComparingTracerExample.cc +++ b/source/src/apps/pilot/sergey/ComparingTracerExample.cc @@ -42,7 +42,7 @@ int main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/GA.cc b/source/src/apps/pilot/sergey/GA.cc index b49d260972..fe97c85b70 100644 --- a/source/src/apps/pilot/sergey/GA.cc +++ b/source/src/apps/pilot/sergey/GA.cc @@ -149,7 +149,7 @@ int main( int argc, char * argv [] ) TR << "GA test ended. --------------------------------" << std::endl; return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/JSON_Demo.cc b/source/src/apps/pilot/sergey/JSON_Demo.cc index 0f3ec7219b..47d64f15e2 100644 --- a/source/src/apps/pilot/sergey/JSON_Demo.cc +++ b/source/src/apps/pilot/sergey/JSON_Demo.cc @@ -85,7 +85,7 @@ int main( int argc, char * argv [] ) std::cout << utility::json_spirit::write(loop, utility::json_spirit::pretty_print) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/OptionsTest.cc b/source/src/apps/pilot/sergey/OptionsTest.cc index 19269d80af..ac46fd43fb 100644 --- a/source/src/apps/pilot/sergey/OptionsTest.cc +++ b/source/src/apps/pilot/sergey/OptionsTest.cc @@ -165,7 +165,7 @@ int main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/PDBTest.cc b/source/src/apps/pilot/sergey/PDBTest.cc index 18549f5782..975dc34f6c 100644 --- a/source/src/apps/pilot/sergey/PDBTest.cc +++ b/source/src/apps/pilot/sergey/PDBTest.cc @@ -255,7 +255,7 @@ int main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/PyEnTest.cc b/source/src/apps/pilot/sergey/PyEnTest.cc index 4f97de583e..f2e862b55f 100644 --- a/source/src/apps/pilot/sergey/PyEnTest.cc +++ b/source/src/apps/pilot/sergey/PyEnTest.cc @@ -121,7 +121,7 @@ int main( int argc, char * argv [] ) std::cout << "Score:" << scorefxn->score(*pose) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/PyMOLDemo.cc b/source/src/apps/pilot/sergey/PyMOLDemo.cc index 50b4478df9..6bf6eef373 100644 --- a/source/src/apps/pilot/sergey/PyMOLDemo.cc +++ b/source/src/apps/pilot/sergey/PyMOLDemo.cc @@ -131,7 +131,7 @@ int main( int argc, char * argv [] ) pymol.send_foldtree(pose, fold_tree); std::cout<<"finished send_foldtree\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/SharedPtrDemo.cc b/source/src/apps/pilot/sergey/SharedPtrDemo.cc index 5023cd1a26..b1c14ca30c 100644 --- a/source/src/apps/pilot/sergey/SharedPtrDemo.cc +++ b/source/src/apps/pilot/sergey/SharedPtrDemo.cc @@ -88,7 +88,7 @@ int main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sergey/TracerTest.cc b/source/src/apps/pilot/sergey/TracerTest.cc index 4f66e5cfd9..fd267c3bc7 100644 --- a/source/src/apps/pilot/sergey/TracerTest.cc +++ b/source/src/apps/pilot/sergey/TracerTest.cc @@ -303,7 +303,7 @@ int main( int argc, char * argv [] ) //TR.flush(); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sevya/find_consensus_mutations.cc b/source/src/apps/pilot/sevya/find_consensus_mutations.cc index 2ce7a10751..5f7e0e7ea3 100644 --- a/source/src/apps/pilot/sevya/find_consensus_mutations.cc +++ b/source/src/apps/pilot/sevya/find_consensus_mutations.cc @@ -258,7 +258,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { utility_exit_with_message("caught exception " + e.msg()); } } diff --git a/source/src/apps/pilot/sevya/minimization_test.cc b/source/src/apps/pilot/sevya/minimization_test.cc index 20a4bfb851..87159789de 100644 --- a/source/src/apps/pilot/sevya/minimization_test.cc +++ b/source/src/apps/pilot/sevya/minimization_test.cc @@ -627,7 +627,7 @@ main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { utility_exit_with_message("caught exception " + e.msg()); } } diff --git a/source/src/apps/pilot/sevya/msd.cc b/source/src/apps/pilot/sevya/msd.cc index b986c5124d..cae2449ce4 100644 --- a/source/src/apps/pilot/sevya/msd.cc +++ b/source/src/apps/pilot/sevya/msd.cc @@ -627,7 +627,7 @@ main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { utility_exit_with_message("caught exception " + e.msg()); } } diff --git a/source/src/apps/pilot/sevya/msd_jd2.cc b/source/src/apps/pilot/sevya/msd_jd2.cc index ec4e59b7fb..ad677afb8f 100644 --- a/source/src/apps/pilot/sevya/msd_jd2.cc +++ b/source/src/apps/pilot/sevya/msd_jd2.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include //option key includes #include #include @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) protocols::moves::MoverOP mover; protocols::jd2::JobDistributor::get_instance()->go( mover ); return 1; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { utility_exit_with_message("caught exception " + e.msg()); } } diff --git a/source/src/apps/pilot/shilei/bb_cluster.cc b/source/src/apps/pilot/shilei/bb_cluster.cc index 74acf44106..ec3d7eab52 100644 --- a/source/src/apps/pilot/shilei/bb_cluster.cc +++ b/source/src/apps/pilot/shilei/bb_cluster.cc @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) TR.Info << "done bb_cluster" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/cluster_hotspot_docking.cc b/source/src/apps/pilot/shilei/cluster_hotspot_docking.cc index cb3d64119d..465abb1c10 100644 --- a/source/src/apps/pilot/shilei/cluster_hotspot_docking.cc +++ b/source/src/apps/pilot/shilei/cluster_hotspot_docking.cc @@ -328,7 +328,7 @@ int main(int argc, char *argv[]) TR.Info << "done cluster_hotspot_docking" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/complex_interface_optimize.cc b/source/src/apps/pilot/shilei/complex_interface_optimize.cc index d7df73022e..2dff78f684 100644 --- a/source/src/apps/pilot/shilei/complex_interface_optimize.cc +++ b/source/src/apps/pilot/shilei/complex_interface_optimize.cc @@ -180,7 +180,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } diff --git a/source/src/apps/pilot/shilei/compute_Irmsd.cc b/source/src/apps/pilot/shilei/compute_Irmsd.cc index 6336ecbb30..302965c680 100644 --- a/source/src/apps/pilot/shilei/compute_Irmsd.cc +++ b/source/src/apps/pilot/shilei/compute_Irmsd.cc @@ -114,7 +114,7 @@ class compute_Irmsd : public protocols::moves::Mover { core::import_pose::pose_from_file( *native_pose, basic::options::option[ basic::options::OptionKeys::in::file::native ]() , core::import_pose::PDB_file); set_native_pose( native_pose ); } else { - throw( utility::excn::EXCN_BadInput("native expected for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "native expected for this app") ); set_native_pose(NULL); } @@ -207,7 +207,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -225,7 +225,7 @@ main( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/docking_inputpatchdock_mpi.cc b/source/src/apps/pilot/shilei/docking_inputpatchdock_mpi.cc index 9dc6125de4..820351aa16 100644 --- a/source/src/apps/pilot/shilei/docking_inputpatchdock_mpi.cc +++ b/source/src/apps/pilot/shilei/docking_inputpatchdock_mpi.cc @@ -325,14 +325,14 @@ void run_parallel_docking() { core::import_pose::pose_from_file( pose, pdbname.c_str() , core::import_pose::PDB_file); original_pose=pose; } else { - throw( utility::excn::EXCN_BadInput("expected -s for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected -s for this app") ); } //read in the native pose if ( basic::options::option[ basic::options::OptionKeys::in::file::native ].user() ) { core::import_pose::pose_from_file( native_pose, basic::options::option[ basic::options::OptionKeys::in::file::native ]() , core::import_pose::PDB_file); } else { - throw( utility::excn::EXCN_BadInput("native expected for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "native expected for this app") ); } core::Size total_atoms(0); @@ -349,7 +349,7 @@ void run_parallel_docking() { //check if patchdock_file exist if ( !basic::options::option[basic::options::OptionKeys::docking_parallel::patchdock_file_prefix].user() ) { - throw( utility::excn::EXCN_BadInput("patchdock should be given for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "patchdock should be given for this app") ); } std::string filename=basic::options::option[basic::options::OptionKeys::docking_parallel::patchdock_file_prefix]+utility::to_string(my_rank%10); read_patchdock_entry(saved_transformations_,filename); diff --git a/source/src/apps/pilot/shilei/docking_parallel.cc b/source/src/apps/pilot/shilei/docking_parallel.cc index 7ea05caed7..4868215690 100644 --- a/source/src/apps/pilot/shilei/docking_parallel.cc +++ b/source/src/apps/pilot/shilei/docking_parallel.cc @@ -236,7 +236,7 @@ void run_parallel_docking() { if ( basic::options::option[ basic::options::OptionKeys::in::file::native ].user() ) { core::import_pose::pose_from_file( native_pose, basic::options::option[ basic::options::OptionKeys::in::file::native ]() , core::import_pose::PDB_file); } else { - throw( utility::excn::EXCN_BadInput("native expected for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "native expected for this app") ); } diff --git a/source/src/apps/pilot/shilei/generate_hbond_geometry.cc b/source/src/apps/pilot/shilei/generate_hbond_geometry.cc index 6f697b9c6d..89887411c4 100644 --- a/source/src/apps/pilot/shilei/generate_hbond_geometry.cc +++ b/source/src/apps/pilot/shilei/generate_hbond_geometry.cc @@ -350,7 +350,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } diff --git a/source/src/apps/pilot/shilei/lowresdock_patchdock_hotspot_cst.cc b/source/src/apps/pilot/shilei/lowresdock_patchdock_hotspot_cst.cc index ae3b5ffdda..5b59808c89 100644 --- a/source/src/apps/pilot/shilei/lowresdock_patchdock_hotspot_cst.cc +++ b/source/src/apps/pilot/shilei/lowresdock_patchdock_hotspot_cst.cc @@ -123,7 +123,7 @@ class run_score_patchdock_hotspot : public protocols::moves::Mover { core::import_pose::pose_from_file( pose, pdbname.c_str() , core::import_pose::PDB_file); original_pose=pose; } else { - throw( utility::excn::EXCN_BadInput("expected -s for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected -s for this app") ); } //output patchdock @@ -260,12 +260,12 @@ void* my_main( void* ) { basic::options::option[ basic::options::OptionKeys::lowresdock_patchdock_hotspot_cst::hotspot_names ].size()==basic::options::option[ basic::options::OptionKeys::lowresdock_patchdock_hotspot_cst::hotspot_distcb_weight].size() ) { // TR << "Will read: " << basic::options::option[ basic::options::OptionKeys::lowresdock_patchdock_hotspot_cst::hotspot_names ].size() << " hotspot files" << std::endl; } else { - throw( utility::excn::EXCN_BadInput("expected hostspot_filename and hotspot_distcb_weight this app and their size should be equal") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected hostspot_filename and hotspot_distcb_weight this app and their size should be equal") ); } try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -295,7 +295,7 @@ int main( int argc, char * argv [] ) // score_patchdock_hotspot(); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/match_disulfide_to_scaffold.cc b/source/src/apps/pilot/shilei/match_disulfide_to_scaffold.cc index e98beda985..7e76c7e586 100644 --- a/source/src/apps/pilot/shilei/match_disulfide_to_scaffold.cc +++ b/source/src/apps/pilot/shilei/match_disulfide_to_scaffold.cc @@ -236,7 +236,7 @@ int main(int argc, char *argv[]) { } */ - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/read_pose_jump_orientation_repack.cc b/source/src/apps/pilot/shilei/read_pose_jump_orientation_repack.cc index df84b52ad9..fa387a8936 100644 --- a/source/src/apps/pilot/shilei/read_pose_jump_orientation_repack.cc +++ b/source/src/apps/pilot/shilei/read_pose_jump_orientation_repack.cc @@ -144,7 +144,7 @@ void run() { core::import_pose::pose_from_file( pose, pdbname.c_str() , core::import_pose::PDB_file); ref_pose=pose; } else { - throw( utility::excn::EXCN_BadInput("expected -s for this app") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected -s for this app") ); } if ( basic::options::option[ basic::options::OptionKeys::in::file::native ].user() ) { @@ -154,7 +154,7 @@ void run() { utility::vector1< core::Real > saved_transformations_; if ( !basic::options::option[ basic::options::OptionKeys::read_pose_jump_orientation_repack::jump_orientation].user() || basic::options::option[ basic::options::OptionKeys::read_pose_jump_orientation_repack::jump_orientation].size()!=12 ) { - throw( utility::excn::EXCN_BadInput("expected jump_orientation be provided as a vector of 12") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected jump_orientation be provided as a vector of 12") ); } else { for ( core::Size i=1; i <= 12; i++ ) { saved_transformations_.push_back(basic::options::option[ basic::options::OptionKeys::read_pose_jump_orientation_repack::jump_orientation][i]); @@ -297,7 +297,7 @@ int main( int argc, char * argv [] ) { run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/score_hotspot_cst.cc b/source/src/apps/pilot/shilei/score_hotspot_cst.cc index 858c1d3c69..f988d125da 100644 --- a/source/src/apps/pilot/shilei/score_hotspot_cst.cc +++ b/source/src/apps/pilot/shilei/score_hotspot_cst.cc @@ -194,12 +194,12 @@ void* my_main( void* ) { basic::options::option[ basic::options::OptionKeys::score_hotspot_cst::hotspot_names ].size()==basic::options::option[ basic::options::OptionKeys::score_hotspot_cst::hotspot_distcb_weight].size() ) { // TR << "Will read: " << basic::options::option[ basic::options::OptionKeys::score_hotspot_cst::hotspot_names ].size() << " hotspot files" << std::endl; } else { - throw( utility::excn::EXCN_BadInput("expected hostspot_filename and hotspot_distcb_weight this app and their size should be equal") ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "expected hostspot_filename and hotspot_distcb_weight this app and their size should be equal") ); } try{ protocols::jd2::JobDistributor::get_instance()->go( seq ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -225,7 +225,7 @@ int main( int argc, char * argv [] ) // score_hotspot(); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shilei/tmalign_cluster.cc b/source/src/apps/pilot/shilei/tmalign_cluster.cc index ff16058b76..dcc0af130b 100644 --- a/source/src/apps/pilot/shilei/tmalign_cluster.cc +++ b/source/src/apps/pilot/shilei/tmalign_cluster.cc @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) TR.Info << "done tmalign_cluster" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/shirst/LoophashFilter.cc b/source/src/apps/pilot/shirst/LoophashFilter.cc index ad3dffdfed..2a00d1e965 100644 --- a/source/src/apps/pilot/shirst/LoophashFilter.cc +++ b/source/src/apps/pilot/shirst/LoophashFilter.cc @@ -15,7 +15,7 @@ #include #include #include -#include +#include //Scoring #include #include @@ -157,7 +157,7 @@ int main(int argc, char* argv[]) tr.Info << "radius_size: " << radius_size << "\tloop_size: " << loop_size << "\tnumber of hits: " << hashmap.radial_count(radius_size,loop_transform) << std::endl; } } - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/shirst/TestTopologySampler.cc b/source/src/apps/pilot/shirst/TestTopologySampler.cc index 4506e295a7..b2dbb57f63 100644 --- a/source/src/apps/pilot/shirst/TestTopologySampler.cc +++ b/source/src/apps/pilot/shirst/TestTopologySampler.cc @@ -35,7 +35,7 @@ print the PDB #include #include #include -#include +#include //Options #include @@ -286,7 +286,7 @@ int main(int argc, char* argv[]) pose.dump_pdb(output_final); tr << "Finished TMH sampling. Outputting " << output_final << std::endl; - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/smlewis/ChemXRW/PDB_diagnostic.cc b/source/src/apps/pilot/smlewis/ChemXRW/PDB_diagnostic.cc index 54c046b0b3..1e673c9c03 100644 --- a/source/src/apps/pilot/smlewis/ChemXRW/PDB_diagnostic.cc +++ b/source/src/apps/pilot/smlewis/ChemXRW/PDB_diagnostic.cc @@ -321,7 +321,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go(test_mover); } //if score_only - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/Extender.cc b/source/src/apps/pilot/smlewis/Extender.cc index 3eb79d605c..073e744aaa 100644 --- a/source/src/apps/pilot/smlewis/Extender.cc +++ b/source/src/apps/pilot/smlewis/Extender.cc @@ -147,7 +147,7 @@ int main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/FloppyTail_loop.cc b/source/src/apps/pilot/smlewis/FloppyTail_loop.cc index d46d780dab..03fd817441 100644 --- a/source/src/apps/pilot/smlewis/FloppyTail_loop.cc +++ b/source/src/apps/pilot/smlewis/FloppyTail_loop.cc @@ -731,7 +731,7 @@ int main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/ForgetPDBInfo.cc b/source/src/apps/pilot/smlewis/ForgetPDBInfo.cc index ca5cd4a552..b460305947 100644 --- a/source/src/apps/pilot/smlewis/ForgetPDBInfo.cc +++ b/source/src/apps/pilot/smlewis/ForgetPDBInfo.cc @@ -57,7 +57,7 @@ main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/LoopAnalyzer.cc b/source/src/apps/pilot/smlewis/LoopAnalyzer.cc index 97fde302e2..a6ec1ec6e0 100644 --- a/source/src/apps/pilot/smlewis/LoopAnalyzer.cc +++ b/source/src/apps/pilot/smlewis/LoopAnalyzer.cc @@ -69,7 +69,7 @@ main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/UBQ_UBQ_E2.cc b/source/src/apps/pilot/smlewis/UBQ_UBQ_E2.cc index fba24affad..2de29e18be 100644 --- a/source/src/apps/pilot/smlewis/UBQ_UBQ_E2.cc +++ b/source/src/apps/pilot/smlewis/UBQ_UBQ_E2.cc @@ -705,7 +705,7 @@ int main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/smlewis/sasa_qd.cc b/source/src/apps/pilot/smlewis/sasa_qd.cc index 5b9e2731e7..ba7ee478bd 100644 --- a/source/src/apps/pilot/smlewis/sasa_qd.cc +++ b/source/src/apps/pilot/smlewis/sasa_qd.cc @@ -103,7 +103,7 @@ main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sraman/RBSegMove_test.cc b/source/src/apps/pilot/sraman/RBSegMove_test.cc index 0effbdf64a..e553701450 100644 --- a/source/src/apps/pilot/sraman/RBSegMove_test.cc +++ b/source/src/apps/pilot/sraman/RBSegMove_test.cc @@ -154,7 +154,7 @@ main( int argc, char * argv [] ) std::string outfile = option[ out::file::o ](); core::io::pdb::dump_pdb( pose , outfile ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sraman/RBSegMove_test_viewer.cc b/source/src/apps/pilot/sraman/RBSegMove_test_viewer.cc index 71d3eeacf8..7da8bad0ee 100644 --- a/source/src/apps/pilot/sraman/RBSegMove_test_viewer.cc +++ b/source/src/apps/pilot/sraman/RBSegMove_test_viewer.cc @@ -173,7 +173,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sraman/RDC_test.cc b/source/src/apps/pilot/sraman/RDC_test.cc index 16e4a741e7..64ece939b5 100644 --- a/source/src/apps/pilot/sraman/RDC_test.cc +++ b/source/src/apps/pilot/sraman/RDC_test.cc @@ -101,7 +101,7 @@ main( int argc, char * argv [] ) //v devel::residual_dipolar_coupling::eval_dipolar( extended_pose, All_RDC_lines ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sthyme/dna_motifs_collector.cc b/source/src/apps/pilot/sthyme/dna_motifs_collector.cc index dcb99f8e35..01bacb3b35 100644 --- a/source/src/apps/pilot/sthyme/dna_motifs_collector.cc +++ b/source/src/apps/pilot/sthyme/dna_motifs_collector.cc @@ -402,7 +402,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); process_file_list(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sthyme/ligand_motifs.cc b/source/src/apps/pilot/sthyme/ligand_motifs.cc index 398e90fca2..9840c6d74e 100644 --- a/source/src/apps/pilot/sthyme/ligand_motifs.cc +++ b/source/src/apps/pilot/sthyme/ligand_motifs.cc @@ -454,7 +454,7 @@ main( int argc, char * argv [] ) process_file_list(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sthyme/motif_dna_packer_design.cc b/source/src/apps/pilot/sthyme/motif_dna_packer_design.cc index ea4dd453c1..2bb3cdf40d 100644 --- a/source/src/apps/pilot/sthyme/motif_dna_packer_design.cc +++ b/source/src/apps/pilot/sthyme/motif_dna_packer_design.cc @@ -97,7 +97,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); motif_dna_packer_design(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/sthyme/pdb2motiffile.cc b/source/src/apps/pilot/sthyme/pdb2motiffile.cc index 88a833eb0a..d73732f863 100644 --- a/source/src/apps/pilot/sthyme/pdb2motiffile.cc +++ b/source/src/apps/pilot/sthyme/pdb2motiffile.cc @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) motif_output_file << *motifcop; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/InterfaceMutMaker.cc b/source/src/apps/pilot/stranges/InterfaceMutMaker.cc index 06cfa2e92f..ad3bdee0a4 100644 --- a/source/src/apps/pilot/stranges/InterfaceMutMaker.cc +++ b/source/src/apps/pilot/stranges/InterfaceMutMaker.cc @@ -699,7 +699,7 @@ main( int argc, char* argv[] ) { std::cout << "Complete..." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/buried_polar_finder.cc b/source/src/apps/pilot/stranges/buried_polar_finder.cc index dd840e3dbc..cdc3388db0 100644 --- a/source/src/apps/pilot/stranges/buried_polar_finder.cc +++ b/source/src/apps/pilot/stranges/buried_polar_finder.cc @@ -424,7 +424,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------"<< std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/min_pack_min.cc b/source/src/apps/pilot/stranges/min_pack_min.cc index e71ef7a60f..950aa3eac5 100644 --- a/source/src/apps/pilot/stranges/min_pack_min.cc +++ b/source/src/apps/pilot/stranges/min_pack_min.cc @@ -327,7 +327,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/peptide_minimizer.cc b/source/src/apps/pilot/stranges/peptide_minimizer.cc index fd7f7bce0b..ca4fdfe7cc 100644 --- a/source/src/apps/pilot/stranges/peptide_minimizer.cc +++ b/source/src/apps/pilot/stranges/peptide_minimizer.cc @@ -313,7 +313,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/simple_interfaceanalyzer.cc b/source/src/apps/pilot/stranges/simple_interfaceanalyzer.cc index 1322df9ad2..93c7f5a925 100644 --- a/source/src/apps/pilot/stranges/simple_interfaceanalyzer.cc +++ b/source/src/apps/pilot/stranges/simple_interfaceanalyzer.cc @@ -315,7 +315,7 @@ main( int argc, char* argv[] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/sym_fixbb.cc b/source/src/apps/pilot/stranges/sym_fixbb.cc index d77d25192c..3bfd16a71c 100644 --- a/source/src/apps/pilot/stranges/sym_fixbb.cc +++ b/source/src/apps/pilot/stranges/sym_fixbb.cc @@ -183,7 +183,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------"<< std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/stranges/xml_task_printer.cc b/source/src/apps/pilot/stranges/xml_task_printer.cc index 35f79dfbad..cd511bb73f 100644 --- a/source/src/apps/pilot/stranges/xml_task_printer.cc +++ b/source/src/apps/pilot/stranges/xml_task_printer.cc @@ -241,7 +241,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( new XMLprinterMover ); std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/thermo/metropolis_hastings.cc b/source/src/apps/pilot/thermo/metropolis_hastings.cc index 78c4963a59..43f339dc8c 100644 --- a/source/src/apps/pilot/thermo/metropolis_hastings.cc +++ b/source/src/apps/pilot/thermo/metropolis_hastings.cc @@ -69,7 +69,7 @@ try { metropolis_hastings_mover->add_sidechain_mover(option[ mh::sc_weight ], option[ mh::sc_prob_uniform ], option[ mh::sc_prob_withinrot ], preserve_cbeta); metropolis_hastings_mover->add_sidechain_mc_mover(option[ mh::sc_mc_weight ], option[ mh::sc_prob_uniform ], option[ mh::sc_prob_withinrot ], preserve_cbeta, option[ mh::sc_mc_ntrials ]); protocols::jd2::JobDistributor::get_instance()->go(metropolis_hastings_mover); -} catch ( utility::excn::EXCN_Base const & e ) { +} catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } return -1; } diff --git a/source/src/apps/pilot/tjacobs/BundlePairRmsdCalculator.cc b/source/src/apps/pilot/tjacobs/BundlePairRmsdCalculator.cc index 84f21414a4..6e4c48adde 100644 --- a/source/src/apps/pilot/tjacobs/BundlePairRmsdCalculator.cc +++ b/source/src/apps/pilot/tjacobs/BundlePairRmsdCalculator.cc @@ -400,7 +400,7 @@ main( int argc, char * argv [] ) db_session->commit(); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/FoldTreeOutputter.cc b/source/src/apps/pilot/tjacobs/FoldTreeOutputter.cc index 15e8868933..c4f233d882 100644 --- a/source/src/apps/pilot/tjacobs/FoldTreeOutputter.cc +++ b/source/src/apps/pilot/tjacobs/FoldTreeOutputter.cc @@ -35,7 +35,7 @@ #include #include -#include +#include //C++ headers #include @@ -127,7 +127,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/HelicalAssembly.cc b/source/src/apps/pilot/tjacobs/HelicalAssembly.cc index c20db2ae1d..edbc477cf7 100644 --- a/source/src/apps/pilot/tjacobs/HelicalAssembly.cc +++ b/source/src/apps/pilot/tjacobs/HelicalAssembly.cc @@ -185,7 +185,7 @@ main( int argc, char * argv [] ) } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/HelicalPdbGenerator.cc b/source/src/apps/pilot/tjacobs/HelicalPdbGenerator.cc index 4cc3e8bd5d..91b26a1d8d 100644 --- a/source/src/apps/pilot/tjacobs/HelicalPdbGenerator.cc +++ b/source/src/apps/pilot/tjacobs/HelicalPdbGenerator.cc @@ -113,7 +113,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/HelixAssemblyDesigner.cc b/source/src/apps/pilot/tjacobs/HelixAssemblyDesigner.cc index 110a2c30d6..8783a5a5f7 100644 --- a/source/src/apps/pilot/tjacobs/HelixAssemblyDesigner.cc +++ b/source/src/apps/pilot/tjacobs/HelixAssemblyDesigner.cc @@ -185,7 +185,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go(seq_mover); cout << "-------------DONE-------------" << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/InterfaceStrandFinderMover.cc b/source/src/apps/pilot/tjacobs/InterfaceStrandFinderMover.cc index 44d5c11460..4d5570d75f 100644 --- a/source/src/apps/pilot/tjacobs/InterfaceStrandFinderMover.cc +++ b/source/src/apps/pilot/tjacobs/InterfaceStrandFinderMover.cc @@ -58,7 +58,7 @@ //utility & numeric #include #include -#include +#include #include #include #include @@ -552,7 +552,7 @@ main( int argc, char * argv [] ) std::cout << "Done! -------------------------------\n"; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/ModelTrimmer.cc b/source/src/apps/pilot/tjacobs/ModelTrimmer.cc index f0ceda76c5..8c79f9742f 100644 --- a/source/src/apps/pilot/tjacobs/ModelTrimmer.cc +++ b/source/src/apps/pilot/tjacobs/ModelTrimmer.cc @@ -374,7 +374,7 @@ main( int argc, char * argv [] ) { }//while(it != it_end) { write_model_file(comments.str(), models, new_model_filename); } //try -catch ( utility::excn::EXCN_Base& excn ) { +catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/tjacobs/ThreeHelixBundleFinder.cc b/source/src/apps/pilot/tjacobs/ThreeHelixBundleFinder.cc index aeb34179cc..bf5a463d70 100644 --- a/source/src/apps/pilot/tjacobs/ThreeHelixBundleFinder.cc +++ b/source/src/apps/pilot/tjacobs/ThreeHelixBundleFinder.cc @@ -24,7 +24,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::jd2::JobDistributor::get_instance()->go( new ThreeHelixBundleFinderMover() ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/loophash_createfiltereddb.cc b/source/src/apps/pilot/tjacobs/loophash_createfiltereddb.cc index d0857286c8..d33694ef8f 100644 --- a/source/src/apps/pilot/tjacobs/loophash_createfiltereddb.cc +++ b/source/src/apps/pilot/tjacobs/loophash_createfiltereddb.cc @@ -100,7 +100,7 @@ main( int argc, char * argv [] ) { loop_hash_library->save_db(); } - catch ( utility::excn::EXCN_Base& excn ) + catch (utility::excn::Exception& excn ) { excn.show( TR ); TR << "Exception occured!" << std::endl; @@ -149,7 +149,7 @@ main( int argc, char * argv [] ) } // Future: Extra step that strips out backbone sequences that aren't used // Would be a pain because all the indexes would be shifted - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( TR ); MPI_Abort( MPI_COMM_WORLD, 1 ); } @@ -163,7 +163,7 @@ main( int argc, char * argv [] ) loop_hash_library->sort(); try { loop_hash_library->save_db(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( TR ); MPI_Abort( MPI_COMM_WORLD, 1 ); } @@ -181,7 +181,7 @@ main( int argc, char * argv [] ) TR << "Total time: " << (endtime - starttime) / 60 << " min" << std::endl; } #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tjacobs/mpi_helixAssembly.cc b/source/src/apps/pilot/tjacobs/mpi_helixAssembly.cc index c2fe5cd976..bd802fc4b3 100644 --- a/source/src/apps/pilot/tjacobs/mpi_helixAssembly.cc +++ b/source/src/apps/pilot/tjacobs/mpi_helixAssembly.cc @@ -366,7 +366,7 @@ main( int argc, char * argv [] ) #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/tseng/tseng_minimize.cc b/source/src/apps/pilot/tseng/tseng_minimize.cc index 6e32cd69c6..a8381823da 100644 --- a/source/src/apps/pilot/tseng/tseng_minimize.cc +++ b/source/src/apps/pilot/tseng/tseng_minimize.cc @@ -319,7 +319,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/vmullig/bettercluster.cc b/source/src/apps/pilot/vmullig/bettercluster.cc index 85626e59f6..27cd66d0bb 100644 --- a/source/src/apps/pilot/vmullig/bettercluster.cc +++ b/source/src/apps/pilot/vmullig/bettercluster.cc @@ -1923,7 +1923,7 @@ int main( int argc, char * argv [] ) { }*/ printf("\n*****JOB COMPLETED*****\n"); fflush(stdout); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/cycpep_analysis.cc b/source/src/apps/pilot/vmullig/cycpep_analysis.cc index 50b52ac433..a6094a1c95 100644 --- a/source/src/apps/pilot/vmullig/cycpep_analysis.cc +++ b/source/src/apps/pilot/vmullig/cycpep_analysis.cc @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -163,7 +163,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); TR << "Starting cycpep_analysis.cc.\nPilot app created by Vikram K. Mulligan (vmullig@uw.edu), Baker laboratory, on 13 October 2016." << std::endl; do_cycpep_analysis(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR.Error << "Exception caught: " << std::endl; excn.show( TR.Error ); TR.Error.flush(); diff --git a/source/src/apps/pilot/vmullig/fit_helixparams.cc b/source/src/apps/pilot/vmullig/fit_helixparams.cc index 3d8df0cefe..361e4619ba 100644 --- a/source/src/apps/pilot/vmullig/fit_helixparams.cc +++ b/source/src/apps/pilot/vmullig/fit_helixparams.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -514,7 +514,7 @@ main( int argc, char * argv [] ) TR.flush(); } - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/symmetrize_new_ramamap.cc b/source/src/apps/pilot/vmullig/symmetrize_new_ramamap.cc index 8c92893e2d..eead5b8a79 100644 --- a/source/src/apps/pilot/vmullig/symmetrize_new_ramamap.cc +++ b/source/src/apps/pilot/vmullig/symmetrize_new_ramamap.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -168,7 +168,7 @@ main( int argc, char * argv [] ) get_options(input_filename, output_filename); symmetrize_map(input_filename, output_filename); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/symmetrize_old_ramamap.cc b/source/src/apps/pilot/vmullig/symmetrize_old_ramamap.cc index 282d7b01da..7877b6ac5d 100644 --- a/source/src/apps/pilot/vmullig/symmetrize_old_ramamap.cc +++ b/source/src/apps/pilot/vmullig/symmetrize_old_ramamap.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -152,7 +152,7 @@ main( int argc, char * argv [] ) get_options(input_filename, output_filename); symmetrize_map(input_filename, output_filename); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/test_makebundle_mover.cc b/source/src/apps/pilot/vmullig/test_makebundle_mover.cc index d52d2118c3..cae3b7b278 100644 --- a/source/src/apps/pilot/vmullig/test_makebundle_mover.cc +++ b/source/src/apps/pilot/vmullig/test_makebundle_mover.cc @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -263,7 +263,7 @@ main( int argc, char * argv [] ) TR.flush(); } - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/test_makebundlehelix_mover.cc b/source/src/apps/pilot/vmullig/test_makebundlehelix_mover.cc index d844a752e6..f1ba85303c 100644 --- a/source/src/apps/pilot/vmullig/test_makebundlehelix_mover.cc +++ b/source/src/apps/pilot/vmullig/test_makebundlehelix_mover.cc @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -140,7 +140,7 @@ main( int argc, char * argv [] ) TR.flush(); } - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/pilot/vmullig/test_multithreaded_pdb_load.cc b/source/src/apps/pilot/vmullig/test_multithreaded_pdb_load.cc index b50dd69842..f9850767e4 100644 --- a/source/src/apps/pilot/vmullig/test_multithreaded_pdb_load.cc +++ b/source/src/apps/pilot/vmullig/test_multithreaded_pdb_load.cc @@ -109,7 +109,7 @@ main( int argc, char * argv [] ) TR << "Execution completed." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/vmullig/test_multithreaded_ramapp_load.cc b/source/src/apps/pilot/vmullig/test_multithreaded_ramapp_load.cc index caadd822ec..d59e70fda7 100644 --- a/source/src/apps/pilot/vmullig/test_multithreaded_ramapp_load.cc +++ b/source/src/apps/pilot/vmullig/test_multithreaded_ramapp_load.cc @@ -185,7 +185,7 @@ main( int argc, char * argv [] ) TR << "Execution completed." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/weitzner/graphics_demo.cc b/source/src/apps/pilot/weitzner/graphics_demo.cc index d8fd586ce1..301a53c53c 100644 --- a/source/src/apps/pilot/weitzner/graphics_demo.cc +++ b/source/src/apps/pilot/weitzner/graphics_demo.cc @@ -120,7 +120,7 @@ main( int argc, char * argv [] ) { protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/weitzner/long_loop.cc b/source/src/apps/pilot/weitzner/long_loop.cc index a2a562e7f9..97b97f16a3 100644 --- a/source/src/apps/pilot/weitzner/long_loop.cc +++ b/source/src/apps/pilot/weitzner/long_loop.cc @@ -90,7 +90,7 @@ main( int argc, char * argv [] ) { pose->dump_pdb("src/apps/pilot/weitzner/1bzq_closed.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/calc_stress_tensor.cc b/source/src/apps/pilot/wendao/calc_stress_tensor.cc index c323ec5d6c..4e194a49a2 100644 --- a/source/src/apps/pilot/wendao/calc_stress_tensor.cc +++ b/source/src/apps/pilot/wendao/calc_stress_tensor.cc @@ -284,7 +284,7 @@ my_main( void *) { protocols::jd2::JobDistributor::get_instance()->go( seq ); } - catch ( utility::excn::EXCN_Base &excn ) + catch (utility::excn::Exception &excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); @@ -306,7 +306,7 @@ main( int argc, char *argv [] ) stat_output(); } - catch ( utility::excn::EXCN_Base const &e ) + catch (utility::excn::Exception const &e ) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/wendao/cenrot_jd2.cc b/source/src/apps/pilot/wendao/cenrot_jd2.cc index 0023b28764..3093b8e4cf 100644 --- a/source/src/apps/pilot/wendao/cenrot_jd2.cc +++ b/source/src/apps/pilot/wendao/cenrot_jd2.cc @@ -230,7 +230,7 @@ int main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); } -catch ( utility::excn::EXCN_Base const & e) { +catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/cyclic_sampler.cc b/source/src/apps/pilot/wendao/cyclic_sampler.cc index 9c677c9297..f9f81b67d3 100644 --- a/source/src/apps/pilot/wendao/cyclic_sampler.cc +++ b/source/src/apps/pilot/wendao/cyclic_sampler.cc @@ -117,7 +117,7 @@ int main( int argc, char *argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); } - catch ( utility::excn::EXCN_Base const &e) { + catch (utility::excn::Exception const &e) { std::cout << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/wendao/decoys_frag_quality.cc b/source/src/apps/pilot/wendao/decoys_frag_quality.cc index 208af60155..d181c21c65 100644 --- a/source/src/apps/pilot/wendao/decoys_frag_quality.cc +++ b/source/src/apps/pilot/wendao/decoys_frag_quality.cc @@ -83,7 +83,7 @@ int main( int argc, char** argv ) { outfn.close(); } } - catch ( utility::excn::EXCN_Base const & e ) { + catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/gen_cav_ball.cc b/source/src/apps/pilot/wendao/gen_cav_ball.cc index b221bf6913..a1190f6f5b 100644 --- a/source/src/apps/pilot/wendao/gen_cav_ball.cc +++ b/source/src/apps/pilot/wendao/gen_cav_ball.cc @@ -499,7 +499,7 @@ int main( int argc, char * argv [] ) */ return EXIT_SUCCESS; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/pairwise_fa_energy.cc b/source/src/apps/pilot/wendao/pairwise_fa_energy.cc index 531a0955c1..349d12baee 100644 --- a/source/src/apps/pilot/wendao/pairwise_fa_energy.cc +++ b/source/src/apps/pilot/wendao/pairwise_fa_energy.cc @@ -158,7 +158,7 @@ my_main( void *) { protocols::jd2::JobDistributor::get_instance()->go( seq ); } - catch ( utility::excn::EXCN_Base &excn ) + catch (utility::excn::Exception &excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); @@ -178,7 +178,7 @@ main( int argc, char *argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); } - catch ( utility::excn::EXCN_Base const &e ) + catch (utility::excn::Exception const &e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; diff --git a/source/src/apps/pilot/wendao/test_bbmc.cc b/source/src/apps/pilot/wendao/test_bbmc.cc index 7bd237324f..48a8b1b137 100644 --- a/source/src/apps/pilot/wendao/test_bbmc.cc +++ b/source/src/apps/pilot/wendao/test_bbmc.cc @@ -497,7 +497,7 @@ int main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/test_cluster.cc b/source/src/apps/pilot/wendao/test_cluster.cc index 9225800224..843d784ae3 100644 --- a/source/src/apps/pilot/wendao/test_cluster.cc +++ b/source/src/apps/pilot/wendao/test_cluster.cc @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) show_cluster_assignment( elem, dat); std::cout << "done with clustering! you can now use your clusters!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wendao/test_hpool.cc b/source/src/apps/pilot/wendao/test_hpool.cc index 53d513586d..e00a54724b 100644 --- a/source/src/apps/pilot/wendao/test_hpool.cc +++ b/source/src/apps/pilot/wendao/test_hpool.cc @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_identify_epitope.cc b/source/src/apps/pilot/whitney/whitney_identify_epitope.cc index 7bfed7bf64..93aceb80d7 100644 --- a/source/src/apps/pilot/whitney/whitney_identify_epitope.cc +++ b/source/src/apps/pilot/whitney/whitney_identify_epitope.cc @@ -258,7 +258,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_local_backrub.cc b/source/src/apps/pilot/whitney/whitney_local_backrub.cc index e82d6c6d16..d6e7fbcd9e 100644 --- a/source/src/apps/pilot/whitney/whitney_local_backrub.cc +++ b/source/src/apps/pilot/whitney/whitney_local_backrub.cc @@ -319,7 +319,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_prepare_native.cc b/source/src/apps/pilot/whitney/whitney_prepare_native.cc index 4396b4fab8..a58fb74925 100644 --- a/source/src/apps/pilot/whitney/whitney_prepare_native.cc +++ b/source/src/apps/pilot/whitney/whitney_prepare_native.cc @@ -216,7 +216,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_rebuild_ankyrin.cc b/source/src/apps/pilot/whitney/whitney_rebuild_ankyrin.cc index 374cd3dcd5..367674c54b 100644 --- a/source/src/apps/pilot/whitney/whitney_rebuild_ankyrin.cc +++ b/source/src/apps/pilot/whitney/whitney_rebuild_ankyrin.cc @@ -91,7 +91,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_repack_input.cc b/source/src/apps/pilot/whitney/whitney_repack_input.cc index 26a66af19a..e35870ac2c 100644 --- a/source/src/apps/pilot/whitney/whitney_repack_input.cc +++ b/source/src/apps/pilot/whitney/whitney_repack_input.cc @@ -140,7 +140,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/whitney/whitney_specificity_switch.cc b/source/src/apps/pilot/whitney/whitney_specificity_switch.cc index 992a4eb2ca..8a00732e3a 100644 --- a/source/src/apps/pilot/whitney/whitney_specificity_switch.cc +++ b/source/src/apps/pilot/whitney/whitney_specificity_switch.cc @@ -280,7 +280,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/holes.cc b/source/src/apps/pilot/will/holes.cc index 642c4ad088..3bb88ed235 100644 --- a/source/src/apps/pilot/will/holes.cc +++ b/source/src/apps/pilot/will/holes.cc @@ -210,7 +210,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/holes_daball_input.cc b/source/src/apps/pilot/will/holes_daball_input.cc index 62c4bdc4a1..56f5ad66fc 100644 --- a/source/src/apps/pilot/will/holes_daball_input.cc +++ b/source/src/apps/pilot/will/holes_daball_input.cc @@ -123,7 +123,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/CXdock.cc b/source/src/apps/pilot/will/old/CXdock.cc index 663998a536..8f414af99d 100644 --- a/source/src/apps/pilot/will/old/CXdock.cc +++ b/source/src/apps/pilot/will/old/CXdock.cc @@ -791,7 +791,7 @@ int main(int argc, char *argv[]) { dock(pnat,fn,ssamp,olig,nfold,native_ca); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/CXdock_TMP.cc b/source/src/apps/pilot/will/old/CXdock_TMP.cc index 19afb6b907..6f29c9a8b7 100644 --- a/source/src/apps/pilot/will/old/CXdock_TMP.cc +++ b/source/src/apps/pilot/will/old/CXdock_TMP.cc @@ -340,7 +340,7 @@ int main(int argc, char *argv[]) { dock(pala,fn,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/FunGroupTK.cc b/source/src/apps/pilot/will/old/FunGroupTK.cc index 693d5cfef5..6e0a9d86aa 100644 --- a/source/src/apps/pilot/will/old/FunGroupTK.cc +++ b/source/src/apps/pilot/will/old/FunGroupTK.cc @@ -516,7 +516,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/FunGroupTK_test.cc b/source/src/apps/pilot/will/old/FunGroupTK_test.cc index 0e5f8151c0..7e295eaa7f 100644 --- a/source/src/apps/pilot/will/old/FunGroupTK_test.cc +++ b/source/src/apps/pilot/will/old/FunGroupTK_test.cc @@ -330,7 +330,7 @@ int main (int argc, char *argv[]) { run_hd(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/IKFGDB.cc b/source/src/apps/pilot/will/old/IKFGDB.cc index 1ccef3b3a4..eddb86248e 100644 --- a/source/src/apps/pilot/will/old/IKFGDB.cc +++ b/source/src/apps/pilot/will/old/IKFGDB.cc @@ -330,7 +330,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/atom_design.cc b/source/src/apps/pilot/will/old/atom_design.cc index b313e3e1a1..576bc44ae6 100644 --- a/source/src/apps/pilot/will/old/atom_design.cc +++ b/source/src/apps/pilot/will/old/atom_design.cc @@ -160,7 +160,7 @@ main( int argc, char * argv [] ) mydumppdb(pose,"post_design.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/atom_type_rdf.cc b/source/src/apps/pilot/will/old/atom_type_rdf.cc index 4e4d374ed8..890f50df79 100644 --- a/source/src/apps/pilot/will/old/atom_type_rdf.cc +++ b/source/src/apps/pilot/will/old/atom_type_rdf.cc @@ -237,7 +237,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/bpy.cc b/source/src/apps/pilot/will/old/bpy.cc index caecd669ad..2bff6449c4 100644 --- a/source/src/apps/pilot/will/old/bpy.cc +++ b/source/src/apps/pilot/will/old/bpy.cc @@ -620,7 +620,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cluster_cyc_disulf.cc b/source/src/apps/pilot/will/old/cluster_cyc_disulf.cc index 5c31e1cb29..1a8485b4e6 100644 --- a/source/src/apps/pilot/will/old/cluster_cyc_disulf.cc +++ b/source/src/apps/pilot/will/old/cluster_cyc_disulf.cc @@ -257,7 +257,7 @@ main( int argc, char * argv [] ) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/coiled_coil.cc b/source/src/apps/pilot/will/old/coiled_coil.cc index 37e42dadf2..a0ef6d2959 100644 --- a/source/src/apps/pilot/will/old/coiled_coil.cc +++ b/source/src/apps/pilot/will/old/coiled_coil.cc @@ -1282,7 +1282,7 @@ main( int argc, char * argv [] ) sslog.clear(); sslog.str(""); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/coiled_coil_zn.cc b/source/src/apps/pilot/will/old/coiled_coil_zn.cc index e2ca71da5d..924852ca89 100644 --- a/source/src/apps/pilot/will/old/coiled_coil_zn.cc +++ b/source/src/apps/pilot/will/old/coiled_coil_zn.cc @@ -1274,7 +1274,7 @@ main( int argc, char * argv [] ) sslog.clear(); sslog.str(""); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/crossmatch.cc b/source/src/apps/pilot/will/old/crossmatch.cc index aacdfa6872..9256ef0d28 100644 --- a/source/src/apps/pilot/will/old/crossmatch.cc +++ b/source/src/apps/pilot/will/old/crossmatch.cc @@ -2368,7 +2368,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/crossmatch_3e.cc b/source/src/apps/pilot/will/old/crossmatch_3e.cc index 027e1a5de2..804925482a 100644 --- a/source/src/apps/pilot/will/old/crossmatch_3e.cc +++ b/source/src/apps/pilot/will/old/crossmatch_3e.cc @@ -302,7 +302,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/crossmatch_d2.cc b/source/src/apps/pilot/will/old/crossmatch_d2.cc index cf92af1b18..09b1bd7677 100644 --- a/source/src/apps/pilot/will/old/crossmatch_d2.cc +++ b/source/src/apps/pilot/will/old/crossmatch_d2.cc @@ -2372,7 +2372,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cxdock_sheet.cc b/source/src/apps/pilot/will/old/cxdock_sheet.cc index c517381d9f..1e1539afe5 100644 --- a/source/src/apps/pilot/will/old/cxdock_sheet.cc +++ b/source/src/apps/pilot/will/old/cxdock_sheet.cc @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { dock(pala,fn,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cycgly_bbg8t3a.cc b/source/src/apps/pilot/will/old/cycgly_bbg8t3a.cc index fc73a4f34b..2144151137 100644 --- a/source/src/apps/pilot/will/old/cycgly_bbg8t3a.cc +++ b/source/src/apps/pilot/will/old/cycgly_bbg8t3a.cc @@ -735,7 +735,7 @@ int main( int argc, char * argv [] ) { TR << "FINAL " << trial->num_accepts() << " accpets " << ntransitions << " transitions " << posebins.size() << " bins filled " << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cycgly_canonical.cc b/source/src/apps/pilot/will/old/cycgly_canonical.cc index c5b012a2df..d1187f1fb5 100644 --- a/source/src/apps/pilot/will/old/cycgly_canonical.cc +++ b/source/src/apps/pilot/will/old/cycgly_canonical.cc @@ -336,7 +336,7 @@ int main( int argc, char * argv [] ) { csm->apply(pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cycgly_superimpose.cc b/source/src/apps/pilot/will/old/cycgly_superimpose.cc index 5032b58490..f7ee3a8221 100644 --- a/source/src/apps/pilot/will/old/cycgly_superimpose.cc +++ b/source/src/apps/pilot/will/old/cycgly_superimpose.cc @@ -441,7 +441,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cycgly_target.cc b/source/src/apps/pilot/will/old/cycgly_target.cc index f7ba62f1cb..c6efd0c70a 100644 --- a/source/src/apps/pilot/will/old/cycgly_target.cc +++ b/source/src/apps/pilot/will/old/cycgly_target.cc @@ -838,7 +838,7 @@ int main( int argc, char * argv [] ) { } TR << "FINAL " << trial->num_accepts() << " accpets " << ntransitions << " transitions " << posebins.size() << " bins filled " << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/cycsamp.cc b/source/src/apps/pilot/will/old/cycsamp.cc index 92cb92b4d9..ec25e7e235 100644 --- a/source/src/apps/pilot/will/old/cycsamp.cc +++ b/source/src/apps/pilot/will/old/cycsamp.cc @@ -596,7 +596,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/d3_bpy_linker.cc b/source/src/apps/pilot/will/old/d3_bpy_linker.cc index cb743d0274..9e57ea115e 100644 --- a/source/src/apps/pilot/will/old/d3_bpy_linker.cc +++ b/source/src/apps/pilot/will/old/d3_bpy_linker.cc @@ -273,7 +273,7 @@ int main(int argc, char *argv[]) { dock(pnat,fn,ssamp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/design_DL.cc b/source/src/apps/pilot/will/old/design_DL.cc index 2a827ad8d2..47a5b97322 100644 --- a/source/src/apps/pilot/will/old/design_DL.cc +++ b/source/src/apps/pilot/will/old/design_DL.cc @@ -97,7 +97,7 @@ int main (int argc, char *argv[]) { pose.dump_pdb(infile+"_DL.pdb"); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/design_frags.cc b/source/src/apps/pilot/will/old/design_frags.cc index 20e53b0bd8..78047a4aee 100644 --- a/source/src/apps/pilot/will/old/design_frags.cc +++ b/source/src/apps/pilot/will/old/design_frags.cc @@ -97,7 +97,7 @@ main (int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/designability_stats.cc b/source/src/apps/pilot/will/old/designability_stats.cc index 63bb39ed39..b3e6e15df8 100644 --- a/source/src/apps/pilot/will/old/designability_stats.cc +++ b/source/src/apps/pilot/will/old/designability_stats.cc @@ -484,7 +484,7 @@ int main(int argc, char *argv[]) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/disulf_frag_match.cc b/source/src/apps/pilot/will/old/disulf_frag_match.cc index e011692b31..27d1f24d80 100644 --- a/source/src/apps/pilot/will/old/disulf_frag_match.cc +++ b/source/src/apps/pilot/will/old/disulf_frag_match.cc @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/disulf_frag_search.cc b/source/src/apps/pilot/will/old/disulf_frag_search.cc index 59f4d88db0..981aebad4e 100644 --- a/source/src/apps/pilot/will/old/disulf_frag_search.cc +++ b/source/src/apps/pilot/will/old/disulf_frag_search.cc @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/disulf_stat.cc b/source/src/apps/pilot/will/old/disulf_stat.cc index f3d28d762c..d532eece79 100644 --- a/source/src/apps/pilot/will/old/disulf_stat.cc +++ b/source/src/apps/pilot/will/old/disulf_stat.cc @@ -96,7 +96,7 @@ int main (int argc, char *argv[]) { TR << "DONE!" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dock_asym.cc b/source/src/apps/pilot/will/old/dock_asym.cc index 74517db02f..90f0a7595c 100644 --- a/source/src/apps/pilot/will/old/dock_asym.cc +++ b/source/src/apps/pilot/will/old/dock_asym.cc @@ -279,7 +279,7 @@ int main(int argc, char *argv[]) { dock(pnat1,pnat2,native,fn1,fn2,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dubois.cc b/source/src/apps/pilot/will/old/dubois.cc index 117d781746..4ad558c16d 100644 --- a/source/src/apps/pilot/will/old/dubois.cc +++ b/source/src/apps/pilot/will/old/dubois.cc @@ -574,7 +574,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dubois_graft.cc b/source/src/apps/pilot/will/old/dubois_graft.cc index 90d96d1dbd..2bf489976a 100644 --- a/source/src/apps/pilot/will/old/dubois_graft.cc +++ b/source/src/apps/pilot/will/old/dubois_graft.cc @@ -235,7 +235,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dump_res.cc b/source/src/apps/pilot/will/old/dump_res.cc index 01db2b7021..b2d0cf14b3 100644 --- a/source/src/apps/pilot/will/old/dump_res.cc +++ b/source/src/apps/pilot/will/old/dump_res.cc @@ -126,7 +126,7 @@ main( int argc, char * argv [] ) pose.dump_pdb("CR5.pdb"); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dxdock.cc b/source/src/apps/pilot/will/old/dxdock.cc index 18d78e6cfd..be187d6395 100644 --- a/source/src/apps/pilot/will/old/dxdock.cc +++ b/source/src/apps/pilot/will/old/dxdock.cc @@ -378,7 +378,7 @@ int main(int argc, char *argv[]) { dock(pala,fn,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/dxdock_movie.cc b/source/src/apps/pilot/will/old/dxdock_movie.cc index 2f35a90b3c..ba285cbc9b 100644 --- a/source/src/apps/pilot/will/old/dxdock_movie.cc +++ b/source/src/apps/pilot/will/old/dxdock_movie.cc @@ -439,7 +439,7 @@ int main(int argc, char *argv[]) { dock(pnat,fn); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/flail.cc b/source/src/apps/pilot/will/old/flail.cc index 6c62bcb9f8..c7697a3d00 100644 --- a/source/src/apps/pilot/will/old/flail.cc +++ b/source/src/apps/pilot/will/old/flail.cc @@ -572,7 +572,7 @@ int main(int argv, char **argc){ if( option[flail::walltime_limit]() < timedif) break; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/fnd_dutton.cc b/source/src/apps/pilot/will/old/fnd_dutton.cc index c710e896c7..d655a8d6c3 100644 --- a/source/src/apps/pilot/will/old/fnd_dutton.cc +++ b/source/src/apps/pilot/will/old/fnd_dutton.cc @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/for_dkim.cc b/source/src/apps/pilot/will/old/for_dkim.cc index 34d85cc77c..8061892d0f 100644 --- a/source/src/apps/pilot/will/old/for_dkim.cc +++ b/source/src/apps/pilot/will/old/for_dkim.cc @@ -75,7 +75,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/for_tim.cc b/source/src/apps/pilot/will/old/for_tim.cc index 7a54600a51..672efc8a65 100644 --- a/source/src/apps/pilot/will/old/for_tim.cc +++ b/source/src/apps/pilot/will/old/for_tim.cc @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; } diff --git a/source/src/apps/pilot/will/old/gen3bpy.cc b/source/src/apps/pilot/will/old/gen3bpy.cc index 3684a42546..05b6380613 100644 --- a/source/src/apps/pilot/will/old/gen3bpy.cc +++ b/source/src/apps/pilot/will/old/gen3bpy.cc @@ -259,7 +259,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genI213.cc b/source/src/apps/pilot/will/old/genI213.cc index 3f8a2a2758..be5684ceca 100644 --- a/source/src/apps/pilot/will/old/genI213.cc +++ b/source/src/apps/pilot/will/old/genI213.cc @@ -1019,7 +1019,7 @@ int main (int argc, char *argv[]) { design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genI213_2comp.cc b/source/src/apps/pilot/will/old/genI213_2comp.cc index dcc38996c4..3a0e4aec46 100644 --- a/source/src/apps/pilot/will/old/genI213_2comp.cc +++ b/source/src/apps/pilot/will/old/genI213_2comp.cc @@ -1399,7 +1399,7 @@ int main (int argc, char *argv[]) { //design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genI213_2dsf.cc b/source/src/apps/pilot/will/old/genI213_2dsf.cc index 2f8c904694..578eeb6f1f 100644 --- a/source/src/apps/pilot/will/old/genI213_2dsf.cc +++ b/source/src/apps/pilot/will/old/genI213_2dsf.cc @@ -179,7 +179,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genI213_gensym.cc b/source/src/apps/pilot/will/old/genI213_gensym.cc index db9be2cd97..101f83bbb7 100644 --- a/source/src/apps/pilot/will/old/genI213_gensym.cc +++ b/source/src/apps/pilot/will/old/genI213_gensym.cc @@ -1538,7 +1538,7 @@ int main (int argc, char *argv[]) { //design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genI213_nocontacts.cc b/source/src/apps/pilot/will/old/genI213_nocontacts.cc index 8d81335ced..84119cde65 100644 --- a/source/src/apps/pilot/will/old/genI213_nocontacts.cc +++ b/source/src/apps/pilot/will/old/genI213_nocontacts.cc @@ -1532,7 +1532,7 @@ int main (int argc, char *argv[]) { //design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genP23.cc b/source/src/apps/pilot/will/old/genP23.cc index 754b9613c0..694d7d764b 100644 --- a/source/src/apps/pilot/will/old/genP23.cc +++ b/source/src/apps/pilot/will/old/genP23.cc @@ -1538,7 +1538,7 @@ int main (int argc, char *argv[]) { //design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_cyc_gly.cc b/source/src/apps/pilot/will/old/gen_cyc_gly.cc index 3bdf385198..240284ec1a 100644 --- a/source/src/apps/pilot/will/old/gen_cyc_gly.cc +++ b/source/src/apps/pilot/will/old/gen_cyc_gly.cc @@ -294,7 +294,7 @@ int main( int argc, char * argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_cyc_gly_cst.cc b/source/src/apps/pilot/will/old/gen_cyc_gly_cst.cc index 0ac8b0b3bc..e98db1bcd6 100644 --- a/source/src/apps/pilot/will/old/gen_cyc_gly_cst.cc +++ b/source/src/apps/pilot/will/old/gen_cyc_gly_cst.cc @@ -213,7 +213,7 @@ int main( int argc, char * argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_d2.cc b/source/src/apps/pilot/will/old/gen_d2.cc index 7941b77f4b..ed8a94ef64 100644 --- a/source/src/apps/pilot/will/old/gen_d2.cc +++ b/source/src/apps/pilot/will/old/gen_d2.cc @@ -923,7 +923,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_d2_3his_ooc.cc b/source/src/apps/pilot/will/old/gen_d2_3his_ooc.cc index 30a80affd7..477cf63dfb 100644 --- a/source/src/apps/pilot/will/old/gen_d2_3his_ooc.cc +++ b/source/src/apps/pilot/will/old/gen_d2_3his_ooc.cc @@ -953,7 +953,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_d2_4his.cc b/source/src/apps/pilot/will/old/gen_d2_4his.cc index 3003008245..32f031d354 100644 --- a/source/src/apps/pilot/will/old/gen_d2_4his.cc +++ b/source/src/apps/pilot/will/old/gen_d2_4his.cc @@ -934,7 +934,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_d2_hhhc.cc b/source/src/apps/pilot/will/old/gen_d2_hhhc.cc index 8398572676..6ba70458e7 100644 --- a/source/src/apps/pilot/will/old/gen_d2_hhhc.cc +++ b/source/src/apps/pilot/will/old/gen_d2_hhhc.cc @@ -857,7 +857,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_disulf_homodimer.cc b/source/src/apps/pilot/will/old/gen_disulf_homodimer.cc index c81e7f4620..ac9b21858e 100644 --- a/source/src/apps/pilot/will/old/gen_disulf_homodimer.cc +++ b/source/src/apps/pilot/will/old/gen_disulf_homodimer.cc @@ -395,7 +395,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_homo_hc.cc b/source/src/apps/pilot/will/old/gen_homo_hc.cc index 02c4f4501d..9b1a92df3b 100644 --- a/source/src/apps/pilot/will/old/gen_homo_hc.cc +++ b/source/src/apps/pilot/will/old/gen_homo_hc.cc @@ -418,7 +418,7 @@ int main (int argc, char *argv[]) { run(option[in::file::s]()[1]); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_trimer_disulf.cc b/source/src/apps/pilot/will/old/gen_trimer_disulf.cc index 696a6cc7a1..6188de02c7 100644 --- a/source/src/apps/pilot/will/old/gen_trimer_disulf.cc +++ b/source/src/apps/pilot/will/old/gen_trimer_disulf.cc @@ -527,7 +527,7 @@ int main (int argc, char *argv[]) { generate_disulfide_conformations(tri2,icys,N); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gen_xtal_dimer_from_trimer.cc b/source/src/apps/pilot/will/old/gen_xtal_dimer_from_trimer.cc index af090fd74b..4b07a6ec55 100644 --- a/source/src/apps/pilot/will/old/gen_xtal_dimer_from_trimer.cc +++ b/source/src/apps/pilot/will/old/gen_xtal_dimer_from_trimer.cc @@ -629,7 +629,7 @@ int main (int argc, char *argv[]) { // design_hits(pnat,fn,hts.first,hts.second); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genmatch.cc b/source/src/apps/pilot/will/old/genmatch.cc index 1373b1b786..cc2c6788bf 100644 --- a/source/src/apps/pilot/will/old/genmatch.cc +++ b/source/src/apps/pilot/will/old/genmatch.cc @@ -1762,7 +1762,7 @@ int main (int argc, char *argv[]) { // run_diiron_glu(); // run_3bpy(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genmatch_3bpy.cc b/source/src/apps/pilot/will/old/genmatch_3bpy.cc index 6c3ef99a29..1eb333fcff 100644 --- a/source/src/apps/pilot/will/old/genmatch_3bpy.cc +++ b/source/src/apps/pilot/will/old/genmatch_3bpy.cc @@ -482,7 +482,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genmatch_d6_bhhcg.cc b/source/src/apps/pilot/will/old/genmatch_d6_bhhcg.cc index 9a8682dca6..41b3240d62 100644 --- a/source/src/apps/pilot/will/old/genmatch_d6_bhhcg.cc +++ b/source/src/apps/pilot/will/old/genmatch_d6_bhhcg.cc @@ -611,7 +611,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genmatch_d6_bpy.cc b/source/src/apps/pilot/will/old/genmatch_d6_bpy.cc index 0ccfcae277..a7d772c84e 100644 --- a/source/src/apps/pilot/will/old/genmatch_d6_bpy.cc +++ b/source/src/apps/pilot/will/old/genmatch_d6_bpy.cc @@ -793,7 +793,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/genmatch_m8.cc b/source/src/apps/pilot/will/old/genmatch_m8.cc index 462e80108d..a7e2db92fe 100644 --- a/source/src/apps/pilot/will/old/genmatch_m8.cc +++ b/source/src/apps/pilot/will/old/genmatch_m8.cc @@ -733,7 +733,7 @@ int main (int argc, char *argv[]) { run_m8(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gensym_3bpy_from_dimer.cc b/source/src/apps/pilot/will/old/gensym_3bpy_from_dimer.cc index c9fb8990db..d22b941c9f 100644 --- a/source/src/apps/pilot/will/old/gensym_3bpy_from_dimer.cc +++ b/source/src/apps/pilot/will/old/gensym_3bpy_from_dimer.cc @@ -1078,7 +1078,7 @@ int main(int argc, char **argv){ register_options(); devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gentetra.cc b/source/src/apps/pilot/will/old/gentetra.cc index 26a7f62cfa..bcaa7fcd7e 100644 --- a/source/src/apps/pilot/will/old/gentetra.cc +++ b/source/src/apps/pilot/will/old/gentetra.cc @@ -534,7 +534,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gentetra_bpy_from_znhis.cc b/source/src/apps/pilot/will/old/gentetra_bpy_from_znhis.cc index 6ba534d627..8d4f515c42 100644 --- a/source/src/apps/pilot/will/old/gentetra_bpy_from_znhis.cc +++ b/source/src/apps/pilot/will/old/gentetra_bpy_from_znhis.cc @@ -575,7 +575,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/gentetra_from_trimer.cc b/source/src/apps/pilot/will/old/gentetra_from_trimer.cc index 999dc0092d..43bbb00e2d 100644 --- a/source/src/apps/pilot/will/old/gentetra_from_trimer.cc +++ b/source/src/apps/pilot/will/old/gentetra_from_trimer.cc @@ -444,7 +444,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/getDistConstraints.cc b/source/src/apps/pilot/will/old/getDistConstraints.cc index e5a32697c4..eea261b4d8 100644 --- a/source/src/apps/pilot/will/old/getDistConstraints.cc +++ b/source/src/apps/pilot/will/old/getDistConstraints.cc @@ -135,7 +135,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/hczndimer.cc b/source/src/apps/pilot/will/old/hczndimer.cc index 05bf2446bd..6b7bbd843d 100644 --- a/source/src/apps/pilot/will/old/hczndimer.cc +++ b/source/src/apps/pilot/will/old/hczndimer.cc @@ -574,7 +574,7 @@ int main(int argc, char *argv[]) { dock(pnat,fn); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/holes2_training_data.cc b/source/src/apps/pilot/will/old/holes2_training_data.cc index c958fba6fc..8a13e9dafa 100644 --- a/source/src/apps/pilot/will/old/holes2_training_data.cc +++ b/source/src/apps/pilot/will/old/holes2_training_data.cc @@ -464,7 +464,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/holes_pbpdb.cc b/source/src/apps/pilot/will/old/holes_pbpdb.cc index eb84679ebc..5c07094ef8 100644 --- a/source/src/apps/pilot/will/old/holes_pbpdb.cc +++ b/source/src/apps/pilot/will/old/holes_pbpdb.cc @@ -124,7 +124,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/holes_training_data.cc b/source/src/apps/pilot/will/old/holes_training_data.cc index db6a780bd7..f2fc3c5989 100644 --- a/source/src/apps/pilot/will/old/holes_training_data.cc +++ b/source/src/apps/pilot/will/old/holes_training_data.cc @@ -169,7 +169,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/hubabinitio.cc b/source/src/apps/pilot/will/old/hubabinitio.cc index 95382b5426..0a5d75ce7e 100644 --- a/source/src/apps/pilot/will/old/hubabinitio.cc +++ b/source/src/apps/pilot/will/old/hubabinitio.cc @@ -522,7 +522,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/hubdenovo.cc b/source/src/apps/pilot/will/old/hubdenovo.cc index d5fdbf858c..fc6bc7d547 100644 --- a/source/src/apps/pilot/will/old/hubdenovo.cc +++ b/source/src/apps/pilot/will/old/hubdenovo.cc @@ -1345,7 +1345,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/hubfragdesign.cc b/source/src/apps/pilot/will/old/hubfragdesign.cc index 2a131b1de0..b351eb670f 100644 --- a/source/src/apps/pilot/will/old/hubfragdesign.cc +++ b/source/src/apps/pilot/will/old/hubfragdesign.cc @@ -529,7 +529,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/isct_test.cc b/source/src/apps/pilot/will/old/isct_test.cc index 44853bfa1c..11e869537a 100644 --- a/source/src/apps/pilot/will/old/isct_test.cc +++ b/source/src/apps/pilot/will/old/isct_test.cc @@ -353,7 +353,7 @@ int main (int argc, char *argv[]) { } TR << cnt / N << " " << Real(bt) / Real(it) << " " << Real(it) / Real(gt) << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/make_symmetric_task_test.cc b/source/src/apps/pilot/will/old/make_symmetric_task_test.cc index 0312fdaf32..4984ee3652 100644 --- a/source/src/apps/pilot/will/old/make_symmetric_task_test.cc +++ b/source/src/apps/pilot/will/old/make_symmetric_task_test.cc @@ -58,7 +58,7 @@ int main (int argc, char *argv[]) { } return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/match_disulf.cc b/source/src/apps/pilot/will/old/match_disulf.cc index 4028c44d82..ef44996678 100644 --- a/source/src/apps/pilot/will/old/match_disulf.cc +++ b/source/src/apps/pilot/will/old/match_disulf.cc @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/minimize.cc b/source/src/apps/pilot/will/old/minimize.cc index 5be1794396..4155e6871f 100644 --- a/source/src/apps/pilot/will/old/minimize.cc +++ b/source/src/apps/pilot/will/old/minimize.cc @@ -86,7 +86,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/minimize_cavities.cc b/source/src/apps/pilot/will/old/minimize_cavities.cc index 968378e796..14876ba27f 100644 --- a/source/src/apps/pilot/will/old/minimize_cavities.cc +++ b/source/src/apps/pilot/will/old/minimize_cavities.cc @@ -374,7 +374,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/mkresfile_i213.cc b/source/src/apps/pilot/will/old/mkresfile_i213.cc index e5c870bf67..9e2817bf83 100644 --- a/source/src/apps/pilot/will/old/mkresfile_i213.cc +++ b/source/src/apps/pilot/will/old/mkresfile_i213.cc @@ -318,7 +318,7 @@ main (int argc, char *argv[]) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/motif_hash_util.cc b/source/src/apps/pilot/will/old/motif_hash_util.cc index 9dab0a4fd4..03ba900c0e 100644 --- a/source/src/apps/pilot/will/old/motif_hash_util.cc +++ b/source/src/apps/pilot/will/old/motif_hash_util.cc @@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) { // utility::io::izstream ifs1("test1.txt"); ifs1 >> mh2 ; ifs1.close(); // utility::io::ozstream ofs2("test2.txt"); ofs2 << mh2 << endl; ofs2.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; } return 0; diff --git a/source/src/apps/pilot/will/old/nisod.cc b/source/src/apps/pilot/will/old/nisod.cc index 0316bad22c..5ad410f6da 100644 --- a/source/src/apps/pilot/will/old/nisod.cc +++ b/source/src/apps/pilot/will/old/nisod.cc @@ -302,7 +302,7 @@ main( int argc, char * argv [] ) pose.dump_pdb("test.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/organopv.cc b/source/src/apps/pilot/will/old/organopv.cc index e02522c079..86c0a26efc 100644 --- a/source/src/apps/pilot/will/old/organopv.cc +++ b/source/src/apps/pilot/will/old/organopv.cc @@ -341,7 +341,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pack_ddg.cc b/source/src/apps/pilot/will/old/pack_ddg.cc index 059c249acb..027bc05dbf 100644 --- a/source/src/apps/pilot/will/old/pack_ddg.cc +++ b/source/src/apps/pilot/will/old/pack_ddg.cc @@ -263,7 +263,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pack_stat_energy.cc b/source/src/apps/pilot/will/old/pack_stat_energy.cc index 106c03c58c..77a941ac0d 100644 --- a/source/src/apps/pilot/will/old/pack_stat_energy.cc +++ b/source/src/apps/pilot/will/old/pack_stat_energy.cc @@ -86,7 +86,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pentcb.cc b/source/src/apps/pilot/will/old/pentcb.cc index 9cdece2e61..b0dd1a76a7 100644 --- a/source/src/apps/pilot/will/old/pentcb.cc +++ b/source/src/apps/pilot/will/old/pentcb.cc @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { dock(pala,fn,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pentcb_design.cc b/source/src/apps/pilot/will/old/pentcb_design.cc index 4aab6c9a21..c2be390cd4 100644 --- a/source/src/apps/pilot/will/old/pentcb_design.cc +++ b/source/src/apps/pilot/will/old/pentcb_design.cc @@ -479,7 +479,7 @@ int main(int argc, char *argv[]) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pentcb_test.cc b/source/src/apps/pilot/will/old/pentcb_test.cc index 9cdece2e61..b0dd1a76a7 100644 --- a/source/src/apps/pilot/will/old/pentcb_test.cc +++ b/source/src/apps/pilot/will/old/pentcb_test.cc @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { dock(pala,fn,ssamp); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/pilot_packstat.cc b/source/src/apps/pilot/will/old/pilot_packstat.cc index aac7ee4584..ff390853ba 100644 --- a/source/src/apps/pilot/will/old/pilot_packstat.cc +++ b/source/src/apps/pilot/will/old/pilot_packstat.cc @@ -442,7 +442,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/print_dunscores.cc b/source/src/apps/pilot/will/old/print_dunscores.cc index 617b184ef9..2601fbdaee 100644 --- a/source/src/apps/pilot/will/old/print_dunscores.cc +++ b/source/src/apps/pilot/will/old/print_dunscores.cc @@ -112,7 +112,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rblinker.cc b/source/src/apps/pilot/will/old/rblinker.cc index da4d5ca083..62f5b63dbb 100644 --- a/source/src/apps/pilot/will/old/rblinker.cc +++ b/source/src/apps/pilot/will/old/rblinker.cc @@ -774,7 +774,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rblinker2.cc b/source/src/apps/pilot/will/old/rblinker2.cc index 71cb107ee2..14dfedf6a3 100644 --- a/source/src/apps/pilot/will/old/rblinker2.cc +++ b/source/src/apps/pilot/will/old/rblinker2.cc @@ -525,7 +525,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rblinker2_overlay_bound.cc b/source/src/apps/pilot/will/old/rblinker2_overlay_bound.cc index f3255f47c5..b3f464a51e 100644 --- a/source/src/apps/pilot/will/old/rblinker2_overlay_bound.cc +++ b/source/src/apps/pilot/will/old/rblinker2_overlay_bound.cc @@ -529,7 +529,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rblinker2_test.cc b/source/src/apps/pilot/will/old/rblinker2_test.cc index 0d7c9e2e9d..96c8b7b69e 100644 --- a/source/src/apps/pilot/will/old/rblinker2_test.cc +++ b/source/src/apps/pilot/will/old/rblinker2_test.cc @@ -326,7 +326,7 @@ int main( int argc, char * argv [] ) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rescore_i213.cc b/source/src/apps/pilot/will/old/rescore_i213.cc index f807c60426..48cacecdae 100644 --- a/source/src/apps/pilot/will/old/rescore_i213.cc +++ b/source/src/apps/pilot/will/old/rescore_i213.cc @@ -256,7 +256,7 @@ main (int argc, char *argv[]) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/rsd_canonical_units.cc b/source/src/apps/pilot/will/old/rsd_canonical_units.cc index 02f45007ba..8ad5b20942 100644 --- a/source/src/apps/pilot/will/old/rsd_canonical_units.cc +++ b/source/src/apps/pilot/will/old/rsd_canonical_units.cc @@ -231,7 +231,7 @@ int main(int argc, char *argv[]) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/sasa_test.cc b/source/src/apps/pilot/will/old/sasa_test.cc index ee4911d005..5fe9d4dd04 100644 --- a/source/src/apps/pilot/will/old/sasa_test.cc +++ b/source/src/apps/pilot/will/old/sasa_test.cc @@ -115,7 +115,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/scheme_v0_score.cc b/source/src/apps/pilot/will/old/scheme_v0_score.cc index 819fb7d9e4..9aa5ec2dd5 100644 --- a/source/src/apps/pilot/will/old/scheme_v0_score.cc +++ b/source/src/apps/pilot/will/old/scheme_v0_score.cc @@ -198,7 +198,7 @@ make_motif_task( << "Failed to process resfile" << endl << "RESFILE:" << endl << resfile << endl; - throw utility::excn::EXCN_Msg_Exception(error_message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str()); } return task; @@ -436,7 +436,7 @@ int main(int argc, char *argv[]) { register_options(); devel::init(argc,argv); scheme_score(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; } } diff --git a/source/src/apps/pilot/will/old/score_pdbs.cc b/source/src/apps/pilot/will/old/score_pdbs.cc index 89672ed746..9708dd4fc3 100644 --- a/source/src/apps/pilot/will/old/score_pdbs.cc +++ b/source/src/apps/pilot/will/old/score_pdbs.cc @@ -120,7 +120,7 @@ main( int argc, char * argv [] ) score_pdb( pdbnames[ ii ]); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/sf4_hash.cc b/source/src/apps/pilot/will/old/sf4_hash.cc index 7c95f8ea6e..4a76294c0e 100644 --- a/source/src/apps/pilot/will/old/sf4_hash.cc +++ b/source/src/apps/pilot/will/old/sf4_hash.cc @@ -357,7 +357,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run_sf4h(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/sicdock.cc b/source/src/apps/pilot/will/old/sicdock.cc index e22b4b2c75..657cf34960 100644 --- a/source/src/apps/pilot/will/old/sicdock.cc +++ b/source/src/apps/pilot/will/old/sicdock.cc @@ -594,7 +594,7 @@ int main(int argc, char *argv[]) { dock(pnat,fn,qgrid,olig,nfold,cen); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/smhybrid.cc b/source/src/apps/pilot/will/old/smhybrid.cc index 5ef788f0b0..ace9f6c1db 100644 --- a/source/src/apps/pilot/will/old/smhybrid.cc +++ b/source/src/apps/pilot/will/old/smhybrid.cc @@ -4030,7 +4030,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/spiro.cc b/source/src/apps/pilot/will/old/spiro.cc index 9ead20cef0..2b9e7dfbc2 100644 --- a/source/src/apps/pilot/will/old/spiro.cc +++ b/source/src/apps/pilot/will/old/spiro.cc @@ -622,7 +622,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/sup_test.cc b/source/src/apps/pilot/will/old/sup_test.cc index a79f74dbe4..0a132b416a 100644 --- a/source/src/apps/pilot/will/old/sup_test.cc +++ b/source/src/apps/pilot/will/old/sup_test.cc @@ -57,7 +57,7 @@ int main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/symdock_enum_3_1.cc b/source/src/apps/pilot/will/old/symdock_enum_3_1.cc index 5d02a1b29e..41e7435981 100644 --- a/source/src/apps/pilot/will/old/symdock_enum_3_1.cc +++ b/source/src/apps/pilot/will/old/symdock_enum_3_1.cc @@ -1624,7 +1624,7 @@ int main (int argc, char *argv[]) { } cout << "DONE symdock_enum_3_1" << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/symdock_hybrid.cc b/source/src/apps/pilot/will/old/symdock_hybrid.cc index 6cb287e571..9b6f6dcf8f 100644 --- a/source/src/apps/pilot/will/old/symdock_hybrid.cc +++ b/source/src/apps/pilot/will/old/symdock_hybrid.cc @@ -207,7 +207,7 @@ main (int argc, char *argv[]){ return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/symdock_hybrid_cc3.cc b/source/src/apps/pilot/will/old/symdock_hybrid_cc3.cc index 75437863ba..5da9d929a0 100644 --- a/source/src/apps/pilot/will/old/symdock_hybrid_cc3.cc +++ b/source/src/apps/pilot/will/old/symdock_hybrid_cc3.cc @@ -207,7 +207,7 @@ main (int argc, char *argv[]){ return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/tcdock.cc b/source/src/apps/pilot/will/old/tcdock.cc index a887d05b63..fb655d3291 100644 --- a/source/src/apps/pilot/will/old/tcdock.cc +++ b/source/src/apps/pilot/will/old/tcdock.cc @@ -2209,7 +2209,7 @@ int main (int argc, char *argv[]) { } } cout << "DONE symdock_enum_3_1" << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test.cc b/source/src/apps/pilot/will/old/test.cc index 8bd3dd4948..df78f8538b 100644 --- a/source/src/apps/pilot/will/old/test.cc +++ b/source/src/apps/pilot/will/old/test.cc @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { std::cout << x << std::endl; return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_ikrs.cc b/source/src/apps/pilot/will/old/test_ikrs.cc index d7f4579ed9..7f34023631 100644 --- a/source/src/apps/pilot/will/old/test_ikrs.cc +++ b/source/src/apps/pilot/will/old/test_ikrs.cc @@ -1665,7 +1665,7 @@ int main (int argc, char *argv[]) { TR << "MATCHES: " << nhit << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_ikrs2.cc b/source/src/apps/pilot/will/old/test_ikrs2.cc index 92b00c8472..c1acb53e95 100644 --- a/source/src/apps/pilot/will/old/test_ikrs2.cc +++ b/source/src/apps/pilot/will/old/test_ikrs2.cc @@ -1933,7 +1933,7 @@ int main (int argc, char *argv[]) { // } TR << "MATCHES: " << nhit << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_ikrs_flymake.cc b/source/src/apps/pilot/will/old/test_ikrs_flymake.cc index 4f6a12b9d2..62d42f0035 100644 --- a/source/src/apps/pilot/will/old/test_ikrs_flymake.cc +++ b/source/src/apps/pilot/will/old/test_ikrs_flymake.cc @@ -721,7 +721,7 @@ int main (int argc, char *argv[]) { TR << "TOTAL: " << hits.size() << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_kc.cc b/source/src/apps/pilot/will/old/test_kc.cc index 61c0c7baea..504e9cb17f 100644 --- a/source/src/apps/pilot/will/old/test_kc.cc +++ b/source/src/apps/pilot/will/old/test_kc.cc @@ -372,7 +372,7 @@ int main (int argc, char *argv[]) { // numeric::kinematic_closure::test_bridgeObjects(); test_kc2(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_leerichards.cc b/source/src/apps/pilot/will/old/test_leerichards.cc index 7a2cf1e4fc..f7306863e9 100644 --- a/source/src/apps/pilot/will/old/test_leerichards.cc +++ b/source/src/apps/pilot/will/old/test_leerichards.cc @@ -534,7 +534,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_loop_hash.cc b/source/src/apps/pilot/will/old/test_loop_hash.cc index 7db3fa749a..d95ab597ae 100644 --- a/source/src/apps/pilot/will/old/test_loop_hash.cc +++ b/source/src/apps/pilot/will/old/test_loop_hash.cc @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_rose.cc b/source/src/apps/pilot/will/old/test_rose.cc index 20d56b4189..2f1d457d6c 100644 --- a/source/src/apps/pilot/will/old/test_rose.cc +++ b/source/src/apps/pilot/will/old/test_rose.cc @@ -101,7 +101,7 @@ int main(int argv, char **argc){ return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/test_sucker_energy.cc b/source/src/apps/pilot/will/old/test_sucker_energy.cc index 1b47981976..27aaca32c7 100644 --- a/source/src/apps/pilot/will/old/test_sucker_energy.cc +++ b/source/src/apps/pilot/will/old/test_sucker_energy.cc @@ -52,7 +52,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/ward_design.cc b/source/src/apps/pilot/will/old/ward_design.cc index b1664fe7bf..4f0fff5196 100644 --- a/source/src/apps/pilot/will/old/ward_design.cc +++ b/source/src/apps/pilot/will/old/ward_design.cc @@ -253,7 +253,7 @@ main( int argc, char * argv [] ) } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/will_mutalyze.cc b/source/src/apps/pilot/will/old/will_mutalyze.cc index 17513110bc..09fb7184ea 100644 --- a/source/src/apps/pilot/will/old/will_mutalyze.cc +++ b/source/src/apps/pilot/will/old/will_mutalyze.cc @@ -646,7 +646,7 @@ main (int argc, char *argv[]) func(NULL); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/willmatch_2d6_bhe.cc b/source/src/apps/pilot/will/old/willmatch_2d6_bhe.cc index 0a16b603ce..e5882a2f90 100644 --- a/source/src/apps/pilot/will/old/willmatch_2d6_bhe.cc +++ b/source/src/apps/pilot/will/old/willmatch_2d6_bhe.cc @@ -628,7 +628,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/willmatch_chorismate.cc b/source/src/apps/pilot/will/old/willmatch_chorismate.cc index 5b080e3bc9..cc3baa6c26 100644 --- a/source/src/apps/pilot/will/old/willmatch_chorismate.cc +++ b/source/src/apps/pilot/will/old/willmatch_chorismate.cc @@ -318,7 +318,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/willmatch_d6_bpy.cc b/source/src/apps/pilot/will/old/willmatch_d6_bpy.cc index dfce2361d2..5864787bee 100644 --- a/source/src/apps/pilot/will/old/willmatch_d6_bpy.cc +++ b/source/src/apps/pilot/will/old/willmatch_d6_bpy.cc @@ -1043,7 +1043,7 @@ int main (int argc, char *argv[]) { devel::init(argc,argv); run(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/xyzStripeHash_dump.cc b/source/src/apps/pilot/will/old/xyzStripeHash_dump.cc index 6a1eadf922..76745e820b 100644 --- a/source/src/apps/pilot/will/old/xyzStripeHash_dump.cc +++ b/source/src/apps/pilot/will/old/xyzStripeHash_dump.cc @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/xyzStripeHash_test.cc b/source/src/apps/pilot/will/old/xyzStripeHash_test.cc index 02a0407865..d2047f7716 100644 --- a/source/src/apps/pilot/will/old/xyzStripeHash_test.cc +++ b/source/src/apps/pilot/will/old/xyzStripeHash_test.cc @@ -346,7 +346,7 @@ int main(int argc, char *argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/old/yeates_align.cc b/source/src/apps/pilot/will/old/yeates_align.cc index 1fc5e57066..ff82acd859 100644 --- a/source/src/apps/pilot/will/old/yeates_align.cc +++ b/source/src/apps/pilot/will/old/yeates_align.cc @@ -194,7 +194,7 @@ main (int argc, char *argv[]){ return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/sym_multicomp_test.cc b/source/src/apps/pilot/will/sym_multicomp_test.cc index 22a83278e1..c8e528149d 100644 --- a/source/src/apps/pilot/will/sym_multicomp_test.cc +++ b/source/src/apps/pilot/will/sym_multicomp_test.cc @@ -141,7 +141,7 @@ int main (int argc, char *argv[]) { } return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/will/test_surf_vol.cc b/source/src/apps/pilot/will/test_surf_vol.cc index 3a2e910884..8d6b49a8ed 100644 --- a/source/src/apps/pilot/will/test_surf_vol.cc +++ b/source/src/apps/pilot/will/test_surf_vol.cc @@ -103,7 +103,7 @@ main (int argc, char *argv[]) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wojtek/FiberDiffractionTest.cc b/source/src/apps/pilot/wojtek/FiberDiffractionTest.cc index 42d740834d..07aa08572e 100755 --- a/source/src/apps/pilot/wojtek/FiberDiffractionTest.cc +++ b/source/src/apps/pilot/wojtek/FiberDiffractionTest.cc @@ -168,7 +168,7 @@ main( int argc, char * argv [] ) scoremover->apply(pose); pose.dump_pdb("min.pdb"); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/wujsean/graft_ligand.cc b/source/src/apps/pilot/wujsean/graft_ligand.cc index 45e320a273..f36ecd4661 100644 --- a/source/src/apps/pilot/wujsean/graft_ligand.cc +++ b/source/src/apps/pilot/wujsean/graft_ligand.cc @@ -243,7 +243,7 @@ main( int argc, char * argv [] ) { //Testing //comparative_modeling_pose.pdb_info() -> show(std::cout); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/xingjiepan/dna_motif_matcher.cc b/source/src/apps/pilot/xingjiepan/dna_motif_matcher.cc index f9d491fb58..a8a8df6625 100644 --- a/source/src/apps/pilot/xingjiepan/dna_motif_matcher.cc +++ b/source/src/apps/pilot/xingjiepan/dna_motif_matcher.cc @@ -155,7 +155,7 @@ int main( int argc, char * argv [] ) devel::init( argc, argv ); dna_motif_matcher(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yab/buns_report.cc b/source/src/apps/pilot/yab/buns_report.cc index 8ae38585cf..2d945f8393 100644 --- a/source/src/apps/pilot/yab/buns_report.cc +++ b/source/src/apps/pilot/yab/buns_report.cc @@ -91,7 +91,7 @@ int main( int argc, char * argv [] ) { // run job JobDistributor::get_instance()->go( seqmover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yab/ufv.cc b/source/src/apps/pilot/yab/ufv.cc index 552025e6c4..d18b42bc90 100644 --- a/source/src/apps/pilot/yab/ufv.cc +++ b/source/src/apps/pilot/yab/ufv.cc @@ -511,7 +511,7 @@ int main( int argc, char * argv [] ) { } protocols::viewer::viewer_main( graphics_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yab/vllb.cc b/source/src/apps/pilot/yab/vllb.cc index 984dbdb54c..da7611023e 100644 --- a/source/src/apps/pilot/yab/vllb.cc +++ b/source/src/apps/pilot/yab/vllb.cc @@ -253,7 +253,7 @@ int main( int argc, char * argv [] ) { protocols::viewer::viewer_main( ligand_test ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yfsong/PB_potential.cc b/source/src/apps/pilot/yfsong/PB_potential.cc index b3253e8b8f..032fe5fa22 100644 --- a/source/src/apps/pilot/yfsong/PB_potential.cc +++ b/source/src/apps/pilot/yfsong/PB_potential.cc @@ -218,7 +218,7 @@ main( int argc, char * argv [] ) PB_potential_mover.initialize(); protocols::jobdist::universal_main( PB_potential_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yfsong/challenge.cc b/source/src/apps/pilot/yfsong/challenge.cc index feacd7a4e3..afbd07f8db 100644 --- a/source/src/apps/pilot/yfsong/challenge.cc +++ b/source/src/apps/pilot/yfsong/challenge.cc @@ -928,7 +928,7 @@ my_main( void* ) { try{ protocols::jd2::JobDistributor::get_instance()->go( whole_sequence ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } @@ -957,7 +957,7 @@ main( int argc, char * argv [] ) //protocols::viewer::viewer_main( challenge_main ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yfsong/plot_hb.cc b/source/src/apps/pilot/yfsong/plot_hb.cc index f80e07078f..8d2b4664e2 100644 --- a/source/src/apps/pilot/yfsong/plot_hb.cc +++ b/source/src/apps/pilot/yfsong/plot_hb.cc @@ -107,7 +107,7 @@ main (int argc, char *argv[]){ // if ( option[ plot_hb::show_poly ]() ) core::scoring::hbonds::show_poly(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yiliu/AbinitioClassic.cc b/source/src/apps/pilot/yiliu/AbinitioClassic.cc index 4b038480c2..5ca1185055 100644 --- a/source/src/apps/pilot/yiliu/AbinitioClassic.cc +++ b/source/src/apps/pilot/yiliu/AbinitioClassic.cc @@ -245,7 +245,7 @@ main( int argc, char * argv [] ) while(nstruct){ abinitio.apply(*native_pose); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yiliu/combine_silent_test.cc b/source/src/apps/pilot/yiliu/combine_silent_test.cc index 558720b71d..7bbac9a09c 100644 --- a/source/src/apps/pilot/yiliu/combine_silent_test.cc +++ b/source/src/apps/pilot/yiliu/combine_silent_test.cc @@ -144,7 +144,7 @@ main( int argc, char* argv [] ) { // } return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yiliu/design_contrast_and_statistic.cc b/source/src/apps/pilot/yiliu/design_contrast_and_statistic.cc index 68a2d31356..b96bc0f952 100644 --- a/source/src/apps/pilot/yiliu/design_contrast_and_statistic.cc +++ b/source/src/apps/pilot/yiliu/design_contrast_and_statistic.cc @@ -302,7 +302,7 @@ int main( int argc, char * argv [] ) sqc.close(); statistics(sqc_file); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yiliu/design_contrast_test.cc b/source/src/apps/pilot/yiliu/design_contrast_test.cc index 67e05f4256..d60762268c 100644 --- a/source/src/apps/pilot/yiliu/design_contrast_test.cc +++ b/source/src/apps/pilot/yiliu/design_contrast_test.cc @@ -116,7 +116,7 @@ int main( int argc, char * argv [] ) dc.output_sqc_file(native_poses[j], decoy_poses[j], pdb_codes[j], sqc); } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/yiliu/extract_pdbs_test.cc b/source/src/apps/pilot/yiliu/extract_pdbs_test.cc index 1981fb0c92..f9230617f1 100644 --- a/source/src/apps/pilot/yiliu/extract_pdbs_test.cc +++ b/source/src/apps/pilot/yiliu/extract_pdbs_test.cc @@ -156,7 +156,7 @@ main( int argc, char* argv [] ) // pose.dump_pdb( iter->decoy_tag() + ".fix_repack_min.pdb" ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/zhezhang/extract_CA_coords.cc b/source/src/apps/pilot/zhezhang/extract_CA_coords.cc index 6268d1432b..e0d2857385 100644 --- a/source/src/apps/pilot/zhezhang/extract_CA_coords.cc +++ b/source/src/apps/pilot/zhezhang/extract_CA_coords.cc @@ -68,7 +68,7 @@ //Auto Headers #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -180,10 +180,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/zhezhang/extract_replica.cc b/source/src/apps/pilot/zhezhang/extract_replica.cc index 1f9a48e1fd..d0e6cdae7d 100644 --- a/source/src/apps/pilot/zhezhang/extract_replica.cc +++ b/source/src/apps/pilot/zhezhang/extract_replica.cc @@ -71,7 +71,7 @@ //Auto Headers #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -163,7 +163,7 @@ main( int argc, char * argv [] ) core::io::silent::SilentStructOP st = extract_replica( "for_test.out" , "P_0002" , 1); st->print_scores( std::cout ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/zhezhang/fasta2pdb.cc b/source/src/apps/pilot/zhezhang/fasta2pdb.cc index fbbb5a16c6..ec4364ba23 100644 --- a/source/src/apps/pilot/zhezhang/fasta2pdb.cc +++ b/source/src/apps/pilot/zhezhang/fasta2pdb.cc @@ -67,7 +67,7 @@ //Auto Headers #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -183,10 +183,10 @@ main( int argc, char * argv [] ) // try{ // run(); - // } catch ( utility::excn::EXCN_Base& excn ) { + // } catch (utility::excn::Exception& excn ) { // excn.show( std::cerr ); // } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/zhezhang/r_rmsf.cc b/source/src/apps/pilot/zhezhang/r_rmsf.cc index d240849de3..331635fbe2 100644 --- a/source/src/apps/pilot/zhezhang/r_rmsf.cc +++ b/source/src/apps/pilot/zhezhang/r_rmsf.cc @@ -65,7 +65,7 @@ //Auto Headers #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -308,10 +308,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/pilot/zibochen/pad_helices.cc b/source/src/apps/pilot/zibochen/pad_helices.cc index 5bc37e1cea..a94ea67c5e 100644 --- a/source/src/apps/pilot/zibochen/pad_helices.cc +++ b/source/src/apps/pilot/zibochen/pad_helices.cc @@ -219,7 +219,7 @@ main( int argc, char ** argv ) { target_pose.dump_pdb(option[prefix]+base_name+"_padded.pdb"); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/AbinitioRelax.cc b/source/src/apps/public/AbinitioRelax.cc index 1f10fd7f14..0c0ff40980 100644 --- a/source/src/apps/public/AbinitioRelax.cc +++ b/source/src/apps/public/AbinitioRelax.cc @@ -21,7 +21,7 @@ #include #include #include -#include +#include // option key includes #include @@ -52,11 +52,11 @@ main( int argc, char * argv [] ) protocols::abinitio::AbrelaxApplication abrelax; try{ abrelax.run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/public/SymDock.cc b/source/src/apps/public/SymDock.cc index 756af97e56..52706371db 100644 --- a/source/src/apps/public/SymDock.cc +++ b/source/src/apps/public/SymDock.cc @@ -15,7 +15,7 @@ #include #include -#include +#include // C++ headers #include @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) protocols::symmetric_docking::SymDock_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/InterfaceAnalyzer.cc b/source/src/apps/public/analysis/InterfaceAnalyzer.cc index 3665ac0fd2..2a8d5734a5 100644 --- a/source/src/apps/public/analysis/InterfaceAnalyzer.cc +++ b/source/src/apps/public/analysis/InterfaceAnalyzer.cc @@ -202,7 +202,7 @@ main( int argc, char* argv[] ) protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new IAMover() )); TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/PeptideDeriver.cc b/source/src/apps/public/analysis/PeptideDeriver.cc index 4fa57d3295..65783b0b43 100644 --- a/source/src/apps/public/analysis/PeptideDeriver.cc +++ b/source/src/apps/public/analysis/PeptideDeriver.cc @@ -108,7 +108,7 @@ main( int argc, char * argv[] ) { // GO! protocols::jd2::JobDistributor::get_instance()->go(mover); - } catch (utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/batch_distances.cc b/source/src/apps/public/analysis/batch_distances.cc index edbe90e0f8..a53f43e3db 100644 --- a/source/src/apps/public/analysis/batch_distances.cc +++ b/source/src/apps/public/analysis/batch_distances.cc @@ -188,7 +188,7 @@ int main( int argc, char* argv [] ) { } } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/contactMap.cc b/source/src/apps/public/analysis/contactMap.cc index 68b5416e06..20a1002a6f 100644 --- a/source/src/apps/public/analysis/contactMap.cc +++ b/source/src/apps/public/analysis/contactMap.cc @@ -186,7 +186,7 @@ int main(int argc, char* argv[]) { return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/cst_info.cc b/source/src/apps/public/analysis/cst_info.cc index 900ea85f24..7a2adb3778 100644 --- a/source/src/apps/public/analysis/cst_info.cc +++ b/source/src/apps/public/analysis/cst_info.cc @@ -111,7 +111,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/ensemble_analysis.cc b/source/src/apps/public/analysis/ensemble_analysis.cc index 70013e8790..0f34958c58 100644 --- a/source/src/apps/public/analysis/ensemble_analysis.cc +++ b/source/src/apps/public/analysis/ensemble_analysis.cc @@ -48,7 +48,7 @@ //Auto Headers #include -#include +#include static basic::Tracer tr( "main" ); @@ -321,10 +321,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/fast_clustering.cc b/source/src/apps/public/analysis/fast_clustering.cc index 75f07eef8a..0e9eba0ca0 100644 --- a/source/src/apps/public/analysis/fast_clustering.cc +++ b/source/src/apps/public/analysis/fast_clustering.cc @@ -43,7 +43,7 @@ #include //Auto Headers -#include +#include static basic::Tracer tr( "main" ); @@ -135,10 +135,10 @@ main( int argc, char * argv [] ) try{ run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { excn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/interface_energy.cc b/source/src/apps/public/analysis/interface_energy.cc index ddcc808d5a..21e3cc2773 100644 --- a/source/src/apps/public/analysis/interface_energy.cc +++ b/source/src/apps/public/analysis/interface_energy.cc @@ -332,7 +332,7 @@ int main( int argc, char * argv [] ) return 0; } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/per_residue_energies.cc b/source/src/apps/public/analysis/per_residue_energies.cc index 049a8d4945..cd6ff0b747 100644 --- a/source/src/apps/public/analysis/per_residue_energies.cc +++ b/source/src/apps/public/analysis/per_residue_energies.cc @@ -168,7 +168,7 @@ main( int argc, char* argv [] ) { } } // while ( input.has_another_pose() ) - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/residue_energy_breakdown.cc b/source/src/apps/public/analysis/residue_energy_breakdown.cc index b75aa1a6b4..9e66bcbbc9 100644 --- a/source/src/apps/public/analysis/residue_energy_breakdown.cc +++ b/source/src/apps/public/analysis/residue_energy_breakdown.cc @@ -197,7 +197,7 @@ main( int argc, char* argv [] ) { } // while ( input.has_another_pose() ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/score.cc b/source/src/apps/public/analysis/score.cc index e3a23a11c1..d1f728eb1c 100644 --- a/source/src/apps/public/analysis/score.cc +++ b/source/src/apps/public/analysis/score.cc @@ -135,7 +135,7 @@ main( int argc, char * argv [] ) try { add_cmdline_claims(*top_bro_OP, false /* do_I_need_fragments */); } -catch ( utility::excn::EXCN_Exception &excn ) { +catch ( utility::excn::Exception &excn ) { excn.show( TR.Error ); utility_exit(); } @@ -246,10 +246,9 @@ catch ( utility::excn::EXCN_Exception &excn ) { // operate this mover and output pdbs/scorefile protocols::jobdist::universal_main( *mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } return 0; } - diff --git a/source/src/apps/public/analysis/score_jd2.cc b/source/src/apps/public/analysis/score_jd2.cc index 262c2c715e..f757da599d 100644 --- a/source/src/apps/public/analysis/score_jd2.cc +++ b/source/src/apps/public/analysis/score_jd2.cc @@ -182,7 +182,7 @@ main( int argc, char * argv [] ) protocols::topology_broker::TopologyBrokerOP top_bro_OP( new topology_broker::TopologyBroker() ); try { add_cmdline_claims(*top_bro_OP, false /*do_I_need_fragments */); - } catch ( utility::excn::EXCN_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { excn.show( TR.Error ); utility_exit(); } @@ -259,13 +259,13 @@ main( int argc, char * argv [] ) try { JobDistributor::get_instance()->go( scoremover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; excn.show( std::cout ); //so its also seen in a >LOG file } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/analysis/shobuns.cc b/source/src/apps/public/analysis/shobuns.cc index 4a131801a1..4e2157a0d5 100644 --- a/source/src/apps/public/analysis/shobuns.cc +++ b/source/src/apps/public/analysis/shobuns.cc @@ -122,7 +122,7 @@ int main( int argc, char * argv [] ) shobuns_calculator->recompute_and_print(ps); } // try -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/antibody.cc b/source/src/apps/public/antibody/antibody.cc index e74d6bf649..b1bbeb233f 100644 --- a/source/src/apps/public/antibody/antibody.cc +++ b/source/src/apps/public/antibody/antibody.cc @@ -371,7 +371,7 @@ int antibody_main() return 1; } } - catch(Grafting_Base_Exception e) { + catch (Grafting_Base_Exception e) { std::cout << e << std::endl; } @@ -408,7 +408,7 @@ int main(int argc, char * argv []) return antibody_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return 1; } diff --git a/source/src/apps/public/antibody/antibody_CR_paratope.cc b/source/src/apps/public/antibody/antibody_CR_paratope.cc index ce7ca94136..e2fd926e6b 100644 --- a/source/src/apps/public/antibody/antibody_CR_paratope.cc +++ b/source/src/apps/public/antibody/antibody_CR_paratope.cc @@ -68,7 +68,7 @@ main( int argc, char* argv[] ){ std::cout << "Total charge " << total_charge << std::endl; ParatopeMetric< core::SSize>p_charge = paratope_charge( pose, abinfo ); std::cout << "paratope charge " << p_charge.paratope << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/antibody_H3.cc b/source/src/apps/public/antibody/antibody_H3.cc index b52922de4a..77ff6ff125 100644 --- a/source/src/apps/public/antibody/antibody_H3.cc +++ b/source/src/apps/public/antibody/antibody_H3.cc @@ -56,7 +56,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go(ab_m_h3); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/antibody_designer.cc b/source/src/apps/public/antibody/antibody_designer.cc index 1085bce9e9..dd1232d711 100644 --- a/source/src/apps/public/antibody/antibody_designer.cc +++ b/source/src/apps/public/antibody/antibody_designer.cc @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new AntibodyDesignProtocol )); } - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { basic::Error() << "ERROR: Exception caught by antibody_design application:" << excn << std::endl; diff --git a/source/src/apps/public/antibody/antibody_graft.cc b/source/src/apps/public/antibody/antibody_graft.cc index 4e9266f5eb..af351f332b 100644 --- a/source/src/apps/public/antibody/antibody_graft.cc +++ b/source/src/apps/public/antibody/antibody_graft.cc @@ -54,7 +54,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go(abm); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/antibody_legacy.cc b/source/src/apps/public/antibody/antibody_legacy.cc index 952c7f86d0..868f6037ba 100644 --- a/source/src/apps/public/antibody/antibody_legacy.cc +++ b/source/src/apps/public/antibody/antibody_legacy.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) MoverOP RosettaAntibody( new antibody_legacy::AntibodyModeler( ) ); // protocols::jd2::JobDistributor::get_instance()->go( RosettaAntibody ); protocols::jobdist::main_plain_mover( *RosettaAntibody ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/antibody_numbering_converter.cc b/source/src/apps/public/antibody/antibody_numbering_converter.cc index db74fe5e6b..2066b159a2 100644 --- a/source/src/apps/public/antibody/antibody_numbering_converter.cc +++ b/source/src/apps/public/antibody/antibody_numbering_converter.cc @@ -69,7 +69,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( mover_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/identify_cdr_clusters.cc b/source/src/apps/public/antibody/identify_cdr_clusters.cc index 0ff6312eca..faa892cae8 100644 --- a/source/src/apps/public/antibody/identify_cdr_clusters.cc +++ b/source/src/apps/public/antibody/identify_cdr_clusters.cc @@ -107,7 +107,7 @@ int main(int argc, char* argv[]) std::cout<< " North B, Lehmann A, Dunbrack RL. A new clustering of antibody CDR loop conformations. J Mol Biol 2011; 406:228-256." << std::endl <go( packing_angle ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/antibody/snugdock.cc b/source/src/apps/public/antibody/snugdock.cc index 29279f010a..e41e049aa1 100644 --- a/source/src/apps/public/antibody/snugdock.cc +++ b/source/src/apps/public/antibody/snugdock.cc @@ -77,7 +77,7 @@ main( int argc, char * argv [] ) SnugDockProtocolOP snugdock( new SnugDockProtocol ); JobDistributor::get_instance()->go( snugdock ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/backrub.cc b/source/src/apps/public/backrub.cc index e446a69fe8..26ddcf6e53 100644 --- a/source/src/apps/public/backrub.cc +++ b/source/src/apps/public/backrub.cc @@ -88,7 +88,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/boinc/minirosetta.cc b/source/src/apps/public/boinc/minirosetta.cc index f08fb8aa80..7895a02612 100644 --- a/source/src/apps/public/boinc/minirosetta.cc +++ b/source/src/apps/public/boinc/minirosetta.cc @@ -280,7 +280,7 @@ main( int argc, char * argv [] ) protocols::boinc::Boinc::worker_shutdown(); // Does not return. utility_exit_with_message( "reached end of minirosetta::main() after worker_shutdown(); " ); #endif - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "std::cerr: Exception was thrown: " << std::endl; excn.show( std::cerr ); std::cout << "std::cout: Exception was thrown: " << std::endl; @@ -291,7 +291,7 @@ main( int argc, char * argv [] ) return 1; // MUST return non-0 - otherwise BOINC does not abort! } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/boinc/minirosetta_graphics.cc b/source/src/apps/public/boinc/minirosetta_graphics.cc index 5c03e659ab..ec5558b1fc 100644 --- a/source/src/apps/public/boinc/minirosetta_graphics.cc +++ b/source/src/apps/public/boinc/minirosetta_graphics.cc @@ -1384,7 +1384,7 @@ int main(int argc, char** argv) { #ifdef _DEBUG boinc_finish_diag(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/calculate_sasa.cc b/source/src/apps/public/calculate_sasa.cc index e0bb0bc1ea..77e04d31f6 100644 --- a/source/src/apps/public/calculate_sasa.cc +++ b/source/src/apps/public/calculate_sasa.cc @@ -116,7 +116,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); calculate_sasa(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/carbohydrates/dock_glycans.cc b/source/src/apps/public/carbohydrates/dock_glycans.cc index c39566b8c7..9c61d9a872 100644 --- a/source/src/apps/public/carbohydrates/dock_glycans.cc +++ b/source/src/apps/public/carbohydrates/dock_glycans.cc @@ -650,7 +650,7 @@ main( int argc, char *argv[] ) // Distribute the mover. protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return FAILURE; } diff --git a/source/src/apps/public/clustering/calibur.cc b/source/src/apps/public/clustering/calibur.cc index 15c62823b6..9ff5b7cb68 100644 --- a/source/src/apps/public/clustering/calibur.cc +++ b/source/src/apps/public/clustering/calibur.cc @@ -235,7 +235,7 @@ int main(int argc, char** argv) } ic->showClusters(2); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/clustering/cluster.cc b/source/src/apps/public/clustering/cluster.cc index bdb0f67b41..95bdf4ca2d 100644 --- a/source/src/apps/public/clustering/cluster.cc +++ b/source/src/apps/public/clustering/cluster.cc @@ -285,7 +285,7 @@ main( int argc, char * argv [] ) { << "s\n Total: " << time_total - time_start << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/clustering/energy_based_clustering.cc b/source/src/apps/public/clustering/energy_based_clustering.cc index e19f89457a..4a2bb80c0c 100644 --- a/source/src/apps/public/clustering/energy_based_clustering.cc +++ b/source/src/apps/public/clustering/energy_based_clustering.cc @@ -92,7 +92,7 @@ int main( int argc, char * argv [] ) { cluster_protocol.go(); TR << "Terminating energy_based_clustering application with exit code 0 (no errors)." << std::endl; - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Terminating energy_based_clustering application with errors:" << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/public/combine_silent.cc b/source/src/apps/public/combine_silent.cc index 0257c1fe15..c5044865ad 100644 --- a/source/src/apps/public/combine_silent.cc +++ b/source/src/apps/public/combine_silent.cc @@ -67,7 +67,7 @@ main( int argc, char* argv [] ) { protocols::moves::NullMover mover; protocols::jobdist::not_universal_main( mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/avrg_silent.cc b/source/src/apps/public/comparative_modeling/avrg_silent.cc index 141dd00df2..ac012038a1 100644 --- a/source/src/apps/public/comparative_modeling/avrg_silent.cc +++ b/source/src/apps/public/comparative_modeling/avrg_silent.cc @@ -529,7 +529,7 @@ int main( int argc, char *argv [] ) devel::init(argc, argv); calc_rmsf_and_avrg(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/cluster_alns.cc b/source/src/apps/public/comparative_modeling/cluster_alns.cc index 38324ce27b..9e46164abe 100644 --- a/source/src/apps/public/comparative_modeling/cluster_alns.cc +++ b/source/src/apps/public/comparative_modeling/cluster_alns.cc @@ -26,7 +26,7 @@ int main( int argc, char * argv [] ) { using namespace protocols::comparative_modeling; devel::init(argc, argv); AlignmentClusteringOP cluster( new AlignmentClustering() ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/fast_gap.cc b/source/src/apps/public/comparative_modeling/fast_gap.cc index db84c6a87e..5c59928104 100644 --- a/source/src/apps/public/comparative_modeling/fast_gap.cc +++ b/source/src/apps/public/comparative_modeling/fast_gap.cc @@ -141,7 +141,7 @@ main( int argc, char* argv [] ) { output.close(); //full_length_pose.dump_pdb( output_prefix + "_full_length.pdb" ); } // has_another_pose() - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/fix_alignment_to_match_pdb.cc b/source/src/apps/public/comparative_modeling/fix_alignment_to_match_pdb.cc index 3686665082..df64162d96 100644 --- a/source/src/apps/public/comparative_modeling/fix_alignment_to_match_pdb.cc +++ b/source/src/apps/public/comparative_modeling/fix_alignment_to_match_pdb.cc @@ -217,7 +217,7 @@ main( int argc, char * argv [] ) { } // if found a template pdb } // for alns } // for aln_fn - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/full_length_model.cc b/source/src/apps/public/comparative_modeling/full_length_model.cc index e0f6d69237..f698bd8c32 100644 --- a/source/src/apps/public/comparative_modeling/full_length_model.cc +++ b/source/src/apps/public/comparative_modeling/full_length_model.cc @@ -259,7 +259,7 @@ main( int argc, char* argv [] ) { //full_length_pose.dump_pdb( output_prefix + "_full_length.pdb" ); } // has_another_pose() - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/iterhybrid_selector.cc b/source/src/apps/public/comparative_modeling/iterhybrid_selector.cc index 95df6be81f..702e42e91f 100644 --- a/source/src/apps/public/comparative_modeling/iterhybrid_selector.cc +++ b/source/src/apps/public/comparative_modeling/iterhybrid_selector.cc @@ -634,7 +634,7 @@ int main( int argc, char * argv [] ) // dump out into silent report_and_dump( library_inout, pose0, dump_cst, is_iterative_selection ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/partial_thread.cc b/source/src/apps/public/comparative_modeling/partial_thread.cc index a7b6c1ffa4..31c978ca94 100644 --- a/source/src/apps/public/comparative_modeling/partial_thread.cc +++ b/source/src/apps/public/comparative_modeling/partial_thread.cc @@ -166,7 +166,7 @@ main( int argc, char* argv [] ) { tr.Debug << "finished building partial models." << std::endl; tr.flush_all_channels(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/score_aln.cc b/source/src/apps/public/comparative_modeling/score_aln.cc index ffc30bbecb..913d5fef3d 100644 --- a/source/src/apps/public/comparative_modeling/score_aln.cc +++ b/source/src/apps/public/comparative_modeling/score_aln.cc @@ -345,7 +345,7 @@ main( int argc, char* argv [] ) { tr.Debug << "finished rescoring alignments." << std::endl; tr.flush_all_channels(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/score_aln2.cc b/source/src/apps/public/comparative_modeling/score_aln2.cc index c6940f368c..6f8e26cb45 100644 --- a/source/src/apps/public/comparative_modeling/score_aln2.cc +++ b/source/src/apps/public/comparative_modeling/score_aln2.cc @@ -340,7 +340,7 @@ main( int argc, char* argv [] ) { tr.Debug << "finished rescoring alignments." << std::endl; tr.flush_all_channels(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/comparative_modeling/spheregrinder.cc b/source/src/apps/public/comparative_modeling/spheregrinder.cc index 52c307266d..5343d5c829 100644 --- a/source/src/apps/public/comparative_modeling/spheregrinder.cc +++ b/source/src/apps/public/comparative_modeling/spheregrinder.cc @@ -226,7 +226,7 @@ int main( int argc, char *argv [] ) //std::cout << tags[i] << " " << score << " " <= PCT_THRESHOLD) ? 0 : 1; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/coupled_moves/coupled_moves.cc b/source/src/apps/public/coupled_moves/coupled_moves.cc index b90f7593a1..38f330a26e 100644 --- a/source/src/apps/public/coupled_moves/coupled_moves.cc +++ b/source/src/apps/public/coupled_moves/coupled_moves.cc @@ -75,7 +75,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/cyclic_peptide/simple_cycpep_predict.cc b/source/src/apps/public/cyclic_peptide/simple_cycpep_predict.cc index db7beca0bd..b419cba109 100644 --- a/source/src/apps/public/cyclic_peptide/simple_cycpep_predict.cc +++ b/source/src/apps/public/cyclic_peptide/simple_cycpep_predict.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -280,7 +280,7 @@ main( int argc, char * argv [] ) #endif this_app.run(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR.Error << "Exception caught: " << std::endl; excn.show( TR.Error ); TR.Error.flush(); diff --git a/source/src/apps/public/darc/DARC.cc b/source/src/apps/public/darc/DARC.cc index a23454189b..ac381f26de 100644 --- a/source/src/apps/public/darc/DARC.cc +++ b/source/src/apps/public/darc/DARC.cc @@ -630,7 +630,7 @@ int main( int argc, char * argv [] ) { } darc_score_file.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/darc/make_ray_files.cc b/source/src/apps/public/darc/make_ray_files.cc index b5ce791de9..34d514467b 100644 --- a/source/src/apps/public/darc/make_ray_files.cc +++ b/source/src/apps/public/darc/make_ray_files.cc @@ -386,7 +386,7 @@ int main( int argc, char * argv [] ) { std::cout<< "DONE!"<< std::endl; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/darc/theta_ligand.cc b/source/src/apps/public/darc/theta_ligand.cc index 02b9917e32..9ecc290cc9 100644 --- a/source/src/apps/public/darc/theta_ligand.cc +++ b/source/src/apps/public/darc/theta_ligand.cc @@ -196,7 +196,7 @@ int main( int argc, char * argv [] ){ std::cout << "Scores: theta_ligand "<go(seq_mover); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/mpi_msd.cc b/source/src/apps/public/design/mpi_msd.cc index 99dd519fbd..4aa0d7792a 100644 --- a/source/src/apps/public/design/mpi_msd.cc +++ b/source/src/apps/public/design/mpi_msd.cc @@ -457,7 +457,7 @@ int main( int argc, char ** argv ) utility::io::izstream daf_file( daf_filename ); try { daf->initialize_from_input_file( ds, daf_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Caught exception" << std::endl; std::cerr << e.msg() << std::endl; exit(1); @@ -603,7 +603,7 @@ int main( int argc, char ** argv ) MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/pmut_scan_parallel.cc b/source/src/apps/public/design/pmut_scan_parallel.cc index 12f812a490..ff67679608 100644 --- a/source/src/apps/public/design/pmut_scan_parallel.cc +++ b/source/src/apps/public/design/pmut_scan_parallel.cc @@ -93,7 +93,7 @@ main( int argc, char * argv [] ) { driver.set_ddG_cutoff(DDG_cutoff); driver.go(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/sequence_recovery.cc b/source/src/apps/public/design/sequence_recovery.cc index ba4c755c76..f06adbebef 100644 --- a/source/src/apps/public/design/sequence_recovery.cc +++ b/source/src/apps/public/design/sequence_recovery.cc @@ -491,7 +491,7 @@ int main( int argc, char* argv[] ) { TR << "Measuring sequence recovery" << std::endl; measure_sequence_recovery( native_poses, redesign_poses ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/supercharge.cc b/source/src/apps/public/design/supercharge.cc index 941124011c..34fbb3f5c1 100644 --- a/source/src/apps/public/design/supercharge.cc +++ b/source/src/apps/public/design/supercharge.cc @@ -1374,7 +1374,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/zinc1_homodimer_design.cc b/source/src/apps/public/design/zinc1_homodimer_design.cc index b4a6bff928..e06b0380a7 100644 --- a/source/src/apps/public/design/zinc1_homodimer_design.cc +++ b/source/src/apps/public/design/zinc1_homodimer_design.cc @@ -539,7 +539,7 @@ main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/zinc1_homodimer_setup.cc b/source/src/apps/public/design/zinc1_homodimer_setup.cc index 07011e0471..c108ea70b6 100644 --- a/source/src/apps/public/design/zinc1_homodimer_setup.cc +++ b/source/src/apps/public/design/zinc1_homodimer_setup.cc @@ -182,7 +182,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/zinc2_homodimer_design.cc b/source/src/apps/public/design/zinc2_homodimer_design.cc index 7f74598962..ece07a7eb2 100644 --- a/source/src/apps/public/design/zinc2_homodimer_design.cc +++ b/source/src/apps/public/design/zinc2_homodimer_design.cc @@ -371,7 +371,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/zinc2_homodimer_setup.cc b/source/src/apps/public/design/zinc2_homodimer_setup.cc index 7cc344337a..8763409178 100644 --- a/source/src/apps/public/design/zinc2_homodimer_setup.cc +++ b/source/src/apps/public/design/zinc2_homodimer_setup.cc @@ -445,7 +445,7 @@ main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/design/zinc_heterodimer_design.cc b/source/src/apps/public/design/zinc_heterodimer_design.cc index a86bcd72f6..df5533e67e 100644 --- a/source/src/apps/public/design/zinc_heterodimer_design.cc +++ b/source/src/apps/public/design/zinc_heterodimer_design.cc @@ -331,7 +331,7 @@ main( int argc, char* argv[] ) TR << "************************d**o**n**e**********************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/docking/docking_prepack_protocol.cc b/source/src/apps/public/docking/docking_prepack_protocol.cc index fcdf3d2aea..6e295f8308 100644 --- a/source/src/apps/public/docking/docking_prepack_protocol.cc +++ b/source/src/apps/public/docking/docking_prepack_protocol.cc @@ -46,7 +46,7 @@ main( int argc, char * argv [] ) } else dp = DockingHighResOP( new DockingPrepackProtocol() ); JobDistributor::get_instance()->go(dp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/docking/docking_protocol.cc b/source/src/apps/public/docking/docking_protocol.cc index 2e5c0fecd6..5e79bec38d 100644 --- a/source/src/apps/public/docking/docking_protocol.cc +++ b/source/src/apps/public/docking/docking_protocol.cc @@ -85,7 +85,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/dump_capped_residue.cc b/source/src/apps/public/dump_capped_residue.cc index 006f300d60..bf15c4010f 100644 --- a/source/src/apps/public/dump_capped_residue.cc +++ b/source/src/apps/public/dump_capped_residue.cc @@ -163,7 +163,7 @@ main( int argc, char* argv[] ) } pose->dump_pdb( name+".pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/electron_density/denovo_density.cc b/source/src/apps/public/electron_density/denovo_density.cc index 7144c8d4bb..cfc856c319 100644 --- a/source/src/apps/public/electron_density/denovo_density.cc +++ b/source/src/apps/public/electron_density/denovo_density.cc @@ -1632,7 +1632,7 @@ int main(int argc, char* argv[]) { return -1; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/electron_density/density_tools.cc b/source/src/apps/public/electron_density/density_tools.cc index cacbe951b4..f2f5215a5f 100644 --- a/source/src/apps/public/electron_density/density_tools.cc +++ b/source/src/apps/public/electron_density/density_tools.cc @@ -493,7 +493,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); densityTools(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { TR.Trace << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/electron_density/grower_prep.cc b/source/src/apps/public/electron_density/grower_prep.cc index 28d08faf86..4b469fd343 100644 --- a/source/src/apps/public/electron_density/grower_prep.cc +++ b/source/src/apps/public/electron_density/grower_prep.cc @@ -217,7 +217,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); Prepare(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/electron_density/mr_protocols.cc b/source/src/apps/public/electron_density/mr_protocols.cc index 4a3fef5110..b52b397db0 100644 --- a/source/src/apps/public/electron_density/mr_protocols.cc +++ b/source/src/apps/public/electron_density/mr_protocols.cc @@ -128,7 +128,7 @@ main( int argc, char * argv [] ) { protocols::viewer::viewer_main( my_main ); } -catch ( utility::excn::EXCN_Base const & e) { +catch (utility::excn::Exception const & e) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/enzdes/CstfileToTheozymePDB.cc b/source/src/apps/public/enzdes/CstfileToTheozymePDB.cc index e4033fa99e..72b7826b2d 100644 --- a/source/src/apps/public/enzdes/CstfileToTheozymePDB.cc +++ b/source/src/apps/public/enzdes/CstfileToTheozymePDB.cc @@ -39,7 +39,7 @@ int main( int argc, char * argv [] ) create_theozyme_pdb(); - } catch (utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/enzdes/enzyme_design.cc b/source/src/apps/public/enzdes/enzyme_design.cc index 7a32ba34ea..c782c34048 100644 --- a/source/src/apps/public/enzdes/enzyme_design.cc +++ b/source/src/apps/public/enzdes/enzyme_design.cc @@ -227,7 +227,7 @@ main( int argc, char * argv []) } return 0; } -catch (utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/extract_pdbs.cc b/source/src/apps/public/extract_pdbs.cc index 880a20c1e3..1eda96ee0f 100644 --- a/source/src/apps/public/extract_pdbs.cc +++ b/source/src/apps/public/extract_pdbs.cc @@ -176,7 +176,7 @@ main( int argc, char* argv [] ) { exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/fiber_diffraction/FiberDiffractionFreeSet.cc b/source/src/apps/public/fiber_diffraction/FiberDiffractionFreeSet.cc index ef213de6af..87cae16e1b 100755 --- a/source/src/apps/public/fiber_diffraction/FiberDiffractionFreeSet.cc +++ b/source/src/apps/public/fiber_diffraction/FiberDiffractionFreeSet.cc @@ -279,7 +279,7 @@ main( int argc, char * argv [] ) { out_work.close(); TR<<"Done... "<go( hydrate_protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/idealize_jd2.cc b/source/src/apps/public/idealize_jd2.cc index 45ef34fa4c..2a450f9132 100644 --- a/source/src/apps/public/idealize_jd2.cc +++ b/source/src/apps/public/idealize_jd2.cc @@ -31,7 +31,7 @@ #include //Auto Headers -#include +#include OPT_KEY( Real, atom_pair_constraint_weight ) OPT_KEY( Real, coordinate_constraint_weight ) @@ -87,12 +87,12 @@ int main( int argc, char * argv [] ) { // start the job try { JobDistributor::get_instance()->go( mover ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); } } -catch (utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/interface_design/anchored_design/AnchorFinder.cc b/source/src/apps/public/interface_design/anchored_design/AnchorFinder.cc index 1b0118a43f..e078324e16 100644 --- a/source/src/apps/public/interface_design/anchored_design/AnchorFinder.cc +++ b/source/src/apps/public/interface_design/anchored_design/AnchorFinder.cc @@ -243,7 +243,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception" << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/interface_design/anchored_design/AnchoredDesign.cc b/source/src/apps/public/interface_design/anchored_design/AnchoredDesign.cc index fb6613b1cd..5f906f707e 100644 --- a/source/src/apps/public/interface_design/anchored_design/AnchoredDesign.cc +++ b/source/src/apps/public/interface_design/anchored_design/AnchoredDesign.cc @@ -43,7 +43,7 @@ main( int argc, char* argv[] ) protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new protocols::anchored_design::AnchoredDesignMover() ) ); TR << "************************d**o**n**e**************************************" << std::endl; } -catch (utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/interface_design/anchored_design/AnchoredPDBCreator.cc b/source/src/apps/public/interface_design/anchored_design/AnchoredPDBCreator.cc index 0d84c0cc8e..9c6e70f27b 100644 --- a/source/src/apps/public/interface_design/anchored_design/AnchoredPDBCreator.cc +++ b/source/src/apps/public/interface_design/anchored_design/AnchoredPDBCreator.cc @@ -198,7 +198,7 @@ int main( int argc, char* argv[] ) TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/internal/generate_database_cache.cc b/source/src/apps/public/internal/generate_database_cache.cc index b430e5ffc4..7f84703344 100644 --- a/source/src/apps/public/internal/generate_database_cache.cc +++ b/source/src/apps/public/internal/generate_database_cache.cc @@ -97,7 +97,7 @@ main( int argc, char * argv [] ) generate_dunbrack_binaries(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/internal/validate_database.cc b/source/src/apps/public/internal/validate_database.cc index 1609097281..96496ee729 100644 --- a/source/src/apps/public/internal/validate_database.cc +++ b/source/src/apps/public/internal/validate_database.cc @@ -81,7 +81,7 @@ main( int argc, char * argv [] ) exitcode = -1; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/legacy_sewing/sewing_hasher.cc b/source/src/apps/public/legacy_sewing/sewing_hasher.cc index 9ca5ed0d16..b86fe7f425 100644 --- a/source/src/apps/public/legacy_sewing/sewing_hasher.cc +++ b/source/src/apps/public/legacy_sewing/sewing_hasher.cc @@ -452,7 +452,7 @@ main( int argc, char * argv [] ) { } //for ( ; it1 != it_end; ++it1 ) { #endif }// if ( ( option[legacy_sewing::mode].value() == "hash" ) ) - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { std::cerr << "Exception : " << std::endl; excn.show( std::cerr ); return -1; diff --git a/source/src/apps/public/ligand_docking/extract_atomtree_diffs.cc b/source/src/apps/public/ligand_docking/extract_atomtree_diffs.cc index 845aeda383..be5449165d 100644 --- a/source/src/apps/public/ligand_docking/extract_atomtree_diffs.cc +++ b/source/src/apps/public/ligand_docking/extract_atomtree_diffs.cc @@ -164,7 +164,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go(extract_mover); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ligand_docking/ligand_dock.cc b/source/src/apps/public/ligand_docking/ligand_dock.cc index 7d71ed1885..1a4edd2615 100644 --- a/source/src/apps/public/ligand_docking/ligand_dock.cc +++ b/source/src/apps/public/ligand_docking/ligand_dock.cc @@ -105,7 +105,7 @@ main( int argc, char * argv [] ) return ligand_dock_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ligand_docking/ligand_rpkmin.cc b/source/src/apps/public/ligand_docking/ligand_rpkmin.cc index 44cd69a5a0..594c7e30ab 100644 --- a/source/src/apps/public/ligand_docking/ligand_rpkmin.cc +++ b/source/src/apps/public/ligand_docking/ligand_rpkmin.cc @@ -166,7 +166,7 @@ main( int argc, char * argv [] ) LigandRepackMinimizeProtocolOP dockingProtocol( new LigandRepackMinimizeProtocol() ); protocols::jd2::JobDistributor::get_instance()->go(dockingProtocol); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ligand_docking/select_best_unique_ligand_poses.cc b/source/src/apps/public/ligand_docking/select_best_unique_ligand_poses.cc index 8d68cc5738..2f7f7d93b2 100644 --- a/source/src/apps/public/ligand_docking/select_best_unique_ligand_poses.cc +++ b/source/src/apps/public/ligand_docking/select_best_unique_ligand_poses.cc @@ -232,7 +232,7 @@ main( int argc, char * argv [] ) { } go_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/loop_modeling/loopmodel.cc b/source/src/apps/public/loop_modeling/loopmodel.cc index b44246f508..4b808b3876 100644 --- a/source/src/apps/public/loop_modeling/loopmodel.cc +++ b/source/src/apps/public/loop_modeling/loopmodel.cc @@ -53,7 +53,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( LoopBuild_main_local ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/magnesium/mg_modeler.cc b/source/src/apps/public/magnesium/mg_modeler.cc index 5ed096e6ae..774bbd70be 100644 --- a/source/src/apps/public/magnesium/mg_modeler.cc +++ b/source/src/apps/public/magnesium/mg_modeler.cc @@ -239,7 +239,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/match/gen_apo_grids.cc b/source/src/apps/public/match/gen_apo_grids.cc index 6bf5d94376..816c26de5c 100644 --- a/source/src/apps/public/match/gen_apo_grids.cc +++ b/source/src/apps/public/match/gen_apo_grids.cc @@ -554,7 +554,7 @@ int main( int argc, char * argv [] ) }//grids out_grid.close(); }//cluster - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/match/gen_lig_grids.cc b/source/src/apps/public/match/gen_lig_grids.cc index 706046655a..4bf06f076d 100644 --- a/source/src/apps/public/match/gen_lig_grids.cc +++ b/source/src/apps/public/match/gen_lig_grids.cc @@ -271,7 +271,7 @@ int main( int argc, char * argv [] ) } out_grid << endl; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/match/match.cc b/source/src/apps/public/match/match.cc index c5c781ab6f..58d6025954 100644 --- a/source/src/apps/public/match/match.cc +++ b/source/src/apps/public/match/match.cc @@ -72,7 +72,7 @@ int main( int argc, char * argv [] ) devel::init( argc, argv ); match_main(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/helix_from_sequence.cc b/source/src/apps/public/membrane/helix_from_sequence.cc index 5b645a9c47..c60c939872 100644 --- a/source/src/apps/public/membrane/helix_from_sequence.cc +++ b/source/src/apps/public/membrane/helix_from_sequence.cc @@ -76,7 +76,7 @@ std::string read_fasta() { sequence = core::sequence::read_fasta_file( option[ OptionKeys::in::file::fasta ]()[1] )[1]->sequence(); TR << "Read in fasta file" << option[OptionKeys::in::file::fasta]()[1] << std::endl; } else { - throw new utility::excn::EXCN_Msg_Exception("Please provide fasta file!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide fasta file!"); } return sequence; @@ -251,7 +251,7 @@ main( int argc, char * argv [] ) // helix_from_sequence(); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_dock.cc b/source/src/apps/public/membrane/mp_dock.cc index dfc1e364d5..7acbe6e925 100644 --- a/source/src/apps/public/membrane/mp_dock.cc +++ b/source/src/apps/public/membrane/mp_dock.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) MPDockingMoverOP mpdm( new MPDockingMover() ); JobDistributor::get_instance()->go(mpdm); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_dock_setup.cc b/source/src/apps/public/membrane/mp_dock_setup.cc index bedf60e771..1cf5a4f3ab 100644 --- a/source/src/apps/public/membrane/mp_dock_setup.cc +++ b/source/src/apps/public/membrane/mp_dock_setup.cc @@ -45,7 +45,7 @@ main( int argc, char * argv [] ) MPDockingSetupMoverOP mpdsm( new MPDockingSetupMover() ); mpdsm->apply(pose); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_domain_assembly.cc b/source/src/apps/public/membrane/mp_domain_assembly.cc index b053c1b67a..6db7481c7e 100644 --- a/source/src/apps/public/membrane/mp_domain_assembly.cc +++ b/source/src/apps/public/membrane/mp_domain_assembly.cc @@ -76,7 +76,7 @@ // utility headers #include -#include +#include #include #include #include @@ -814,33 +814,33 @@ void MPDomainAssembly::init_from_cmd() { full_seq_ = core::sequence::read_fasta_file( option[ OptionKeys::in::file::fasta ]()[1] )[1]->sequence(); TR << "Read in fasta file " << option[OptionKeys::in::file::fasta]()[1] << std::endl; } else { - throw utility::excn::EXCN_Msg_Exception("Please provide fasta file with -in:file:fasta!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide fasta file with -in:file:fasta!"); } // read in PDB list if ( option[mp::assembly::poses].user() ) { infiles_ = basic::options::option[mp::assembly::poses](); } else { - throw utility::excn::EXCN_Msg_Exception("Please provide a list of PDB files with -in:file:l!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide a list of PDB files with -in:file:l!"); } // figure out which of the poses_ is the TM span if ( option[OptionKeys::mp::assembly::TM_pose_number].user() ) { tmpdb_ = option[OptionKeys::mp::assembly::TM_pose_number](); } else { - throw utility::excn::EXCN_Msg_Exception("Which number of the PDBs in the file list is located in the membrane?"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Which number of the PDBs in the file list is located in the membrane?"); } // read in fragments if ( option[OptionKeys::in::file::frag3].user() ) { frag3_fn_ = option[OptionKeys::in::file::frag3](); } else { - throw utility::excn::EXCN_Msg_Exception("Please provide fragments with -in:file:frag3!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide fragments with -in:file:frag3!"); } if ( option[OptionKeys::in::file::frag9].user() ) { frag9_fn_ = option[OptionKeys::in::file::frag9](); } else { - throw utility::excn::EXCN_Msg_Exception("Please provide fragments with -in:file:frag9!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide fragments with -in:file:frag9!"); } } // init from commandline @@ -986,7 +986,7 @@ main( int argc, char * argv [] ) return 0; } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_lipid_acc.cc b/source/src/apps/public/membrane/mp_lipid_acc.cc index b90279bbe9..e27c97345e 100644 --- a/source/src/apps/public/membrane/mp_lipid_acc.cc +++ b/source/src/apps/public/membrane/mp_lipid_acc.cc @@ -573,7 +573,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_mutate_relax.cc b/source/src/apps/public/membrane/mp_mutate_relax.cc index 432e392ac8..3e118a1eb7 100644 --- a/source/src/apps/public/membrane/mp_mutate_relax.cc +++ b/source/src/apps/public/membrane/mp_mutate_relax.cc @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) MPMutateRelaxMoverOP mmr( new MPMutateRelaxMover() ); JobDistributor::get_instance()->go(mmr); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_range_relax.cc b/source/src/apps/public/membrane/mp_range_relax.cc index 93dbbb9d58..7322d1379b 100644 --- a/source/src/apps/public/membrane/mp_range_relax.cc +++ b/source/src/apps/public/membrane/mp_range_relax.cc @@ -46,7 +46,7 @@ main( int argc, char * argv [] ) JobDistributor::get_instance()->go( mprelax ); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_span_from_pdb.cc b/source/src/apps/public/membrane/mp_span_from_pdb.cc index 40e005319e..8f1092a384 100644 --- a/source/src/apps/public/membrane/mp_span_from_pdb.cc +++ b/source/src/apps/public/membrane/mp_span_from_pdb.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -80,7 +80,7 @@ Pose read_pose() { // cry if PDB not given if ( ! option[OptionKeys::in::file::s].user() ) { - throw new utility::excn::EXCN_Msg_Exception("Please provide PDB file!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide PDB file!"); } // read in pose @@ -205,7 +205,7 @@ main( int argc, char * argv [] ) spanfile_from_pdb(); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_symdock.cc b/source/src/apps/public/membrane/mp_symdock.cc index 659d759ba1..07fc90ef23 100644 --- a/source/src/apps/public/membrane/mp_symdock.cc +++ b/source/src/apps/public/membrane/mp_symdock.cc @@ -59,7 +59,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_transform.cc b/source/src/apps/public/membrane/mp_transform.cc index 31f39d4b3b..11d36b7502 100644 --- a/source/src/apps/public/membrane/mp_transform.cc +++ b/source/src/apps/public/membrane/mp_transform.cc @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,7 +115,7 @@ main( int argc, char * argv [] ) { JobDistributor::get_instance()->go( seq ); } } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane/mp_viewer.cc b/source/src/apps/public/membrane/mp_viewer.cc index 81bd19a30d..cb07ba983e 100644 --- a/source/src/apps/public/membrane/mp_viewer.cc +++ b/source/src/apps/public/membrane/mp_viewer.cc @@ -111,7 +111,7 @@ main( int argc, char * argv [] ) return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/membrane_abinitio/membrane_abinitio2.cc b/source/src/apps/public/membrane_abinitio/membrane_abinitio2.cc index c44d006d27..68f76b9d29 100644 --- a/source/src/apps/public/membrane_abinitio/membrane_abinitio2.cc +++ b/source/src/apps/public/membrane_abinitio/membrane_abinitio2.cc @@ -51,7 +51,7 @@ main( int argc, char * argv [] ) } else { abrelax.run(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/minimize.cc b/source/src/apps/public/minimize.cc index 8d33306260..b0dfc9035d 100644 --- a/source/src/apps/public/minimize.cc +++ b/source/src/apps/public/minimize.cc @@ -163,7 +163,7 @@ main( int argc, char * argv [] ) MoverOP protocol( new Minimize() ); protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/minimize_ppi.cc b/source/src/apps/public/minimize_ppi.cc index 104a41d658..68aa3244e4 100644 --- a/source/src/apps/public/minimize_ppi.cc +++ b/source/src/apps/public/minimize_ppi.cc @@ -557,7 +557,7 @@ int main( int argc, char * argv [] ){ return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/motif_tools/extract_motifs.cc b/source/src/apps/public/motif_tools/extract_motifs.cc index 4682a9d200..e1a5eb1c8b 100644 --- a/source/src/apps/public/motif_tools/extract_motifs.cc +++ b/source/src/apps/public/motif_tools/extract_motifs.cc @@ -542,7 +542,7 @@ main( int argc, char * argv [] ) motif_ostream.close(); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception" << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/motif_tools/incorporate_motifs.cc b/source/src/apps/public/motif_tools/incorporate_motifs.cc index 5edae18a78..9e98f136c8 100644 --- a/source/src/apps/public/motif_tools/incorporate_motifs.cc +++ b/source/src/apps/public/motif_tools/incorporate_motifs.cc @@ -205,7 +205,7 @@ main( int argc, char * argv [] ) find_close_motifs(); TR.flush(); return 0; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { TR << "caught exception" << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/mutate.cc b/source/src/apps/public/mutate.cc index 05ff627c3e..6a9caa4ac5 100644 --- a/source/src/apps/public/mutate.cc +++ b/source/src/apps/public/mutate.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include @@ -69,7 +69,7 @@ Pose read_pose() { // cry if PDB not given if ( ! option[OptionKeys::in::file::s].user() ) { - throw new utility::excn::EXCN_Msg_Exception("Please provide PDB file!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please provide PDB file!"); } // read in pose @@ -219,7 +219,7 @@ main( int argc, char * argv [] ) pose.dump_pdb( output ); } } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ncaa_utilities/MakeRotLib.cc b/source/src/apps/public/ncaa_utilities/MakeRotLib.cc index 7c46120bda..5941afdff8 100644 --- a/source/src/apps/public/ncaa_utilities/MakeRotLib.cc +++ b/source/src/apps/public/ncaa_utilities/MakeRotLib.cc @@ -44,7 +44,7 @@ main( int argc, char * argv [] ) << "| DONE |\n" << "+-----------------------------------------------------------------+" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ncaa_utilities/UnfoldedStateEnergyCalculator.cc b/source/src/apps/public/ncaa_utilities/UnfoldedStateEnergyCalculator.cc index e7292d902b..d5bdde0565 100644 --- a/source/src/apps/public/ncaa_utilities/UnfoldedStateEnergyCalculator.cc +++ b/source/src/apps/public/ncaa_utilities/UnfoldedStateEnergyCalculator.cc @@ -140,7 +140,7 @@ main( int argc, char* argv[] ) << "| DONE |\n" << "+-----------------------------------------------------------------+" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/ncaa_utilities/make_rot_lib.cc b/source/src/apps/public/ncaa_utilities/make_rot_lib.cc index aa4b93e463..9d5bbdeaf1 100644 --- a/source/src/apps/public/ncaa_utilities/make_rot_lib.cc +++ b/source/src/apps/public/ncaa_utilities/make_rot_lib.cc @@ -161,7 +161,7 @@ main( int argc, char * argv [] ) dunbrack_print( final_rotamers, centroids, aa_name ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/nmr/r_noe_assign.cc b/source/src/apps/public/nmr/r_noe_assign.cc index c3cab4702a..0e28dd9232 100644 --- a/source/src/apps/public/nmr/r_noe_assign.cc +++ b/source/src/apps/public/nmr/r_noe_assign.cc @@ -41,7 +41,7 @@ #include #include #include -#include +#include static basic::Tracer tr( "main" ); @@ -364,10 +364,10 @@ main( int argc, char * argv [] ) protocols::noesy_assign::PeakAssignmentParameters::get_instance(); try{ run(); - } catch ( utility::excn::EXCN_Base& anExcn ) { + } catch (utility::excn::Exception& anExcn ) { anExcn.show( std::cerr ); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/noncanonical_backbones/hbs_design.cc b/source/src/apps/public/noncanonical_backbones/hbs_design.cc index ea25d81002..c41d36bdf2 100644 --- a/source/src/apps/public/noncanonical_backbones/hbs_design.cc +++ b/source/src/apps/public/noncanonical_backbones/hbs_design.cc @@ -164,7 +164,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( OD_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/noncanonical_backbones/oop_design.cc b/source/src/apps/public/noncanonical_backbones/oop_design.cc index 5446022e08..2d6d9bbba7 100644 --- a/source/src/apps/public/noncanonical_backbones/oop_design.cc +++ b/source/src/apps/public/noncanonical_backbones/oop_design.cc @@ -175,7 +175,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( OD_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/noncanonical_backbones/peptoid_design.cc b/source/src/apps/public/noncanonical_backbones/peptoid_design.cc index 0731af26b2..23030c4533 100644 --- a/source/src/apps/public/noncanonical_backbones/peptoid_design.cc +++ b/source/src/apps/public/noncanonical_backbones/peptoid_design.cc @@ -167,7 +167,7 @@ main( int argc, char* argv[] ) //call job distributor protocols::jd2::JobDistributor::get_instance()->go( OD_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pH_protocol.cc b/source/src/apps/public/pH_protocol.cc index a1d000ea43..44b1ebd3dd 100644 --- a/source/src/apps/public/pH_protocol.cc +++ b/source/src/apps/public/pH_protocol.cc @@ -491,7 +491,7 @@ main( int argc, char * argv [] ) PhProtocolOP pH_test( new PhProtocol ); protocols::jd2::JobDistributor::get_instance()->go(pH_test); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "Caught Exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/packstat.cc b/source/src/apps/public/packstat.cc index 34a55bce82..995dd1c420 100644 --- a/source/src/apps/public/packstat.cc +++ b/source/src/apps/public/packstat.cc @@ -352,7 +352,7 @@ int main (int argc, char *argv[]) { } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pepspec/pepspec.cc b/source/src/apps/public/pepspec/pepspec.cc index 9c1b5d6dfe..d0027c3376 100644 --- a/source/src/apps/public/pepspec/pepspec.cc +++ b/source/src/apps/public/pepspec/pepspec.cc @@ -1979,7 +1979,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); TR.flush(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pepspec/pepspec_anchor_dock.cc b/source/src/apps/public/pepspec/pepspec_anchor_dock.cc index aa04ffd824..c468ca424a 100644 --- a/source/src/apps/public/pepspec/pepspec_anchor_dock.cc +++ b/source/src/apps/public/pepspec/pepspec_anchor_dock.cc @@ -1258,7 +1258,7 @@ int main( int argc, char * argv [] ) run_pep_prep(); TR.flush(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pocket/make_exemplar.cc b/source/src/apps/public/pocket/make_exemplar.cc index 9904e8fe50..9b4f5ea555 100644 --- a/source/src/apps/public/pocket/make_exemplar.cc +++ b/source/src/apps/public/pocket/make_exemplar.cc @@ -194,7 +194,7 @@ int main( int argc, char * argv [] ) { protocols::jd2::JobDistributor::get_instance()->go( protocol, jd2::JobOutputterOP( new jd2::NoOutputJobOutputter ) ); } -catch ( utility::excn::EXCN_Base const & e ) { +catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pocket/pocket_measure.cc b/source/src/apps/public/pocket/pocket_measure.cc index 644824cdf4..01bfb317d6 100644 --- a/source/src/apps/public/pocket/pocket_measure.cc +++ b/source/src/apps/public/pocket/pocket_measure.cc @@ -180,7 +180,7 @@ main( int argc, char * argv [] ) largest_pocket_score /= angles; std::cout << "Pocket score (unweighted) is: " << constraint_pocket_score << std::endl; std::cout << "Largest pocket score (unweighted) is: " << largest_pocket_score << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pocket/pocket_relax.cc b/source/src/apps/public/pocket/pocket_relax.cc index 552f6392a4..310f23e6c2 100644 --- a/source/src/apps/public/pocket/pocket_relax.cc +++ b/source/src/apps/public/pocket/pocket_relax.cc @@ -220,21 +220,21 @@ main( int argc, char * argv [] ) std::size_t fpos( resid.find(':') ); if ( fpos != std::string::npos ) { if ( fpos != resid.length() -2 || fpos == 0 ) { - throw(utility::excn::EXCN_BadInput(" invalid exemplar_target_pdb_num " + resid_c)); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " invalid exemplar_target_pdb_num " + resid_c)); } char chain = resid[resid.length() -1]; if ( !( (chain >='A' && chain <='Z') || (chain >='a' && chain <='z') ) ) { - throw(utility::excn::EXCN_BadInput(" invalid exemplar_target_pdb_num " + resid_c)); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " invalid exemplar_target_pdb_num " + resid_c)); } for ( int i = 0; i< (int) fpos; ++i ) { if ( !(resid[i] >='0' && resid[i] <='9') ) { - throw(utility::excn::EXCN_BadInput(" invalid exemplar_target_pdb_num " + resid_c)); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " invalid exemplar_target_pdb_num " + resid_c)); } } } else { for ( int i = 0; i< (int) resid.length(); ++i ) { if ( !(resid[i] >='0' && resid[i] <='9') ) { - throw(utility::excn::EXCN_BadInput(" invalid exemplar_target_pdb_num " + resid_c)); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, " invalid exemplar_target_pdb_num " + resid_c)); } } } @@ -309,7 +309,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( protocol ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/pocket/pocket_suggest_target_residues_by_ddg.cc b/source/src/apps/public/pocket/pocket_suggest_target_residues_by_ddg.cc index 7f1a147a67..a07f02503b 100644 --- a/source/src/apps/public/pocket/pocket_suggest_target_residues_by_ddg.cc +++ b/source/src/apps/public/pocket/pocket_suggest_target_residues_by_ddg.cc @@ -396,7 +396,7 @@ main( int argc, char * argv [] ) //fb.close(); //fb2.close(); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/recces/legacy/recces_turner.cc b/source/src/apps/public/recces/legacy/recces_turner.cc index 83b7e3942c..0ac2bc1259 100644 --- a/source/src/apps/public/recces/legacy/recces_turner.cc +++ b/source/src/apps/public/recces/legacy/recces_turner.cc @@ -95,7 +95,7 @@ main( int argc, char * argv [] ) devel::init ( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/recces/legacy/thermal_sampler.cc b/source/src/apps/public/recces/legacy/thermal_sampler.cc index 59f2fedab0..41a9d8544d 100644 --- a/source/src/apps/public/recces/legacy/thermal_sampler.cc +++ b/source/src/apps/public/recces/legacy/thermal_sampler.cc @@ -138,7 +138,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/recces/recces.cc b/source/src/apps/public/recces/recces.cc index 950513f878..a1abce9c55 100644 --- a/source/src/apps/public/recces/recces.cc +++ b/source/src/apps/public/recces/recces.cc @@ -88,7 +88,7 @@ main( int argc, char * argv [] ) devel::init ( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/relax.cc b/source/src/apps/public/relax.cc index c3fb40defe..b4d62f04b0 100644 --- a/source/src/apps/public/relax.cc +++ b/source/src/apps/public/relax.cc @@ -63,7 +63,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); return relax::Relax_main( false ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/remodel.cc b/source/src/apps/public/remodel.cc index f01e6e39aa..4906a218fb 100644 --- a/source/src/apps/public/remodel.cc +++ b/source/src/apps/public/remodel.cc @@ -447,7 +447,7 @@ int main( int argc, char * argv [] ) { // viewer_main() just calls graphics_main with the parameter NULL and returns 0 protocols::viewer::viewer_main( graphics_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/erraser/erraser_minimizer.cc b/source/src/apps/public/rna/erraser/erraser_minimizer.cc index bd0ed961c0..29cbc48d70 100644 --- a/source/src/apps/public/rna/erraser/erraser_minimizer.cc +++ b/source/src/apps/public/rna/erraser/erraser_minimizer.cc @@ -87,7 +87,7 @@ main ( int argc, char * argv [] ) { try { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/rna_denovo.cc b/source/src/apps/public/rna/rna_denovo.cc index 5aa8d6f31c..1c34ab1c33 100644 --- a/source/src/apps/public/rna/rna_denovo.cc +++ b/source/src/apps/public/rna/rna_denovo.cc @@ -187,7 +187,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/rna_design.cc b/source/src/apps/public/rna/rna_design.cc index e336fd2505..8c937db768 100644 --- a/source/src/apps/public/rna/rna_design.cc +++ b/source/src/apps/public/rna/rna_design.cc @@ -449,7 +449,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/thread/rna_thread.cc b/source/src/apps/public/rna/thread/rna_thread.cc index af009b6cec..2d0f118b25 100644 --- a/source/src/apps/public/rna/thread/rna_thread.cc +++ b/source/src/apps/public/rna/thread/rna_thread.cc @@ -425,7 +425,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/thread/rna_thread_and_minimize.cc b/source/src/apps/public/rna/thread/rna_thread_and_minimize.cc index 60e6642985..034737ca47 100644 --- a/source/src/apps/public/rna/thread/rna_thread_and_minimize.cc +++ b/source/src/apps/public/rna/thread/rna_thread_and_minimize.cc @@ -290,7 +290,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/analyze_base_pairing.cc b/source/src/apps/public/rna/util/analyze_base_pairing.cc index 56e12f709c..229b3b3a53 100644 --- a/source/src/apps/public/rna/util/analyze_base_pairing.cc +++ b/source/src/apps/public/rna/util/analyze_base_pairing.cc @@ -190,7 +190,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/cs_rosetta_rna.cc b/source/src/apps/public/rna/util/cs_rosetta_rna.cc index c920e15b72..91197604bb 100644 --- a/source/src/apps/public/rna/util/cs_rosetta_rna.cc +++ b/source/src/apps/public/rna/util/cs_rosetta_rna.cc @@ -388,7 +388,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/nucleobase_sample_around.cc b/source/src/apps/public/rna/util/nucleobase_sample_around.cc index fdbd7f8edd..ef1cfc9621 100644 --- a/source/src/apps/public/rna/util/nucleobase_sample_around.cc +++ b/source/src/apps/public/rna/util/nucleobase_sample_around.cc @@ -471,7 +471,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_cluster.cc b/source/src/apps/public/rna/util/rna_cluster.cc index 133409b57d..5d58401558 100644 --- a/source/src/apps/public/rna/util/rna_cluster.cc +++ b/source/src/apps/public/rna/util/rna_cluster.cc @@ -130,7 +130,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_database.cc b/source/src/apps/public/rna/util/rna_database.cc index 91e2c8073d..6ed1767b88 100644 --- a/source/src/apps/public/rna/util/rna_database.cc +++ b/source/src/apps/public/rna/util/rna_database.cc @@ -696,7 +696,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_extract.cc b/source/src/apps/public/rna/util/rna_extract.cc index 1642a3a540..eaaa2f7de0 100644 --- a/source/src/apps/public/rna/util/rna_extract.cc +++ b/source/src/apps/public/rna/util/rna_extract.cc @@ -151,7 +151,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_features.cc b/source/src/apps/public/rna/util/rna_features.cc index 3d64e2a80b..7c5b9a8233 100644 --- a/source/src/apps/public/rna/util/rna_features.cc +++ b/source/src/apps/public/rna/util/rna_features.cc @@ -445,7 +445,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_graft.cc b/source/src/apps/public/rna/util/rna_graft.cc index dee0a4c66a..2fe9a18256 100644 --- a/source/src/apps/public/rna/util/rna_graft.cc +++ b/source/src/apps/public/rna/util/rna_graft.cc @@ -479,7 +479,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_helix.cc b/source/src/apps/public/rna/util/rna_helix.cc index b3f0b22911..ca711f3c47 100644 --- a/source/src/apps/public/rna/util/rna_helix.cc +++ b/source/src/apps/public/rna/util/rna_helix.cc @@ -203,7 +203,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_idealize.cc b/source/src/apps/public/rna/util/rna_idealize.cc index 50097b8708..63d956badc 100644 --- a/source/src/apps/public/rna/util/rna_idealize.cc +++ b/source/src/apps/public/rna/util/rna_idealize.cc @@ -54,7 +54,7 @@ main ( int argc, char * argv [] ) { devel::init( argc, argv ); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_minimize.cc b/source/src/apps/public/rna/util/rna_minimize.cc index 54ef32e9db..425d72a1f2 100644 --- a/source/src/apps/public/rna/util/rna_minimize.cc +++ b/source/src/apps/public/rna/util/rna_minimize.cc @@ -324,7 +324,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_motif.cc b/source/src/apps/public/rna/util/rna_motif.cc index 9018677d5c..90cf2c98d6 100644 --- a/source/src/apps/public/rna/util/rna_motif.cc +++ b/source/src/apps/public/rna/util/rna_motif.cc @@ -193,7 +193,7 @@ main( int argc, char * argv [] ) devel::init(argc, argv); protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_predict_chem_map.cc b/source/src/apps/public/rna/util/rna_predict_chem_map.cc index 8395d433d6..e358629ffc 100644 --- a/source/src/apps/public/rna/util/rna_predict_chem_map.cc +++ b/source/src/apps/public/rna/util/rna_predict_chem_map.cc @@ -330,7 +330,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_score.cc b/source/src/apps/public/rna/util/rna_score.cc index 5cd58b1ed1..73ef3bcf1a 100644 --- a/source/src/apps/public/rna/util/rna_score.cc +++ b/source/src/apps/public/rna/util/rna_score.cc @@ -487,7 +487,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rna/util/rna_suitename.cc b/source/src/apps/public/rna/util/rna_suitename.cc index e58bfabe7d..bfa2af47f6 100644 --- a/source/src/apps/public/rna/util/rna_suitename.cc +++ b/source/src/apps/public/rna/util/rna_suitename.cc @@ -125,7 +125,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rosettaDNA/rosettaDNA.cc b/source/src/apps/public/rosettaDNA/rosettaDNA.cc index e10fae43c6..ac6d6d6805 100644 --- a/source/src/apps/public/rosettaDNA/rosettaDNA.cc +++ b/source/src/apps/public/rosettaDNA/rosettaDNA.cc @@ -65,7 +65,7 @@ main( int argc, char * argv [] ) try { devel::init( argc, argv ); viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rosetta_scripts/parse_rosetta_script.cc b/source/src/apps/public/rosetta_scripts/parse_rosetta_script.cc index 0a2232e463..e05e98e19a 100644 --- a/source/src/apps/public/rosetta_scripts/parse_rosetta_script.cc +++ b/source/src/apps/public/rosetta_scripts/parse_rosetta_script.cc @@ -38,7 +38,7 @@ #include #include -#include +#include #include // Tracer @@ -63,7 +63,7 @@ main( int argc, char * argv [] ) rs.generate_mover_and_apply_to_pose( *PoseOP( new Pose), option[ parser::protocol ].value()); TR << "Successfully constructed and initialized all objects specified in the " << option[ parser::protocol ]() << " script" << std::endl; - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { basic::Error() << "ERROR: Exception caught by parse_rosetta_script application:" << excn << std::endl; diff --git a/source/src/apps/public/rosetta_scripts/revert_design_to_native.cc b/source/src/apps/public/rosetta_scripts/revert_design_to_native.cc index 1d0c7a6a53..293e0f9dd4 100644 --- a/source/src/apps/public/rosetta_scripts/revert_design_to_native.cc +++ b/source/src/apps/public/rosetta_scripts/revert_design_to_native.cc @@ -114,7 +114,7 @@ main( int argc, char * argv [] ) } pose_des.dump_scored_pdb( des_fname+".revert.pdb", *scorefxn );//, *scorefxn ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/rosetta_scripts/rosetta_scripts.cc b/source/src/apps/public/rosetta_scripts/rosetta_scripts.cc index 737675a384..eaf863e7cd 100644 --- a/source/src/apps/public/rosetta_scripts/rosetta_scripts.cc +++ b/source/src/apps/public/rosetta_scripts/rosetta_scripts.cc @@ -41,7 +41,7 @@ #include #include -#include +#include #include @@ -110,7 +110,7 @@ main( int argc, char * argv [] ) #endif } } - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { basic::Error() << "Exception caught by rosetta_scripts application:" << excn << std::endl; diff --git a/source/src/apps/public/rosetta_scripts/validate_rosetta_script.cc b/source/src/apps/public/rosetta_scripts/validate_rosetta_script.cc index f2905ef1c1..0bb2b07256 100644 --- a/source/src/apps/public/rosetta_scripts/validate_rosetta_script.cc +++ b/source/src/apps/public/rosetta_scripts/validate_rosetta_script.cc @@ -36,7 +36,7 @@ #include #include -#include +#include #include // Tracer @@ -67,7 +67,7 @@ main( int argc, char * argv [] ) TR << "Successfully validated the " << option[ parser::protocol ].value() << " script" << std::endl; std::exit(0); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { basic::Error() << "ERROR: Exception caught by validate_rosetta_script application:" << excn << std::endl; diff --git a/source/src/apps/public/scenarios/FloppyTail.cc b/source/src/apps/public/scenarios/FloppyTail.cc index 7d9aa49697..995fe6fceb 100644 --- a/source/src/apps/public/scenarios/FloppyTail.cc +++ b/source/src/apps/public/scenarios/FloppyTail.cc @@ -32,7 +32,7 @@ int main( int argc, char* argv[] ) protocols::jd2::JobDistributor::get_instance()->go(protocols::moves::MoverOP( new protocols::floppy_tail::FloppyTailMover )); TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/beta_strand_homodimer_design/exposed_strand_finder.cc b/source/src/apps/public/scenarios/beta_strand_homodimer_design/exposed_strand_finder.cc index 2957ea1f56..32154adba3 100644 --- a/source/src/apps/public/scenarios/beta_strand_homodimer_design/exposed_strand_finder.cc +++ b/source/src/apps/public/scenarios/beta_strand_homodimer_design/exposed_strand_finder.cc @@ -17,7 +17,7 @@ // Utility headers #include #include -#include +#include #include #include // core headers @@ -679,7 +679,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new ExposedStrandMover ) ); std::cout << "Done! -------------------------------"<< std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_design.cc b/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_design.cc index 58cde70e97..924d5c4c69 100644 --- a/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_design.cc +++ b/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_design.cc @@ -573,7 +573,7 @@ main( int argc, char * argv [] ) protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new HDdesignMover ) ); std::cout << "Done! -------------------------------"<< std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_maker.cc b/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_maker.cc index d7c9086bf8..e0fbc01e59 100644 --- a/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_maker.cc +++ b/source/src/apps/public/scenarios/beta_strand_homodimer_design/homodimer_maker.cc @@ -499,7 +499,7 @@ main( int argc, char* argv[] ) { protocols::jd2::JobDistributor::get_instance()->go( protocols::moves::MoverOP( new HDmakerMover ) ); TR<< "Complete." << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/ca_to_allatom.cc b/source/src/apps/public/scenarios/ca_to_allatom.cc index 2f6ca764be..7f18dd1ac7 100644 --- a/source/src/apps/public/scenarios/ca_to_allatom.cc +++ b/source/src/apps/public/scenarios/ca_to_allatom.cc @@ -320,7 +320,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); protocols::viewer::viewer_main( ca_to_allatom_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_E2_thioester.cc b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_E2_thioester.cc index 7a235e9c68..bdf16d0249 100644 --- a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_E2_thioester.cc +++ b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_E2_thioester.cc @@ -880,7 +880,7 @@ int main( int argc, char* argv[] ) basic::prof_show(); TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_CYD-CYD.cc b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_CYD-CYD.cc index cdf233fdca..5252bc5f72 100644 --- a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_CYD-CYD.cc +++ b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_CYD-CYD.cc @@ -744,7 +744,7 @@ int main( int argc, char* argv[] ) basic::prof_show(); TR << "NOTE on interpreting results: the interface energies are somewhat broken due to there being a disulfide across the interface; the bond is still scored in the separated state, which leads to enormously bad bond-length energies. This biases by about 6000 energy units. Relative ranking (which is all you should do anyway) is still correct." << std::endl; TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_LYX-Cterm.cc b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_LYX-Cterm.cc index ddb0fae72c..b0fbdf1817 100644 --- a/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_LYX-Cterm.cc +++ b/source/src/apps/public/scenarios/chemically_conjugated_docking/UBQ_Gp_LYX-Cterm.cc @@ -734,7 +734,7 @@ int main( int argc, char* argv[] ) basic::prof_show(); TR << "************************d**o**n**e**************************************" << std::endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/scenarios/doug_dock_design_min_mod2_cal_cal.cc b/source/src/apps/public/scenarios/doug_dock_design_min_mod2_cal_cal.cc index 69e506a072..009e5498c6 100644 --- a/source/src/apps/public/scenarios/doug_dock_design_min_mod2_cal_cal.cc +++ b/source/src/apps/public/scenarios/doug_dock_design_min_mod2_cal_cal.cc @@ -244,7 +244,7 @@ main( int argc, char* argv[] ) // create job distributor protocols::jd2::JobDistributor::get_instance()->go( D3DM ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/sequence_tolerance.cc b/source/src/apps/public/sequence_tolerance.cc index 0971b89922..6297e7d805 100644 --- a/source/src/apps/public/sequence_tolerance.cc +++ b/source/src/apps/public/sequence_tolerance.cc @@ -106,7 +106,7 @@ main( int argc, char * argv[] ) NEW_OPT(seq_tol::surface, "calculate the the surface score", false); devel::init( argc, argv ); protocols::viewer::viewer_main( sequence_tolerance_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/build_full_model.cc b/source/src/apps/public/stepwise/build_full_model.cc index 1db3efe687..142d8b66fb 100644 --- a/source/src/apps/public/stepwise/build_full_model.cc +++ b/source/src/apps/public/stepwise/build_full_model.cc @@ -545,7 +545,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/legacy/swa_protein_main.cc b/source/src/apps/public/stepwise/legacy/swa_protein_main.cc index bdc7b4aa10..2080b746f3 100644 --- a/source/src/apps/public/stepwise/legacy/swa_protein_main.cc +++ b/source/src/apps/public/stepwise/legacy/swa_protein_main.cc @@ -516,7 +516,7 @@ main( int argc, char * argv [] ) // end of setup //////////////////////////////////////////////////////////////////////////// - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/legacy/swa_rna_main.cc b/source/src/apps/public/stepwise/legacy/swa_rna_main.cc index a3da47baa8..1cab094eab 100644 --- a/source/src/apps/public/stepwise/legacy/swa_rna_main.cc +++ b/source/src/apps/public/stepwise/legacy/swa_rna_main.cc @@ -941,7 +941,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/legacy/swa_rna_util.cc b/source/src/apps/public/stepwise/legacy/swa_rna_util.cc index 71ac64d163..770d291fa6 100644 --- a/source/src/apps/public/stepwise/legacy/swa_rna_util.cc +++ b/source/src/apps/public/stepwise/legacy/swa_rna_util.cc @@ -1543,7 +1543,7 @@ main( int argc, char * argv [] ) //////////////////////////////////////////////////////////////////////////// protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/resample_full_model.cc b/source/src/apps/public/stepwise/resample_full_model.cc index 8d546f42e9..0837cea141 100644 --- a/source/src/apps/public/stepwise/resample_full_model.cc +++ b/source/src/apps/public/stepwise/resample_full_model.cc @@ -189,7 +189,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); exit( 0 ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/stepwise/stepwise.cc b/source/src/apps/public/stepwise/stepwise.cc index 0aabfe5a13..a7fe3747ba 100644 --- a/source/src/apps/public/stepwise/stepwise.cc +++ b/source/src/apps/public/stepwise/stepwise.cc @@ -409,7 +409,7 @@ main( int argc, char * argv [] ) protocols::viewer::viewer_main( my_main ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/struc_set_fragment_picker.cc b/source/src/apps/public/struc_set_fragment_picker.cc index cd5264c3ad..8f85acf03a 100644 --- a/source/src/apps/public/struc_set_fragment_picker.cc +++ b/source/src/apps/public/struc_set_fragment_picker.cc @@ -150,7 +150,7 @@ main( int argc, char * argv [] ) devel::init( argc, argv ); main_local(nullptr); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { std::cerr << "Exception caught: " << std::endl; excn.show( std::cerr ); std::cerr.flush(); diff --git a/source/src/apps/public/surface_docking/surface_docking.cc b/source/src/apps/public/surface_docking/surface_docking.cc index adbfdc18cf..39e3f62764 100644 --- a/source/src/apps/public/surface_docking/surface_docking.cc +++ b/source/src/apps/public/surface_docking/surface_docking.cc @@ -35,7 +35,7 @@ main( int argc, char * argv [] ) SurfaceDockingProtocolOP dp( new SurfaceDockingProtocol() ); JobDistributor::get_instance()->go(dp); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/vip.cc b/source/src/apps/public/vip.cc index adc99fc01d..20a3f98714 100644 --- a/source/src/apps/public/vip.cc +++ b/source/src/apps/public/vip.cc @@ -178,7 +178,7 @@ main( int argc, char * argv [] ) } out_pose.dump_pdb( option[ cp::output ] ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/weight_optimization/optE_parallel.cc b/source/src/apps/public/weight_optimization/optE_parallel.cc index 3684370817..7efb85c701 100644 --- a/source/src/apps/public/weight_optimization/optE_parallel.cc +++ b/source/src/apps/public/weight_optimization/optE_parallel.cc @@ -40,7 +40,7 @@ main( int argc, char * argv [] ) #ifdef USEMPI MPI_Finalize(); #endif - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/public/weight_optimization/torsional_potential_corrections.cc b/source/src/apps/public/weight_optimization/torsional_potential_corrections.cc index 92dff864fd..735e4b68e8 100644 --- a/source/src/apps/public/weight_optimization/torsional_potential_corrections.cc +++ b/source/src/apps/public/weight_optimization/torsional_potential_corrections.cc @@ -1589,7 +1589,7 @@ main( int argc, char * argv [] ) { correct_rama(); } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/tests/test_C-terminal_conjugation.cc b/source/src/apps/tests/test_C-terminal_conjugation.cc index b854d6b552..584619d37f 100644 --- a/source/src/apps/tests/test_C-terminal_conjugation.cc +++ b/source/src/apps/tests/test_C-terminal_conjugation.cc @@ -104,7 +104,7 @@ main( int argc, char *argv[] ) conjugated_pose3.dump_pdb( OUTPATH + "S-linked_Ubi_peptide.pdb" ); O_linked_glycan_pose.dump_pdb( OUTPATH + "O-linked_glycopeptide.pdb" ); O_linked_centroid_glycan_pose.dump_pdb( OUTPATH + "O-linked_centroid_glycopeptide.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "caught exception " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_CCD_loop_closure.cc b/source/src/apps/tests/test_CCD_loop_closure.cc index 4009e60132..119963762d 100644 --- a/source/src/apps/tests/test_CCD_loop_closure.cc +++ b/source/src/apps/tests/test_CCD_loop_closure.cc @@ -206,7 +206,7 @@ main( int argc, char *argv[] ) cout << "------------------------------------------------------------------------------" << endl; cout << "Done!" << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_CarbohydrateInfo.cc b/source/src/apps/tests/test_CarbohydrateInfo.cc index bb6784f4b3..ca29e1b015 100644 --- a/source/src/apps/tests/test_CarbohydrateInfo.cc +++ b/source/src/apps/tests/test_CarbohydrateInfo.cc @@ -333,7 +333,7 @@ main( int argc, char *argv[] ) pose_from_file( bad_pdb, PATH + "pdb_w_bad_links.pdb", PDB_file ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_EnergyMethodOptions.cc b/source/src/apps/tests/test_EnergyMethodOptions.cc index deb3a11e7c..4dda8fa035 100644 --- a/source/src/apps/tests/test_EnergyMethodOptions.cc +++ b/source/src/apps/tests/test_EnergyMethodOptions.cc @@ -36,7 +36,7 @@ main( int argc, char * argv [] ) core::scoring::methods::EnergyMethodOptions emo; emo.show( std::cout ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { std::cout << "caught exception " << e.msg() << std::endl; return -1; } diff --git a/source/src/apps/tests/test_RingConformationMover.cc b/source/src/apps/tests/test_RingConformationMover.cc index 21cf5d8326..9dfdc9d87e 100644 --- a/source/src/apps/tests/test_RingConformationMover.cc +++ b/source/src/apps/tests/test_RingConformationMover.cc @@ -37,7 +37,7 @@ int main( int argc, char *argv[] ) // Distribute the mover. JobDistributor::get_instance()->go( my_mover ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_SiteConstraint.cc b/source/src/apps/tests/test_SiteConstraint.cc index 3aaab82e0c..6c880f54c9 100644 --- a/source/src/apps/tests/test_SiteConstraint.cc +++ b/source/src/apps/tests/test_SiteConstraint.cc @@ -49,7 +49,7 @@ main( int argc, char *argv[] ) constraint_setter.constraint_file( PATH + "glycan_to_protein_and_glycan.cst" ); constraint_setter.apply( in_pose ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_carbohydrate_scoring.cc b/source/src/apps/tests/test_carbohydrate_scoring.cc index 5b453b4a40..6200ecb105 100644 --- a/source/src/apps/tests/test_carbohydrate_scoring.cc +++ b/source/src/apps/tests/test_carbohydrate_scoring.cc @@ -359,7 +359,7 @@ main( int argc, char *argv[] ) cout << "(The minimized angles should be close to 75/NA.)" << endl; - } catch ( excn::EXCN_Base const & e ) { + } catch (excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_explicit_membrane_input.cc b/source/src/apps/tests/test_explicit_membrane_input.cc index 8eea8273c9..ac853ea2d1 100644 --- a/source/src/apps/tests/test_explicit_membrane_input.cc +++ b/source/src/apps/tests/test_explicit_membrane_input.cc @@ -95,7 +95,7 @@ main( int argc, char *argv[] ) cout << "---------------------------------------------------------------------------------------------" << endl; - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "Caught exception: " << e.msg() << endl; return -1; } diff --git a/source/src/apps/tests/test_non-canonical_connectivities.cc b/source/src/apps/tests/test_non-canonical_connectivities.cc index 205ac93061..df8df17814 100644 --- a/source/src/apps/tests/test_non-canonical_connectivities.cc +++ b/source/src/apps/tests/test_non-canonical_connectivities.cc @@ -53,7 +53,7 @@ main( int argc, char *argv[] ) cout << "11: " << lactam.residue( 11 ).name() << endl; lactam.dump_pdb( OUTPATH + "lactam.pdb" ); - } catch ( utility::excn::EXCN_Base const & e ) { + } catch (utility::excn::Exception const & e ) { cerr << "caught exception " << e.msg() << endl; return -1; } diff --git a/source/src/basic/database/DatabaseSessionLoader.cc b/source/src/basic/database/DatabaseSessionLoader.cc index 8ca6269654..0d09bd89f0 100644 --- a/source/src/basic/database/DatabaseSessionLoader.cc +++ b/source/src/basic/database/DatabaseSessionLoader.cc @@ -35,7 +35,7 @@ DatabaseSessionLoader::create_resource( std::istream & /*istream*/ ) const { if ( ! dynamic_cast< DatabaseSessionOptions const * > ( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( "DatabaseSessionLoader expected to be given a DatabaseSessionOptions object, " \ + throw CREATE_EXCEPTION(utility::excn::Exception, "DatabaseSessionLoader expected to be given a DatabaseSessionOptions object, " \ "but was given a non-DatabaseSessionOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." ); } DatabaseSessionOptions const & database_options = static_cast< DatabaseSessionOptions const & > ( options ); diff --git a/source/src/basic/database/open.cc b/source/src/basic/database/open.cc index 42b6b7a378..275faf9da0 100644 --- a/source/src/basic/database/open.cc +++ b/source/src/basic/database/open.cc @@ -61,7 +61,7 @@ open( db_stream.clear(); } if ( db_file.length() == 0 ) { - throw EXCN_Msg_Exception("Unable to open database file ''"); + throw CREATE_EXCEPTION(Exception, "Unable to open database file ''"); return false; } @@ -74,7 +74,7 @@ open( std::stringstream err_msg; err_msg << "Database file open failed for: \"" << db_file << "\"" << std::endl; - throw EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(Exception, err_msg.str()); #ifdef __native_client__ throw( "ERROR: Database file open failed for: " + db_file ); diff --git a/source/src/basic/database/sql_utils.cc b/source/src/basic/database/sql_utils.cc index b5009a8d88..87fe1820c5 100644 --- a/source/src/basic/database/sql_utils.cc +++ b/source/src/basic/database/sql_utils.cc @@ -745,9 +745,9 @@ parse_database_connection( if ( tag->hasOption("database_resource") ) { std::string database_resource = tag->getOption("database_resource"); if ( ! ResourceManager::get_instance()->has_resource_with_description( database_resource ) ) { - throw utility::excn::EXCN_Msg_Exception - ( "You specified a database_resource of '" + database_resource + - "', but the ResourceManager doesn't have a resource with that description." ); + throw CREATE_EXCEPTION(utility::excn::Exception, + "You specified a database_resource of '" + database_resource + + "', but the ResourceManager doesn't have a resource with that description." ); } return get_resource< utility::sql_database::session >( database_resource ); } @@ -757,9 +757,9 @@ parse_database_connection( "database_resource_tag"); if ( ! ResourceManager::get_instance()->has_resource( database_resource_tag ) ) { - throw utility::excn::EXCN_Msg_Exception - ( "You specified a database_resource_tag of '" + database_resource_tag + - "', but the ResourceManager doesn't have a resource with that tag." ); + throw CREATE_EXCEPTION(utility::excn::Exception, + "You specified a database_resource_tag of '" + database_resource_tag + + "', but the ResourceManager doesn't have a resource with that tag." ); } utility::sql_database::sessionOP db_session(utility::pointer::dynamic_pointer_cast< utility::sql_database::session > ( ResourceManager::get_instance()->find_resource(database_resource_tag))); @@ -767,7 +767,7 @@ parse_database_connection( stringstream err_msg; err_msg << "You specified a database_resource_tag of '" + database_resource_tag + "', while the ResourceManager does have a resource with that tag, it couldn't cast into a database session."; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } return db_session; } diff --git a/source/src/basic/datacache/ConstDataMap.hh b/source/src/basic/datacache/ConstDataMap.hh index c7e8d82f25..2ffe53b0d4 100644 --- a/source/src/basic/datacache/ConstDataMap.hh +++ b/source/src/basic/datacache/ConstDataMap.hh @@ -128,7 +128,7 @@ ConstDataMap::get( std::string const & type, std::string const & name ) const { if ( !has( type, name ) ) { std::stringstream error_message; error_message << "ERROR: Could not find "<second ); @@ -137,7 +137,7 @@ ConstDataMap::get( std::string const & type, std::string const & name ) const { if ( ! data_ptr ) { std::stringstream error_message; error_message << "Dynamic_cast failed for type " << type << " and name "<second ); @@ -165,7 +165,7 @@ ConstDataMap::get_ptr( std::string const & type, std::string const & name ) cons if ( ! data_ptr ) { std::stringstream error_message; error_message << "Dynamic_cast failed for type " << type << " and name "< const dm( data_map_.find( type )->second ); @@ -104,7 +104,7 @@ DataMap::get( std::string const & type, std::string const & name ) const { if ( ret==0 ) { std::stringstream error_message; error_message << "ERROR: Dynamic_cast failed for type "< const dm( data_map_.find( type )->second ); @@ -136,7 +136,7 @@ DataMap::get_ptr( std::string const & type, std::string const & name ) const { if ( ret==0 ) { std::stringstream error_message; error_message << "ERROR: Dynamic_cast failed for type "<keyname(); if ( data_creator_map_.find( data_type ) != data_creator_map_.end() ) { - throw utility::excn::EXCN_BadInput("WriteableCacheableData::factory_register already has a WriteableCachableData creator with name '" + throw CREATE_EXCEPTION(utility::excn::BadInput, "WriteableCacheableData::factory_register already has a WriteableCachableData creator with name '" + data_type + "'. Conflicting WriteableCacheableData names" ); } @@ -60,10 +60,10 @@ WriteableCacheableDataFactory::new_data_instance( std::string const & data_type, } tr.Error << std::endl; - throw utility::excn::EXCN_BadInput( "Unregistered WriteableCacheableData type '" + throw CREATE_EXCEPTION(utility::excn::BadInput, "Unregistered WriteableCacheableData type '" + data_type + "'." ); } else if ( ! iter->second ) { - throw utility::excn::EXCN_BadInput( "WriteableCacheableDataCreatorOP prototype for " + throw CREATE_EXCEPTION(utility::excn::BadInput, "WriteableCacheableDataCreatorOP prototype for " + data_type + " was not registered as NULL." ); } diff --git a/source/src/basic/options/util.cc b/source/src/basic/options/util.cc index f985752d0f..a265c4237b 100644 --- a/source/src/basic/options/util.cc +++ b/source/src/basic/options/util.cc @@ -190,7 +190,7 @@ add_anonymous_option( } else if ( dynamic_cast< ResidueChainVectorOptionKey const * > ( &key ) ) { options.add( dynamic_cast< ResidueChainVectorOptionKey const & > ( key ), "" ); } else { - throw utility::excn::EXCN_Msg_Exception( "Failed to add an anonymous option to an option collection: " + key.id() ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to add an anonymous option to an option collection: " + key.id() ); } } diff --git a/source/src/basic/resource_manager/FallbackConfigurationFactory.cc b/source/src/basic/resource_manager/FallbackConfigurationFactory.cc index 2fbbc7320f..a5decd7bb9 100644 --- a/source/src/basic/resource_manager/FallbackConfigurationFactory.cc +++ b/source/src/basic/resource_manager/FallbackConfigurationFactory.cc @@ -34,7 +34,7 @@ FallbackConfigurationFactory::create_fallback_configuration( std::string const & { auto iter = creators_map_.find( resource_description ); if ( iter == creators_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "No FallbackConfigurationCreator resposible for the FallbackConfiguration named " + resource_description + " was found in the FallbackConfigurationFactory. Was it correctly registered?" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No FallbackConfigurationCreator resposible for the FallbackConfiguration named " + resource_description + " was found in the FallbackConfigurationFactory. Was it correctly registered?" ); } return iter->second->create_fallback_configuration(); } @@ -48,7 +48,7 @@ FallbackConfigurationFactory::factory_register( FallbackConfigurationCreatorOP c std::string errmsg( "Double registration of a FallbackConfigurationCreator in the FallbackConfigurationFactory, named " + resource_description + ". Are there two registrators for this FallbackConfigurationCreator, or have you chosen a previously assigned name to a new FallbackConfigurationCreator?" ); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( errmsg ); + throw CREATE_EXCEPTION(utility::excn::Exception, errmsg ); } else { utility_exit_with_message( errmsg ); } diff --git a/source/src/basic/resource_manager/JobOptions.cc b/source/src/basic/resource_manager/JobOptions.cc index f8ff397107..d7e99810bd 100644 --- a/source/src/basic/resource_manager/JobOptions.cc +++ b/source/src/basic/resource_manager/JobOptions.cc @@ -50,7 +50,7 @@ using utility::options::RealOptionKey; using utility::options::RealVectorOptionKey; using utility::options::StringOptionKey; using utility::options::StringVectorOptionKey; -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; using utility::file::FileName; using utility::file::PathName; using utility::vector1; @@ -191,7 +191,7 @@ get_option_from_map( std::map< T, S > const & option_map, T const & key, char co { auto iter = option_map.find( key ); if ( iter == option_map.end() ) { - throw EXCN_Msg_Exception( std::string( option_class_name ) + "'" + key.identifier() + "' not found in JobOptions"); + throw CREATE_EXCEPTION(Exception, std::string( option_class_name ) + "'" + key.identifier() + "' not found in JobOptions"); } return iter->second; } diff --git a/source/src/basic/resource_manager/LazyResourceManager.cc b/source/src/basic/resource_manager/LazyResourceManager.cc index 9f51711c4f..e50b45d0ea 100644 --- a/source/src/basic/resource_manager/LazyResourceManager.cc +++ b/source/src/basic/resource_manager/LazyResourceManager.cc @@ -285,7 +285,7 @@ LazyResourceManager::add_resource_configuration( ) { ResourceConfigurationMap::const_iterator config( resource_configurations_.find( resource_tag )); if ( config != resource_configurations_.end() ) { - throw utility::excn::EXCN_Msg_Exception("Attempting to add multiple resource configurations with the resource tag '" + resource_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Attempting to add multiple resource configurations with the resource tag '" + resource_tag + "'."); } resource_configurations_[ resource_tag ] = resource_configuration; } @@ -297,7 +297,7 @@ LazyResourceManager::add_resource_locator( ) { ResourceLocatorsMap::const_iterator locator( resource_locators_.find( locator_tag )); if ( locator != resource_locators_.end() ) { - throw utility::excn::EXCN_Msg_Exception("Attempting to add multiple resource locators with the locator tag '" + locator_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Attempting to add multiple resource locators with the locator tag '" + locator_tag + "'."); } resource_locators_[ locator_tag ] = resource_locator; } @@ -310,7 +310,7 @@ LazyResourceManager::add_resource_options( ) { ResourceOptionsMap::const_iterator options( resource_options_.find( resource_options_tag )); if ( options != resource_options_.end() ) { - throw utility::excn::EXCN_Msg_Exception("Attempting to add multiple resource options with the resource optiosn tag '" + resource_options_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Attempting to add multiple resource options with the resource optiosn tag '" + resource_options_tag + "'."); } resource_options_[ resource_options_tag ] = resource_options; } @@ -327,7 +327,7 @@ LazyResourceManager::find_resource_configuration( auto config( resource_configurations_.find(resource_tag)); if ( config == resource_configurations_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to find resource configuration for the resource tag '" + resource_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find resource configuration for the resource tag '" + resource_tag + "'."); } return config->second; } @@ -339,7 +339,7 @@ LazyResourceManager::find_resource_locator( auto resource_locator( resource_locators_.find(locator_tag)); if ( resource_locator == resource_locators_.end() ) { - throw utility::excn::EXCN_Msg_Exception("Unable to find resource locator for the locator tag '" + locator_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find resource locator for the locator tag '" + locator_tag + "'."); } return resource_locator->second; } @@ -351,7 +351,7 @@ LazyResourceManager::find_resource_options( auto resource_options( resource_options_.find(options_tag)); if ( resource_options == resource_options_.end() ) { - throw utility::excn::EXCN_Msg_Exception("Unable to find resource options for the resource options tag '" + options_tag + "'."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find resource options for the resource options tag '" + options_tag + "'."); } return resource_options->second; } diff --git a/source/src/basic/resource_manager/ResourceLoaderFactory.cc b/source/src/basic/resource_manager/ResourceLoaderFactory.cc index 73b182fea2..75b8139bee 100644 --- a/source/src/basic/resource_manager/ResourceLoaderFactory.cc +++ b/source/src/basic/resource_manager/ResourceLoaderFactory.cc @@ -38,7 +38,7 @@ ResourceLoaderFactory::create_resource_loader( { auto iter = creator_map_.find( loader_type ); if ( iter == creator_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "No ResourceLoaderCreator resposible for the ResourceLoader named " + loader_type + " was found in the ResourceLoaderFactory. Was it correctly registered?" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No ResourceLoaderCreator resposible for the ResourceLoader named " + loader_type + " was found in the ResourceLoaderFactory. Was it correctly registered?" ); } return iter->second->create_resource_loader(); } @@ -70,7 +70,7 @@ ResourceLoaderFactory::factory_register( ResourceLoaderCreatorOP creator ) if ( iter != creator_map_.end() ) { std::string errmsg("Double registration of a ResourceLoaderCreator in the ResourceLoaderFactory, named " + loader_type + ". Are there two registrators for this ResourceLoader object, or have you chosen a previously assigned name to a new resource option?" ); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( errmsg ); + throw CREATE_EXCEPTION(utility::excn::Exception, errmsg ); } else { utility_exit_with_message( errmsg ); } diff --git a/source/src/basic/resource_manager/ResourceLocatorFactory.cc b/source/src/basic/resource_manager/ResourceLocatorFactory.cc index 45874d52ce..369924abdd 100644 --- a/source/src/basic/resource_manager/ResourceLocatorFactory.cc +++ b/source/src/basic/resource_manager/ResourceLocatorFactory.cc @@ -41,7 +41,7 @@ ResourceLocatorFactory::create_resource_locator( { auto iter = creator_map_.find( locator_type ); if ( iter == creator_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "No ResourceLocatorCreator resposible for the ResourceLocator named " + locator_type + " was found in the ResourceLocatorFactory. Was it correctly registered?" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No ResourceLocatorCreator resposible for the ResourceLocator named " + locator_type + " was found in the ResourceLocatorFactory. Was it correctly registered?" ); } ResourceLocatorOP locator = iter->second->create_resource_locator(); locator->locator_tag( locator_tag ); @@ -59,7 +59,7 @@ ResourceLocatorFactory::factory_register( ResourceLocatorCreatorOP creator ) if ( iter != creator_map_.end() ) { std::string errmsg( "Double registration of a ResourceLocatorCreator in the ResourceLocatorFactory, named " + locator_type + ". Are there two registrators for this options object, or have you chosen a previously assigned name to a new resource option?" ); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( errmsg ); + throw CREATE_EXCEPTION(utility::excn::Exception, errmsg ); } else { utility_exit_with_message( errmsg ); } diff --git a/source/src/basic/resource_manager/ResourceManagerFactory.cc b/source/src/basic/resource_manager/ResourceManagerFactory.cc index 8573cc683e..3b9ef67da3 100644 --- a/source/src/basic/resource_manager/ResourceManagerFactory.cc +++ b/source/src/basic/resource_manager/ResourceManagerFactory.cc @@ -49,7 +49,7 @@ ResourceManagerFactory::factory_register( ResourceManagerCreatorOP creator ) std::string manager_type = creator->manager_type(); std::map< std::string, ResourceManagerCreatorOP >::const_iterator iter = creators_map_.find( manager_type ); if ( iter != creators_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Double registration of a ResourceManagerCreator in the ResourceManagerFactory, named " + manager_type + ". Are there two registrators for this ResourceManager, or have you chosen a previously assigned name to a new ResourceManager?" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Double registration of a ResourceManagerCreator in the ResourceManagerFactory, named " + manager_type + ". Are there two registrators for this ResourceManager, or have you chosen a previously assigned name to a new ResourceManager?" ); } creators_map_[ manager_type ] = creator; } diff --git a/source/src/basic/resource_manager/ResourceOptionsFactory.cc b/source/src/basic/resource_manager/ResourceOptionsFactory.cc index 6fd2786f9e..300d348716 100644 --- a/source/src/basic/resource_manager/ResourceOptionsFactory.cc +++ b/source/src/basic/resource_manager/ResourceOptionsFactory.cc @@ -53,7 +53,7 @@ ResourceOptionsFactory::create_resource_options( error_msg << "\t" << type.first << std::endl; } - throw utility::excn::EXCN_Msg_Exception(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str()); } ResourceOptionsOP resource_options = (*iter).second->create_options(); resource_options->parse_my_tag( tag ); @@ -68,7 +68,7 @@ ResourceOptionsFactory::factory_register( ResourceOptionsCreatorOP creator ) if ( iter != creator_map_.end() ) { std::string errmsg( "Double registration of a ResourceOptionsCreator in the ResourceOptionsFactory, named " + options_type + ". Are there two registrators for this options object, or have you chosen a previously assigned name to a new resource option?" ); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( errmsg ); + throw CREATE_EXCEPTION(utility::excn::Exception, errmsg ); } else { utility_exit_with_message( errmsg ); } diff --git a/source/src/basic/resource_manager/locator/DatabaseResourceLocator.cc b/source/src/basic/resource_manager/locator/DatabaseResourceLocator.cc index f9d52f17f3..1510b0037a 100644 --- a/source/src/basic/resource_manager/locator/DatabaseResourceLocator.cc +++ b/source/src/basic/resource_manager/locator/DatabaseResourceLocator.cc @@ -120,7 +120,7 @@ DatabaseResourceLocator::locate_resource_stream( << "because the resource tag given for the database session, " << "'" << database_session_resource_tag_ << "' " << "does not exist in the ResourceManager."; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } sessionOP db_session(utility::pointer::dynamic_pointer_cast< session > ( @@ -135,7 +135,7 @@ DatabaseResourceLocator::locate_resource_stream( << "because the resource given for the database session tag, " << "'" << database_session_resource_tag_ << "' " << "could is not a DatabaseResourceLocator."; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } statement select_stmt(safely_prepare_statement(sql_command_, db_session)); @@ -148,7 +148,7 @@ DatabaseResourceLocator::locate_resource_stream( << "In the DatabaseLocator with tag '" << locator_tag() << "', the query:" << endl << sql_command_ << endl << "with parameter '?' <- '" << locator_id << "' returned no rows." << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } @@ -158,7 +158,7 @@ DatabaseResourceLocator::locate_resource_stream( << "In the DatabaseLocator with tag '" << locator_tag() << "', the query:" << endl << sql_command_ << endl << "with parameter '?' <- '" << locator_id << "' returned '" << res.cols() << "' columns." << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } stringstream concatenated_result; @@ -177,7 +177,7 @@ DatabaseResourceLocator::locate_resource_stream( << "In the DatabaseLocator with tag '" << locator_tag() << "', the query:" << endl << sql_command_ << endl << "with parameter '?' <- '" << locator_id << "' returned more than on row." << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } @@ -193,16 +193,16 @@ DatabaseResourceLocator::parse_my_tag( if ( tag->hasOption("database_session_tag") ) { database_session_resource_tag_ = tag->getOption("database_session_tag"); } else { - throw utility::excn::EXCN_Msg_Exception - ( "The DatabaseResourceLocator requires a 'database_session_tag' that corresponds with a 'DatabaseSession' resource defined in a block."); + throw CREATE_EXCEPTION(utility::excn::Exception, + "The DatabaseResourceLocator requires a 'database_session_tag' that corresponds with a 'DatabaseSession' resource defined in a block."); } if ( tag->hasOption("sql_command") ) { sql_command_ = tag->getOption("sql_command"); basic::database::check_statement_sanity(sql_command_); } else { - throw utility::excn::EXCN_Msg_Exception ( - "The DatabaseResourceLocator requires a 'sql_command' tag that is an SQL SELECT statement with one parameter '?' and as a key returns a result set with a single column and and a single row containing the data."); + throw CREATE_EXCEPTION(utility::excn::Exception, + "The DatabaseResourceLocator requires a 'sql_command' tag that is an SQL SELECT statement with one parameter '?' and as a key returns a result set with a single column and and a single row containing the data."); } column_separator_ = tag->getOption("column_separator", "\n"); diff --git a/source/src/basic/resource_manager/locator/FileSystemResourceLocator.cc b/source/src/basic/resource_manager/locator/FileSystemResourceLocator.cc index f1efe2b0b4..902615ec80 100644 --- a/source/src/basic/resource_manager/locator/FileSystemResourceLocator.cc +++ b/source/src/basic/resource_manager/locator/FileSystemResourceLocator.cc @@ -98,7 +98,7 @@ FileStream::FileStream( TR << "\t" << *p << filename << ".gz" << endl; } } - throw utility::excn::EXCN_FileNotFound(filename); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, filename); } } @@ -111,7 +111,7 @@ FileStream::open( ) { stream_.open(filename, open_mode); if ( !stream_ ) { - throw utility::excn::EXCN_FileNotFound(filename); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, filename); } } diff --git a/source/src/basic/resource_manager/util.hh b/source/src/basic/resource_manager/util.hh index e040601cd6..35c1d5b2f1 100644 --- a/source/src/basic/resource_manager/util.hh +++ b/source/src/basic/resource_manager/util.hh @@ -45,7 +45,7 @@ get_resource( err_msg << "The '" << resource_description << "' " << "cannot be cast to the given type."; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } return resource; } diff --git a/source/src/core/chemical/PatchOperation.cc b/source/src/core/chemical/PatchOperation.cc index 3bbb6e7067..f321ac2f1f 100644 --- a/source/src/core/chemical/PatchOperation.cc +++ b/source/src/core/chemical/PatchOperation.cc @@ -922,7 +922,7 @@ ChangeAncestory::apply( ResidueType & rsd ) const pa = which_ancestor_ == anc_parent ? ICoorAtomID( ancestor_name_, rsd ) : aticoor.stub_atom1(); gp = which_ancestor_ == anc_grandparent ? ICoorAtomID( ancestor_name_, rsd ) : aticoor.stub_atom2(); gg = which_ancestor_ == anc_greatgrandparent ? ICoorAtomID( ancestor_name_, rsd ) : aticoor.stub_atom3(); - } catch ( utility::excn::EXCN_Base const & excn ) { + } catch ( utility::excn::Exception const & excn ) { std::ostringstream oss; oss << "Failed to apply the ChangeAncestory patch (" << atom_ << ", "; switch ( which_ancestor_ ) { @@ -2815,7 +2815,7 @@ patch_operation_from_patch_file_line( } else { std::ostringstream oss; oss << "While reading the SET_ANCESTOR patch operation line, did not find PARENT, GRANDPARENT, or GREATGRANDPARENT as the third string on that line\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } return PatchOperationOP( new ChangeAncestory( atom_name, anc, anc_atom_name )); } else if ( tag == "RESET_BOND_LENGTH" ) { diff --git a/source/src/core/chemical/ResidueLoader.cc b/source/src/core/chemical/ResidueLoader.cc index 6f141664c9..e92cde1018 100644 --- a/source/src/core/chemical/ResidueLoader.cc +++ b/source/src/core/chemical/ResidueLoader.cc @@ -44,7 +44,7 @@ ResidueLoader::create_resource( ) const { if ( ! dynamic_cast< ResidueLoaderOptions const * > ( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( "ResidueLoader expected to be given a ResidueLoaderOptions object, " \ + throw CREATE_EXCEPTION(utility::excn::Exception, "ResidueLoader expected to be given a ResidueLoaderOptions object, " \ "but was given a non-ResidueLoaderOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." ); } diff --git a/source/src/core/chemical/ResidueProperties.cc b/source/src/core/chemical/ResidueProperties.cc index 142de416c2..1d4e5cc0a5 100644 --- a/source/src/core/chemical/ResidueProperties.cc +++ b/source/src/core/chemical/ResidueProperties.cc @@ -107,7 +107,7 @@ ResidueProperties::has_property( std::string const & property ) const // should we use NO_PROPERTY return value instead of exception catching? Would aid in gdb/lldb debugging to not use exceptions for this. See has_variant_type. -- rhiju try { return general_property_status_[ get_property_from_string( property ) ]; - } catch ( EXCN_Msg_Exception const & e ) { + } catch ( Exception const & e ) { TR.Warning << e.msg() << endl; } return false; @@ -122,7 +122,7 @@ ResidueProperties::set_property( std::string const & property, bool const settin // should we use NO_PROPERTY return value instead of exception catching? Would aid in gdb/lldb debugging to not use exceptions for this. See set_variant_type. -- rhiju try { general_property_status_[ get_property_from_string( property ) ] = setting; - } catch ( EXCN_Msg_Exception const & e ) { + } catch ( Exception const & e ) { utility_exit_with_message( e.msg() ); } } diff --git a/source/src/core/chemical/ResidueType.cc b/source/src/core/chemical/ResidueType.cc index 68361d85db..48875ac777 100644 --- a/source/src/core/chemical/ResidueType.cc +++ b/source/src/core/chemical/ResidueType.cc @@ -2615,7 +2615,7 @@ ResidueType::get_numeric_property(std::string const & tag) const std::map const numeric_properties( properties_->numeric_properties() ); auto property_it( numeric_properties.find( tag ) ); if ( property_it == numeric_properties.end() ) { - throw utility::excn::EXCN_KeyError( tag + " does not exist in ResidueType with name " + name3_ ); + throw CREATE_EXCEPTION(utility::excn::KeyError, tag + " does not exist in ResidueType with name " + name3_ ); return 0.0; //keep compilers happy } @@ -2628,7 +2628,7 @@ ResidueType::get_string_property(std::string const & tag) const std::map const string_properties( properties_->string_properties() ); auto property_it(string_properties.find(tag)); if ( property_it == string_properties.end() ) { - throw utility::excn::EXCN_KeyError(tag + " does not exist in ResidueType with name " + name3_); + throw CREATE_EXCEPTION(utility::excn::KeyError, tag + " does not exist in ResidueType with name " + name3_); return ""; } return property_it->second; diff --git a/source/src/core/chemical/residue_properties/update_ResidueType_enum_files.py b/source/src/core/chemical/residue_properties/update_ResidueType_enum_files.py index 4db2e5bc7e..5b83a5b9fd 100755 --- a/source/src/core/chemical/residue_properties/update_ResidueType_enum_files.py +++ b/source/src/core/chemical/residue_properties/update_ResidueType_enum_files.py @@ -327,7 +327,7 @@ def generate_mappings_source_file(enum_info, enum_defs): # quick hack -- could probably do this for PROPERTY also -- rhiju lines.append('\t\treturn ( *VARIANT_MAP ).at( "NO_VARIANT" );\n') else: - lines.append('\t\tthrow EXCN_Msg_Exception( "Rosetta does not recognize ' + lines.append('\t\tthrow CREATE_EXCEPTION(Exception, "Rosetta does not recognize ' 'the ' + enum_info.short_name + ': " + ' + enum_info.short_name + ' +\n') lines.append('\t\t\t\t"; has it been added to ' + enum_info.input_file + diff --git a/source/src/core/chemical/sdf/MolFileIOReader.cc b/source/src/core/chemical/sdf/MolFileIOReader.cc index 26a74ef7d4..aa3ff69cd3 100644 --- a/source/src/core/chemical/sdf/MolFileIOReader.cc +++ b/source/src/core/chemical/sdf/MolFileIOReader.cc @@ -218,7 +218,7 @@ convert_to_ResidueTypes( utility::vector1< MolFileIOMoleculeOP > molfile_data, ResidueTypeOP restype; try { restype = convert_to_ResidueType(separated_molecules[jj], atom_types, element_types, mm_atom_types); - } catch( utility::excn::EXCN_Msg_Exception & e ) { + } catch( utility::excn::Exception & e ) { TR << ">>>>>> Skipping " << separated_molecules[jj][1]->name() << " due to Error: " << e.msg() << std::endl; continue; } catch (...) { diff --git a/source/src/core/chemical/sdf/mol_writer.cc b/source/src/core/chemical/sdf/mol_writer.cc index 3025aac041..bca4021980 100644 --- a/source/src/core/chemical/sdf/mol_writer.cc +++ b/source/src/core/chemical/sdf/mol_writer.cc @@ -124,7 +124,7 @@ void MolWriter::output_residue(std::string const & file_name,core::conformation: outfile.open(file_name.c_str(),std::ios::out | std::ios::binary); if ( !outfile ) { - throw utility::excn::EXCN_FileNotFound("Cannot open file"+file_name); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, "Cannot open file"+file_name); } output_residue(outfile,residue); outfile.close(); @@ -136,7 +136,7 @@ void MolWriter::output_residue(std::string const & file_name, core::chemical::Re utility::io::ozstream outfile; outfile.open(file_name.c_str(), std::ios::out | std::ios::binary); if ( !outfile ) { - throw utility::excn::EXCN_FileNotFound("Cannot open file"+file_name); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, "Cannot open file"+file_name); } output_residue(outfile,residue_type); outfile.close(); diff --git a/source/src/core/conformation/Conformation.cc b/source/src/core/conformation/Conformation.cc index a6a9d85671..4f2252ca7b 100644 --- a/source/src/core/conformation/Conformation.cc +++ b/source/src/core/conformation/Conformation.cc @@ -1055,12 +1055,12 @@ Conformation::append_residue_by_bond( std::stringstream err; err << "Can't create a polymer bond after residue " << anchor_pos << " due to incompatible type: " << anchor_rsd.type().name(); - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } else if ( !new_rsd.is_polymer() ) { std::stringstream err; err << "Can't create a polymer bond to new residue " << seqpos << " due to incompatible type: " << new_rsd.type().name(); - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } } else { // if using a non-polymer connection, confirm that anchor_pos & anchor_residue_connection_index are set diff --git a/source/src/core/conformation/membrane/Exceptions.hh b/source/src/core/conformation/membrane/Exceptions.hh index 0148d1a6f4..a2b9dea115 100644 --- a/source/src/core/conformation/membrane/Exceptions.hh +++ b/source/src/core/conformation/membrane/Exceptions.hh @@ -28,18 +28,13 @@ namespace conformation { namespace membrane { /// @brief Parent Exception - Exception Membrane -class EXCN_Membrane : public virtual utility::excn::EXCN_Msg_Exception { +class EXCN_Membrane : public utility::excn::Exception { public: - // Constructor - EXCN_Membrane() : utility::excn::EXCN_Msg_Exception( "" ) {}; - - // Show Exception - virtual void show( std::ostream & os ) const { - os << "\n[Membrane Exception]:"; - EXCN_Msg_Exception::show( os ); - } + EXCN_Membrane(char const *file, int line, std::string const &m) : utility::excn::Exception(file, line, "\n[Membrane Exception]: ") { + add_msg(m); + }; }; // class EXCN_Membrane @@ -49,33 +44,26 @@ class EXCN_Resource_Definition : public EXCN_Membrane { public: // Constructor - EXCN_Resource_Definition( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; + EXCN_Resource_Definition(char const *file, int line, std::string const & m) : EXCN_Membrane(file, line, "") { + add_msg("========================== Resource Loader Exception ==========================\n" + "Please refine your Resource Definition file and try again. For instructions on how to \n" + "properly construct your resource definition file for the membrane code, please visit the \n" + "Rosetta documentation"); + add_msg(m); + }; - // Show Exception - virtual void show( std::ostream & os ) const { - os << "========================== Resource Loader Exception ==========================\n"; - os << "Please refine your Resource Definition file and try again. For instructions on how to \n"; - os << "properly construct your resource definition file for the membrane code, please visit the \n"; - os << "Rosetta documentation"; - EXCN_Msg_Exception::show(os); - } +}; -}; // class EXCN_Resource_Definition -/// @brief Illegal Arguments Exception class EXCN_Illegal_Arguments : public EXCN_Membrane { public: // Constructor - EXCN_Illegal_Arguments( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; - - // Show Exception - virtual void show( std::ostream & os ) const { - os << "Illegal Arguments Exception!"; - EXCN_Msg_Exception::show(os); - - } + EXCN_Illegal_Arguments(char const *file, int line, std::string const &m) : EXCN_Membrane(file, line, "Illegal Arguments Exception!\n") + { + add_msg(m); + }; }; // class EXCN_Membrane_Bounds @@ -85,13 +73,10 @@ class EXCN_Membrane_Bounds : public EXCN_Membrane { public: // Constructor - EXCN_Membrane_Bounds( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; - - // Show Exception - virtual void show( std::ostream & os ) const { - os << "Membrane out of Bounds Exception!"; - EXCN_Msg_Exception::show(os); - } + EXCN_Membrane_Bounds(char const *file, int line, std::string const & m) : EXCN_Membrane(file, line, "Membrane out of Bounds Exception!") + { + add_msg(m); + }; }; // class EXCN_Membrane_Bounds @@ -101,13 +86,10 @@ class EXCN_VirtualRsd : public EXCN_Membrane { public: // Constructor - EXCN_VirtualRsd( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; - - // Show Exception - virtual void show( std::ostream & os ) const { - os << "Virtual Residue Definition Exception"; - EXCN_Msg_Exception::show(os); - } + EXCN_VirtualRsd(char const *file, int line, std::string const & m) : EXCN_Membrane(file, line, "Virtual Residue Definition Exception") + { + add_msg(m); + }; }; // class EXCN_VirtualRsd @@ -117,13 +99,10 @@ class EXCN_NonMembrane : public EXCN_Membrane { public: // Contructor - EXCN_NonMembrane( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; - - // Show Exception - virtual void show( std::ostream & os ) const { - os << "Pose is not initialized as a membrane pose!"; - EXCN_Msg_Exception::show(os); - } + EXCN_NonMembrane(char const *file, int line, std::string const & m) : EXCN_Membrane(file, line, "Pose is not initialized as a membrane pose!") + { + add_msg(m); + }; }; // class EXCN_NonMembrane @@ -133,13 +112,10 @@ class EXCN_MembraneFoldTree : public EXCN_Membrane { public: // Constructor - EXCN_MembraneFoldTree( std::string const & msg ) : utility::excn::EXCN_Msg_Exception( msg ){}; - - // Show exception - virtual void show( std::ostream & os ) const { - os << "Membrane FoldTree Error!"; - EXCN_Msg_Exception::show(os); - } + EXCN_MembraneFoldTree(char const *file, int line, std::string const & m) : EXCN_Membrane(file, line, "Membrane FoldTree Error!") + { + add_msg(m); + }; }; // class EXCN_MembraneFoldTree @@ -148,4 +124,3 @@ public: } // core #endif // INCLUDED_core_conformation_membrane_Exceptions_hh - diff --git a/source/src/core/conformation/membrane/Span.cc b/source/src/core/conformation/membrane/Span.cc index 300db3b2d2..b2f2375e1e 100644 --- a/source/src/core/conformation/membrane/Span.cc +++ b/source/src/core/conformation/membrane/Span.cc @@ -172,7 +172,7 @@ bool Span::is_valid() const { void Span::not_valid() const { if ( ! is_valid() ) { - throw utility::excn::EXCN_Msg_Exception( "Span is invalid!" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Span is invalid!" ); } } // not valid diff --git a/source/src/core/conformation/membrane/SpanningTopology.cc b/source/src/core/conformation/membrane/SpanningTopology.cc index 8e7c535d2b..47e77de85d 100644 --- a/source/src/core/conformation/membrane/SpanningTopology.cc +++ b/source/src/core/conformation/membrane/SpanningTopology.cc @@ -372,7 +372,7 @@ SpanningTopology::create_from_spanfile( std::string spanfile, std::map< std::str if ( !stream.good() ) { TR << "Poor formatting for spanfile - cannot read" << std::endl; - throw new utility::excn::EXCN_Msg_Exception( "Poor formatting for spanfile - cannot read" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Poor formatting for spanfile - cannot read" ); } // Read file Header "TM region prediction for" @@ -494,7 +494,7 @@ SpanningTopology::create_from_spanfile( std::string spanfile, std::map< std::str // check created object for validity if ( ! is_valid() ) { TR << "SpanningTopology invalid: check your span file!" << std::endl; - throw utility::excn::EXCN_Msg_Exception( "SpanningTopology invalid: check your span file!" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SpanningTopology invalid: check your span file!" ); // utility_exit_with_message( "SpanningTopology invalid: check your span file!" ); } diff --git a/source/src/core/conformation/ppo_torsion_bin.cc b/source/src/core/conformation/ppo_torsion_bin.cc index 87f1d47f9a..20caf51d3a 100644 --- a/source/src/core/conformation/ppo_torsion_bin.cc +++ b/source/src/core/conformation/ppo_torsion_bin.cc @@ -110,7 +110,7 @@ map_string_to_torsion_bin_string( std::string const & torstring ) torsion_bin_string tbs( torstring.size() ); for ( core::Size ii = 0; ii < torstring.size(); ++ii ) { if ( ! char_valid_as_torsion_bin( torstring[ ii ] ) ) { - throw utility::excn::EXCN_Msg_Exception( "Invalid character '" + std::string(1,torstring[ii]) + + throw CREATE_EXCEPTION(utility::excn::Exception, "Invalid character '" + std::string(1,torstring[ii]) + "' at position " + utility::to_string( ii+1 ) + " of the torsion string \"" + torstring + "\" in trying to convert to a ppo_torsion_bin "); } diff --git a/source/src/core/conformation/symmetry/MirrorSymmetricConformation.cc b/source/src/core/conformation/symmetry/MirrorSymmetricConformation.cc index beda04864b..77d54975ca 100644 --- a/source/src/core/conformation/symmetry/MirrorSymmetricConformation.cc +++ b/source/src/core/conformation/symmetry/MirrorSymmetricConformation.cc @@ -97,7 +97,7 @@ MirrorSymmetricConformation::operator=( Conformation const & src ) if ( mirr_sym_conf ) { MirrorSymmetricConformation::operator=( *mirr_sym_conf ); } else { - throw utility::excn::EXCN_Msg_Exception( "MirrorSymmetricConformation::operator= was handed a non-MirrorSymmetricConformation" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "MirrorSymmetricConformation::operator= was handed a non-MirrorSymmetricConformation" ); } return *this; @@ -112,7 +112,7 @@ MirrorSymmetricConformation::detached_copy( Conformation const & src ) { res_is_mirrored_ = mirr_sym_conf->res_is_mirrored_; jump_is_mirrored_ = mirr_sym_conf->jump_is_mirrored_; } else { - throw utility::excn::EXCN_Msg_Exception( "MirrorSymmetricConformation detached_copy was handed a non-MirrorSymmetricConformation" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "MirrorSymmetricConformation detached_copy was handed a non-MirrorSymmetricConformation" ); } } diff --git a/source/src/core/conformation/symmetry/SymmetricConformation.cc b/source/src/core/conformation/symmetry/SymmetricConformation.cc index 1b82427306..7831aff98d 100644 --- a/source/src/core/conformation/symmetry/SymmetricConformation.cc +++ b/source/src/core/conformation/symmetry/SymmetricConformation.cc @@ -87,7 +87,7 @@ SymmetricConformation::operator=( Conformation const & src ) SymmetricConformation::operator=( *sym_conf ); } else { //Conformation::operator=( src ); - throw utility::excn::EXCN_Msg_Exception( "SymmetricConformation::operator= was handed a non-SymmetricConformation" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SymmetricConformation::operator= was handed a non-SymmetricConformation" ); } return *this; @@ -104,7 +104,7 @@ SymmetricConformation::detached_copy( Conformation const & src ) { Tsymm_ = sym_conf->Tsymm_; } else { - throw utility::excn::EXCN_Msg_Exception( "SymmetricConformation detached_copy was handed a non-SymmetricConformation" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SymmetricConformation detached_copy was handed a non-SymmetricConformation" ); } } diff --git a/source/src/core/environment/EnvCore.cc b/source/src/core/environment/EnvCore.cc index a2b12539dd..c4522c1969 100644 --- a/source/src/core/environment/EnvCore.cc +++ b/source/src/core/environment/EnvCore.cc @@ -59,7 +59,7 @@ void EnvCore::set_superenv( EnvCoreCAP env ){ if ( superenv_.expired() || utility::pointer::equal(superenv_, env) ) { superenv_ = env; } else { - throw utility::excn::EXCN_Msg_Exception( "Superenvironment already assigned."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Superenvironment already assigned."); } } diff --git a/source/src/core/environment/EnvExcnBase.hh b/source/src/core/environment/EnvExcnBase.hh index c0a1e0016e..4e6a075305 100644 --- a/source/src/core/environment/EnvExcnBase.hh +++ b/source/src/core/environment/EnvExcnBase.hh @@ -26,16 +26,17 @@ // C++ Headers #include +#include // ObjexxFCL Headers namespace core { namespace environment { -class EXCN_Env_Exception : public utility::excn::EXCN_Msg_Exception { - typedef utility::excn::EXCN_Msg_Exception Parent; +class EXCN_Env_Exception : public utility::excn::Exception { + typedef utility::excn::Exception Parent; public: - EXCN_Env_Exception( EnvCoreCAP env_ap ) : Parent("") { + EXCN_Env_Exception(char const *file, int line, EnvCoreCAP env_ap ) : Parent(file, line, "") { EnvCoreCOP env = env_ap.lock(); // avoids throwing weak_ptr exception std::ostringstream elab_msg; @@ -60,7 +61,7 @@ public: } protected: - EXCN_Env_Exception() : Parent() {}; + //EXCN_Env_Exception(char const *file, int line) : Parent(file, line, "") {}; }; } // environment diff --git a/source/src/core/environment/FoldTreeSketch.cc b/source/src/core/environment/FoldTreeSketch.cc index 212ec99736..4cec51fae9 100644 --- a/source/src/core/environment/FoldTreeSketch.cc +++ b/source/src/core/environment/FoldTreeSketch.cc @@ -41,17 +41,19 @@ static basic::Tracer tr( "core.environment.FoldTreeSketch", basic::t_info ); namespace core { namespace environment { -EXCN_FTSketchGraph::EXCN_FTSketchGraph( Size by, +EXCN_FTSketchGraph::EXCN_FTSketchGraph( + char const *file, int line, + Size by, Size on, std::string const& action, std::string const& reason ): - Parent( "Error in FoldTreeSketch: Unsuccessful "+ + Parent(file, line, "Error in FoldTreeSketch: Unsuccessful "+ action+" by Node (seqid) "+utility::to_string(by)+ " on Node (seqid)"+utility::to_string(on)+"."+reason ) {} -EXCN_FTSketchGraph::EXCN_FTSketchGraph( std::string const& message ): - Parent( "Error in FoldTreeSketch: "+message ) +EXCN_FTSketchGraph::EXCN_FTSketchGraph(char const *file, int line, std::string const& message ) + : Parent(file, line, "Error in FoldTreeSketch: "+message ) {} FoldTreeSketch::FoldTreeSketch(): @@ -123,7 +125,7 @@ void FoldTreeSketch::insert_cut( Size const seqid ) { range_check( seqid+1 ); if ( has_cut( seqid ) ) { - throw EXCN_FTSketchGraph( "Rejected cut insertion at " + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Rejected cut insertion at " + utility::to_string( seqid ) + " because no edge to cut exists." ); } @@ -136,11 +138,11 @@ void FoldTreeSketch::insert_jump( Size const p1, Size const p2 ) { range_check( p1 ); range_check( p2 ); if ( p1 == p2 ) { - throw EXCN_FTSketchGraph( "Jumps cannot connect a node to itself." ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Jumps cannot connect a node to itself." ); } if ( has_jump( p1, p2 ) ) { - throw EXCN_FTSketchGraph( "Rejected jump insertion at " + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Rejected jump insertion at " + utility::to_string( p1 ) + ", " + utility::to_string( p2 ) + " because the jump already exists." ); @@ -152,7 +154,7 @@ void FoldTreeSketch::insert_jump( Size const p1, Size const p2 ) { void FoldTreeSketch::append_peptide( Size length ){ if ( length < 1 ) { - throw utility::excn::EXCN_RangeError( "New FoldTreeSketch polymer stretches must be length >= 1. Obviously." ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "New FoldTreeSketch polymer stretches must be length >= 1. Obviously." ); } Size old_size = nodes_.size(); @@ -193,7 +195,7 @@ void FoldTreeSketch::render( core::kinematics::FoldTree& ft ) const{ } tr.Debug << std::endl; - throw EXCN_FTSketchGraph( "Number of jumps ("+utility::to_string( jumps.size() )+ + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Number of jumps ("+utility::to_string( jumps.size() )+ ") and number of cuts ("+utility::to_string(cuts.size())+ ") must be equal for rendering." ); } @@ -217,7 +219,7 @@ void FoldTreeSketch::render( core::kinematics::FoldTree& ft ) const{ bool success = ft.tree_from_jumps_and_cuts( nodes_.size(), jumps.size(), jump_array, cut_array); if ( !success ) { - throw EXCN_FTSketchGraph( "FoldTree generation was not successful." ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "FoldTree generation was not successful." ); } } @@ -241,7 +243,7 @@ int FoldTreeSketch::num_cuts() const { void FoldTreeSketch::range_check( Size const seqpos ) const { if ( seqpos > nres() || seqpos < 1 ) { - throw EXCN_FTSketchGraph( "Sequence position "+utility::to_string(seqpos)+ + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Sequence position "+utility::to_string(seqpos)+ " is not a valid sequence position (nres="+ utility::to_string( nres() )+")"); } @@ -281,7 +283,7 @@ utility::vector1< Size > const FoldTreeSketch::cycle( core::Size const start_res core::Size FoldTreeSketch::insert_cut( utility::vector1< Real > bias ){ if ( bias.size() != this->nres() ) { - throw EXCN_FTSketchGraph( "Cut bias array does not match FoldTreeSize." ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Cut bias array does not match FoldTreeSize." ); } Size const ALLOWED_FAILURES = 10; @@ -291,7 +293,7 @@ core::Size FoldTreeSketch::insert_cut( utility::vector1< Real > bias ){ if ( sum <= 0.0 ) { tr.Error << bias << std::endl; - throw EXCN_FTSketchGraph( "Cut bias array sum was zero. Check your inputs. It may not be possible to auto-decyclize the FT with these cut bias choices." ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Cut bias array sum was zero. Check your inputs. It may not be possible to auto-decyclize the FT with these cut bias choices." ); } @@ -316,7 +318,7 @@ core::Size FoldTreeSketch::insert_cut( utility::vector1< Real > bias ){ std::ostringstream ss; ss << "Random cut insertion failed for all of " << ALLOWED_FAILURES << " attempts. Check your bias array for bad values. Cut bias array: " << bias; - throw EXCN_FTSketchGraph( ss.str() ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, ss.str() ); } std::set< core::Size > FoldTreeSketch::remove_cycles() { @@ -325,12 +327,12 @@ std::set< core::Size > FoldTreeSketch::remove_cycles() { std::set< core::Size > FoldTreeSketch::remove_cycles( utility::vector1< Real > const& bias ){ if ( bias.size() != this->nres() ) { - throw EXCN_FTSketchGraph( "Cut bias array does not match FoldTreeSize." ); + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "Cut bias array does not match FoldTreeSize." ); } utility::vector1< Size > cycle = this->cycle(); if ( cycle.size() != 0 && !cuttable( cycle ) ) { - throw EXCN_FTSketchGraph( "All-jump cycles are not automatically resolvable: "+ + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "All-jump cycles are not automatically resolvable: "+ utility::to_string( cycle )+"." ); } @@ -347,7 +349,7 @@ std::set< core::Size > FoldTreeSketch::remove_cycles( utility::vector1< Real > c sum += bias[ resid_it ]; } if ( sum == 0 ) { - throw EXCN_FTSketchGraph( "All-zero cut biased cycles cannot be automatically resolved. Cycle: " + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, "All-zero cut biased cycles cannot be automatically resolved. Cycle: " +utility::to_string( cycle )+", Biases: "+utility::to_string( bias )+"." ); } @@ -414,7 +416,7 @@ void FoldTreeSketch::Node::add_peptide_neighbor( NodeOP n ){ if ( ( this->seqid() - n->seqid() ) == 1 ) { if ( !pep_prev_.expired() && !utility::pointer::equal(pep_prev_, this) ) { - throw EXCN_FTSketchGraph( this->seqid(), n->seqid(), "add_pep_neighbor", + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, this->seqid(), n->seqid(), "add_pep_neighbor", "Node already has a previous peptide member." ); } pep_prev_ = n; @@ -423,14 +425,14 @@ void FoldTreeSketch::Node::add_peptide_neighbor( NodeOP n ){ } else if ( ( (int) this->seqid() - (int) n->seqid() ) == -1 ) { if ( !pep_next_.expired() && !utility::pointer::equal(pep_next_, this) ) { - throw EXCN_FTSketchGraph( this->seqid(), n->seqid(), "add_pep_neighbor", + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, this->seqid(), n->seqid(), "add_pep_neighbor", "Node already has a next peptide member." ); } pep_next_ = n; debug_assert( n->pep_prev_.expired() || n->pep_prev_.lock().get() == this ); n->pep_prev_ = this_weak_ptr_; } else { - throw EXCN_FTSketchGraph( this->seqid(), n->seqid(), "add_pep_neighbor", + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, this->seqid(), n->seqid(), "add_pep_neighbor", "Peptide connections exist only between sequence-adacjent nodes." ); } } @@ -491,7 +493,7 @@ void FoldTreeSketch::Node::rm_peptide_neighbor( NodeAP _n ){ pep_prev->pep_next_.reset(); pep_next_.reset(); } else { - throw EXCN_FTSketchGraph( this->seqid(), n->seqid(), "rm_peptide_neighbor", + throw CREATE_EXCEPTION(EXCN_FTSketchGraph, this->seqid(), n->seqid(), "rm_peptide_neighbor", "Neighbor does not exist to be removed." ); } } diff --git a/source/src/core/environment/FoldTreeSketch.hh b/source/src/core/environment/FoldTreeSketch.hh index 2feb2213e1..5f1008ce9c 100644 --- a/source/src/core/environment/FoldTreeSketch.hh +++ b/source/src/core/environment/FoldTreeSketch.hh @@ -40,13 +40,13 @@ namespace core { namespace environment { -class EXCN_FTSketchGraph : public utility::excn::EXCN_Msg_Exception { - typedef utility::excn::EXCN_Msg_Exception Parent; +class EXCN_FTSketchGraph : public utility::excn::Exception { + typedef utility::excn::Exception Parent; public: - EXCN_FTSketchGraph( Size by, Size on, std::string const& action, std::string const& reason ); + EXCN_FTSketchGraph(char const *file, int line, Size by, Size on, std::string const& action, std::string const& reason ); - EXCN_FTSketchGraph( std::string const& message ); + EXCN_FTSketchGraph(char const *file, int line, std::string const& message ); }; class FoldTreeSketch : public utility::pointer::ReferenceCount { diff --git a/source/src/core/environment/SequenceAnnotation.cc b/source/src/core/environment/SequenceAnnotation.cc index b30a101f10..be1afc2e75 100644 --- a/source/src/core/environment/SequenceAnnotation.cc +++ b/source/src/core/environment/SequenceAnnotation.cc @@ -40,7 +40,7 @@ class LengthChecker { LengthChecker( core::Size l ): l_( l ) {} void operator() ( core::Size i ) { if ( i > l_ || i < 1 ) { - throw utility::excn::EXCN_RangeError( "Residue "+utility::to_string( i )+ + throw CREATE_EXCEPTION(utility::excn::RangeError, "Residue "+utility::to_string( i )+ " is out of the range of the SequenceAnnotation object." ); } } @@ -79,7 +79,7 @@ void SequenceAnnotation::_add_seq_label( std::string const& label, vector1_size std::ostringstream ss; ss << "The sequence label " << label << " already exists in the SequenceAnnotation object." << std::endl << " Existing: " << resolve_seq( label ) << std::endl << "Conflicting: " << members; - throw utility::excn::EXCN_KeyError( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::KeyError, ss.str() ); } else { //bail because nothing needs to be done--this exact label/member combination is already in there. return; @@ -97,7 +97,7 @@ void SequenceAnnotation::_add_seq_label( std::string const& label, vector1_size void SequenceAnnotation::add_jump_label( std::string const& label, core::Size i ) { if ( jump_label_to_number_.find(label) != jump_label_to_number_.end() && jump_label_to_number_[ label ] != i ) { - throw utility::excn::EXCN_KeyError( "The jump key '"+label+"' already exists in the SequenceAnnotation object." ); + throw CREATE_EXCEPTION(utility::excn::KeyError, "The jump key '"+label+"' already exists in the SequenceAnnotation object." ); } //jump_number_to_label_[ i ] = label; @@ -106,7 +106,7 @@ void SequenceAnnotation::add_jump_label( std::string const& label, core::Size i void SequenceAnnotation::rm_seq_label( std::string const& label ){ if ( label_to_pose_numbers_.find( label ) == label_to_pose_numbers_.end() ) { - throw utility::excn::EXCN_KeyError("The sequence key '"+label+"' does not exists in the SequenceAnnotation object" ); + throw CREATE_EXCEPTION(utility::excn::KeyError, "The sequence key '"+label+"' does not exists in the SequenceAnnotation object" ); } vector1_size& pose_numbers = label_to_pose_numbers_.find( label )->second; @@ -120,7 +120,7 @@ void SequenceAnnotation::rm_seq_label( std::string const& label ){ void SequenceAnnotation::append_seq( std::string const& label ) { if ( label_to_pose_numbers_.find( label ) != label_to_pose_numbers_.end() ) { - throw utility::excn::EXCN_KeyError("The sequence key '"+label+"' already exists in the SequenceAnnotation object" ); + throw CREATE_EXCEPTION(utility::excn::KeyError, "The sequence key '"+label+"' already exists in the SequenceAnnotation object" ); } // TODO: Allow more than one residue to be appended as part of a label length_ += 1; @@ -134,13 +134,13 @@ core::Size SequenceAnnotation::resolve_seq( LocalPosition const& local ) const { if ( it == label_to_pose_numbers_.end() ) { std::ostringstream msg; msg << "SequenceAnnotation could not find local position " << local << "." << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } if ( local.position() < 1 || local.position() > it->second.size() ) { std::ostringstream msg; msg << "SequenceAnnotation cannot resolve the local position " << local << " because it is out of range." << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } return it->second.at( local.position() ); @@ -154,7 +154,7 @@ core::Size SequenceAnnotation::resolve_jump( std::string const& label ) const { std::ostringstream msg; msg << "SequenceAnnotation could not find jump with label " << label << "." << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } return l->second; @@ -166,7 +166,7 @@ bool SequenceAnnotation::has_seq_label( std::string const& label ) const { utility::vector1< core::Size > const& SequenceAnnotation::resolve_seq( std::string const& label ) const { if ( label_to_pose_numbers_.find( label ) == label_to_pose_numbers_.end() ) { - throw utility::excn::EXCN_KeyError( "The jump key '"+label+ + throw CREATE_EXCEPTION(utility::excn::KeyError, "The jump key '"+label+ "' already exists in the SequenceAnnotation object." ); } return label_to_pose_numbers_.find( label )->second; diff --git a/source/src/core/fragment/FragCache.hh b/source/src/core/fragment/FragCache.hh index 8c18f04a08..38193c08f0 100644 --- a/source/src/core/fragment/FragCache.hh +++ b/source/src/core/fragment/FragCache.hh @@ -153,7 +153,7 @@ public: if ( retrieve( frag_id, val ) ) { return val; } else { - throw utility::excn::EXCN_RangeError( "no "+tag_+ "entry found for fragment: "); + throw CREATE_EXCEPTION(utility::excn::RangeError, "no "+tag_+ "entry found for fragment: "); } } @@ -162,7 +162,7 @@ public: if ( retrieve( frag_id, val ) ) { return val; } else { - throw utility::excn::EXCN_RangeError( "no "+tag_+ "entry found for fragment: "); + throw CREATE_EXCEPTION(utility::excn::RangeError, "no "+tag_+ "entry found for fragment: "); } } @@ -171,7 +171,7 @@ public: if ( retrieve( frame, frag_num, val ) ) { return val; } else { - throw utility::excn::EXCN_RangeError( "no "+tag_+ "entry found for fragment"); + throw CREATE_EXCEPTION(utility::excn::RangeError, "no "+tag_+ "entry found for fragment"); } } diff --git a/source/src/core/fragment/Frame.cc b/source/src/core/fragment/Frame.cc index fc433d9701..c036b24d1e 100644 --- a/source/src/core/fragment/Frame.cc +++ b/source/src/core/fragment/Frame.cc @@ -380,7 +380,7 @@ void Frame::shift_by( int offset ) { if ( start_ + offset < 1 ) { std::ostringstream msg; msg << "offset " << offset << " would shift Frame " << *this << " to negative or zero starting position " << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } start_ += offset; end_ += offset; diff --git a/source/src/core/fragment/JumpingFrame.cc b/source/src/core/fragment/JumpingFrame.cc index a5326ca225..adfe244032 100644 --- a/source/src/core/fragment/JumpingFrame.cc +++ b/source/src/core/fragment/JumpingFrame.cc @@ -114,7 +114,7 @@ void NonContinuousFrame::shift_by( int offset ) { if ( new_pos < 1 ) { std::ostringstream msg; msg << "offset " << offset << " would shift at least one position of Frame " << *this << " to negative or zero" << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } po = new_pos; } diff --git a/source/src/core/id/Exceptions.cc b/source/src/core/id/Exceptions.cc index c48ebaee5c..7e7159fe78 100644 --- a/source/src/core/id/Exceptions.cc +++ b/source/src/core/id/Exceptions.cc @@ -19,8 +19,10 @@ namespace core { namespace id { -EXCN_AtomNotFound::EXCN_AtomNotFound( NamedAtomID const& id ) : - EXCN_Msg_Exception( "Atom '"+id.to_string()+"' not found"), id_( id ) {} +EXCN_AtomNotFound::EXCN_AtomNotFound(char const *file, int line, NamedAtomID const& id ) : + Exception(file, line, "Atom '"+id.to_string()+"' not found"), id_( id ) +{ +} } } diff --git a/source/src/core/id/Exceptions.hh b/source/src/core/id/Exceptions.hh index bd2c973e72..4e51281482 100644 --- a/source/src/core/id/Exceptions.hh +++ b/source/src/core/id/Exceptions.hh @@ -23,9 +23,10 @@ namespace core { namespace id { -class EXCN_AtomNotFound: public utility::excn::EXCN_Msg_Exception { +class EXCN_AtomNotFound: public utility::excn::Exception { public: - EXCN_AtomNotFound( NamedAtomID const& ); + EXCN_AtomNotFound(char const *file, int line, NamedAtomID const& ); + NamedAtomID const& atom() { return id_; } private: NamedAtomID id_; diff --git a/source/src/core/id/NamedAtomID_Map.hh b/source/src/core/id/NamedAtomID_Map.hh index 8fa0ccc12c..e1356d1b60 100644 --- a/source/src/core/id/NamedAtomID_Map.hh +++ b/source/src/core/id/NamedAtomID_Map.hh @@ -387,7 +387,7 @@ public: // Indexers { //Hack until I find out the root cause of this from file_data.cc if ( i_res > res_map_.size() ) { - throw utility::excn::EXCN_RangeError("Residue outside res_map range"); + throw CREATE_EXCEPTION(utility::excn::RangeError, "Residue outside res_map range"); } if ( res_map_[ i_res ].count( atom ) == 0 ) { res_map_[ i_res ][ atom ] = default_value_; diff --git a/source/src/core/import_pose/PoseFromPDBLoader.cc b/source/src/core/import_pose/PoseFromPDBLoader.cc index 51e5b62b77..8d51932c33 100644 --- a/source/src/core/import_pose/PoseFromPDBLoader.cc +++ b/source/src/core/import_pose/PoseFromPDBLoader.cc @@ -49,7 +49,7 @@ PoseFromPDBLoader::create_resource( { ImportPoseOptions const * pose_opts_ptr = dynamic_cast< ImportPoseOptions const * > ( &options ); if ( ! pose_opts_ptr ) { - throw utility::excn::EXCN_Msg_Exception( "PoseFromPDBLoader expected to be given a ImportPoseOptions object, " \ + throw CREATE_EXCEPTION(utility::excn::Exception, "PoseFromPDBLoader expected to be given a ImportPoseOptions object, " \ "but was given a non-ImportPoseOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." ); } pose::PoseOP pose( new pose::Pose() ); diff --git a/source/src/core/init/init.cc b/source/src/core/init/init.cc index fe834f3141..b2303d764b 100644 --- a/source/src/core/init/init.cc +++ b/source/src/core/init/init.cc @@ -1314,7 +1314,7 @@ void init(int argc, char * argv []) } // Catch any Rosetta exceptions -catch( utility::excn::EXCN_Msg_Exception &e){ +catch( utility::excn::Exception &e){ // print the error message to standard error e.show( std::cerr ); // and rethrow to make sure we quit (or give caller opportunity to clean up or catch) diff --git a/source/src/core/init/score_function_corrections.cc b/source/src/core/init/score_function_corrections.cc index f411acf11a..f8998244b7 100644 --- a/source/src/core/init/score_function_corrections.cc +++ b/source/src/core/init/score_function_corrections.cc @@ -467,11 +467,11 @@ init_hbond_sp2_correction( utility::options::OptionCollection & options ) { } if ( options[corrections::correct] ) { - throw utility::excn::EXCN_BadInput( "The -corrections::hbond_sp2_correction is incompatible with the -corrections:correct flag."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "The -corrections::hbond_sp2_correction is incompatible with the -corrections:correct flag."); } if ( options[ corrections::facts_default ] ) { - throw utility::excn::EXCN_BadInput( "The -corrections::hbond_sp2_correction is incompatible with the -corrections:facts_default flag."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "The -corrections::hbond_sp2_correction is incompatible with the -corrections:facts_default flag."); } } } @@ -2259,7 +2259,7 @@ check_score_function_sanity( << "(And do not use the -restore_talaris_behavior flag.)" << std::endl << "**********************************************" << std::endl; if ( throw_exception ) { - throw utility::excn::EXCN_BadInput("Missing -restore_pre_talaris_2013_behavior flag."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Missing -restore_pre_talaris_2013_behavior flag."); } else { return false; } @@ -2279,7 +2279,7 @@ check_score_function_sanity( << "(And do not use the -restore_pre_talaris_2013_behavior flag.)" << std::endl << "**********************************************" << std::endl; if ( throw_exception ) { - throw utility::excn::EXCN_BadInput("Missing -restore_talaris_behavior flag."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Missing -restore_talaris_behavior flag."); } else { return false; } @@ -2298,7 +2298,7 @@ check_score_function_sanity( << "flags on the command line." << std::endl << "**********************************************" << std::endl; if ( throw_exception ) { - throw utility::excn::EXCN_BadInput("Using -restore_talaris_behavior or -restore_pre_talaris_2013_behavior with REF-era scorefunctions."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Using -restore_talaris_behavior or -restore_pre_talaris_2013_behavior with REF-era scorefunctions."); } else { return false; } diff --git a/source/src/core/io/pose_from_sfr/PoseFromSFRBuilder.cc b/source/src/core/io/pose_from_sfr/PoseFromSFRBuilder.cc index a1514bcb60..565084d316 100644 --- a/source/src/core/io/pose_from_sfr/PoseFromSFRBuilder.cc +++ b/source/src/core/io/pose_from_sfr/PoseFromSFRBuilder.cc @@ -716,7 +716,7 @@ void PoseFromSFRBuilder::build_initial_pose( pose::Pose & pose ) TR.Trace << " is appended to chain " << rinfos_[ ii ].chainID() << std::endl; try { pose.append_residue_by_bond( *ii_rsd ); - } catch (utility::excn::EXCN_Msg_Exception & e) { + } catch (utility::excn::Exception & e) { std::stringstream message; message << "Failed to add residue " << ii << " to the structure. PDB file residue name: " << PDB_resid << std::endl; @@ -759,13 +759,13 @@ void PoseFromSFRBuilder::build_initial_pose( pose::Pose & pose ) //pose.append_residue_by_bond( *ii_rsd ); try{ pose.append_residue_by_bond( *ii_rsd ); - } catch (utility::excn::EXCN_Msg_Exception & e) { + } catch (utility::excn::Exception & e) { std::stringstream message; message << "Failed to add residue " << ii << " to the structure. PDB file residue name: " << PDB_resid << std::endl; message << "ERROR: Attempted to make connection: " << rinfos_[ ii-1 ].resid() << " -> " << PDB_resid << std::endl; std::string error_msg = message.str() + "ERROR: " + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg ); } } } diff --git a/source/src/core/io/silent/SilentFileData.cc b/source/src/core/io/silent/SilentFileData.cc index ddaac8e537..59328bb78e 100644 --- a/source/src/core/io/silent/SilentFileData.cc +++ b/source/src/core/io/silent/SilentFileData.cc @@ -572,7 +572,7 @@ SilentFileData::read_file( ); //if ( !success && !option[ OptionKeys::in::file::silent_read_through_errors ]() ) { if ( !success && !options_.read_through_errors() ) { - throw utility::excn::EXCN_BadInput("no success reading silent file "+filename); + throw CREATE_EXCEPTION(utility::excn::BadInput, "no success reading silent file "+filename); } return success; } // read_file @@ -650,7 +650,7 @@ SilentFileData::read_file( ); //if ( !success && !option[ OptionKeys::in::file::silent_read_through_errors ]() ) { if ( !success && !options_.read_through_errors() ) { - throw utility::excn::EXCN_BadInput("no success reading silent file "+filename); + throw CREATE_EXCEPTION(utility::excn::BadInput, "no success reading silent file "+filename); } return success; } @@ -666,7 +666,7 @@ SilentFileData::_read_file( utility::io::izstream data( filename.c_str() ); if ( !data.good() ) { if ( throw_exception_on_bad_structs ) { - throw utility::excn::EXCN_FileNotFound( filename ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, filename ); } else { utility_exit_with_message( "ERROR:: Unable to open silent_input file: '" + @@ -803,7 +803,7 @@ SilentFileData::read_stream( bool init_good = tmp_struct->init_from_lines( mylines, *this ); if ( !init_good && throw_exception_on_bad_structs ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "failure to read decoy "+tmp_struct->decoy_tag()+ " from silent-file " + filename ); @@ -864,7 +864,7 @@ SilentFileData::read_stream( tmp_struct->set_force_bitflip(true); //Option to force flipping from big-endian to little-endian or the converse. } bool init_good = tmp_struct->init_from_lines( mylines, *this ); - if ( !init_good && throw_exception_on_bad_structs ) throw utility::excn::EXCN_BadInput( "failure to read decoy "+tmp_struct->decoy_tag()+" from silent-file " +filename); + if ( !init_good && throw_exception_on_bad_structs ) throw CREATE_EXCEPTION(utility::excn::BadInput, "failure to read decoy "+tmp_struct->decoy_tag()+" from silent-file " +filename); bool good_tag = false; std::set::iterator tag_it = tagset.find(tmp_struct->decoy_tag()); diff --git a/source/src/core/io/silent/SilentFileLoader.cc b/source/src/core/io/silent/SilentFileLoader.cc index 09630d6f60..4f5f9f7381 100644 --- a/source/src/core/io/silent/SilentFileLoader.cc +++ b/source/src/core/io/silent/SilentFileLoader.cc @@ -77,7 +77,7 @@ SilentFileLoader::create_resource( ) const { if ( ! dynamic_cast< SilentFileRMOptions const * >( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "SilentFileLoader expected to get a SilentFileRMOptions object, " "but was given a ResourceOptions of type '" + options.type() + "', " "which has the name '" + options.name() + "'." ); @@ -96,7 +96,7 @@ SilentFileLoader::create_resource( SilentFileData container( resource_options.opts() ); if ( !(ss->init_from_lines(lines, container)) ) { - throw utility::excn::EXCN_BadInput( "SilentFileLoader failed to load silent file with locator_id '" + locator_id + "'." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "SilentFileLoader failed to load silent file with locator_id '" + locator_id + "'." ); } PoseOP pose( new Pose() ); diff --git a/source/src/core/kinematics/Exceptions.hh b/source/src/core/kinematics/Exceptions.hh index 9479f98afa..58a754281a 100644 --- a/source/src/core/kinematics/Exceptions.hh +++ b/source/src/core/kinematics/Exceptions.hh @@ -34,13 +34,13 @@ namespace core { namespace kinematics { -class EXCN_InvalidFoldTree : public utility::excn::EXCN_Msg_Exception { - typedef utility::excn::EXCN_Msg_Exception Parent; +class EXCN_InvalidFoldTree : public utility::excn::Exception { + typedef utility::excn::Exception Parent; public: - EXCN_InvalidFoldTree( std::string const& msg, FoldTree f ) - : EXCN_Msg_Exception( msg ), bad_tree_( f ) {}; + EXCN_InvalidFoldTree(char const *file, int line, std::string const& msg, FoldTree f ) + : Exception(file, line, msg ), bad_tree_( f ) {}; - using utility::excn::EXCN_Msg_Exception::show; + using utility::excn::Exception::show; virtual void show( std::ostream& os ) { os << msg() << "\nInvalid FoldTree: "<< bad_tree() << std::endl; diff --git a/source/src/core/kinematics/tree/Atom_.cc b/source/src/core/kinematics/tree/Atom_.cc index 105ff2f7ea..0e3633eb94 100644 --- a/source/src/core/kinematics/tree/Atom_.cc +++ b/source/src/core/kinematics/tree/Atom_.cc @@ -487,7 +487,7 @@ Atom_::get_input_stub() const input_stub_atom2()->position(), input_stub_atom3()->position() ); - } catch ( utility::excn::EXCN_Msg_Exception const & ) { + } catch ( utility::excn::Exception const & ) { TR.Error << "Issue getting stub for atom " << atom_id() << " -- possibly due to degenerate/colinear atoms:" << std::endl; TR.Error << "\t " << input_stub_atom1_id() << " -- " << input_stub_atom1()->position() << std::endl; TR.Error << "\t " << input_stub_atom2_id() << " -- " << input_stub_atom2()->position() << std::endl; diff --git a/source/src/core/kinematics/util.cc b/source/src/core/kinematics/util.cc index ab122893e7..522db2a3e9 100644 --- a/source/src/core/kinematics/util.cc +++ b/source/src/core/kinematics/util.cc @@ -747,7 +747,7 @@ remodel_fold_tree_to_account_for_insertion( core::Size insert_after, //add insert_size to points after this in primary sequence in the tree core::Size insert_size){ if ( input_tree.is_jump_point(insert_after) ) { - throw utility::excn::EXCN_Msg_Exception("FoldTree utility remodel_fold_tree_to_account_for_insertion: I do not know how to handle insertion points that are also jump points - does the jump stay where it was or move to the end of the insert?"); + throw CREATE_EXCEPTION(utility::excn::Exception, "FoldTree utility remodel_fold_tree_to_account_for_insertion: I do not know how to handle insertion points that are also jump points - does the jump stay where it was or move to the end of the insert?"); } core::kinematics::FoldTree return_tree; for ( auto const & it : input_tree ) { diff --git a/source/src/core/pack/dunbrack/SingleResidueDunbrackLibrary.hh b/source/src/core/pack/dunbrack/SingleResidueDunbrackLibrary.hh index 8ade3bc581..5d5d146984 100644 --- a/source/src/core/pack/dunbrack/SingleResidueDunbrackLibrary.hh +++ b/source/src/core/pack/dunbrack/SingleResidueDunbrackLibrary.hh @@ -292,7 +292,7 @@ public: debug_assert( ! dun02_ ); //debug_assert( -180.0 <= chi && chi <= 180.0 ); if ( !(-180.0 <= chi && chi <= 180.0 ) ) { - throw utility::excn::EXCN_RangeError( + throw CREATE_EXCEPTION(utility::excn::RangeError, "chi angle must be between -180 and 180: "+utility::to_string(chi)); } diff --git a/source/src/core/pack/interaction_graph/LinearMemoryInteractionGraph.cc b/source/src/core/pack/interaction_graph/LinearMemoryInteractionGraph.cc index 57cc834ce1..c5f2d686c9 100644 --- a/source/src/core/pack/interaction_graph/LinearMemoryInteractionGraph.cc +++ b/source/src/core/pack/interaction_graph/LinearMemoryInteractionGraph.cc @@ -848,7 +848,7 @@ LinearMemEdge::get_sparse_aa_info( core::PackerEnergy LinearMemEdge::get_two_body_energy( int const , int const ) const { - throw utility::excn::EXCN_Msg_Exception( "Method unimplemented: LinearMemEdge::get_two_body_energy" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Method unimplemented: LinearMemEdge::get_two_body_energy" ); return 0.0; } diff --git a/source/src/core/pack/interaction_graph/SymmLinMemInteractionGraph.cc b/source/src/core/pack/interaction_graph/SymmLinMemInteractionGraph.cc index 3c2ba80028..d6e2f74d04 100644 --- a/source/src/core/pack/interaction_graph/SymmLinMemInteractionGraph.cc +++ b/source/src/core/pack/interaction_graph/SymmLinMemInteractionGraph.cc @@ -728,7 +728,7 @@ SymmLinearMemEdge::~SymmLinearMemEdge() core::PackerEnergy SymmLinearMemEdge::get_two_body_energy( int const , int const ) const { - throw utility::excn::EXCN_Msg_Exception( "Method unimplemented: SymmLinearMemEdge::get_two_body_energy" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Method unimplemented: SymmLinearMemEdge::get_two_body_energy" ); return 0.0; } diff --git a/source/src/core/pack/interaction_graph/SymmMinimalistInteractionGraph.cc b/source/src/core/pack/interaction_graph/SymmMinimalistInteractionGraph.cc index 06629b5270..c473a7d3c4 100644 --- a/source/src/core/pack/interaction_graph/SymmMinimalistInteractionGraph.cc +++ b/source/src/core/pack/interaction_graph/SymmMinimalistInteractionGraph.cc @@ -622,7 +622,7 @@ SymmMinimalistEdge::~SymmMinimalistEdge() {} core::PackerEnergy SymmMinimalistEdge::get_two_body_energy( int const , int const ) const { - throw utility::excn::EXCN_Msg_Exception( "Method unimplemented: SymmMinimalistEdge::get_two_body_energy" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Method unimplemented: SymmMinimalistEdge::get_two_body_energy" ); return 0.0; } diff --git a/source/src/core/pack/task/ResfileReader.cc b/source/src/core/pack/task/ResfileReader.cc index 672631d70e..56ed9cffa5 100644 --- a/source/src/core/pack/task/ResfileReader.cc +++ b/source/src/core/pack/task/ResfileReader.cc @@ -358,7 +358,7 @@ ResfileContents::parse_resid( // wait to the next token to figure that out. try { pose::parse_PDBnum_icode(token, fname_initialized_from_, lineno, PDBnum, icode); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { onError( e.msg() ); } } @@ -385,7 +385,7 @@ ResfileContents::parse_resid( try { pose::parse_PDBnum_icode(token, fname_initialized_from_, lineno, PDBnum_end, icode_end); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { onError( e.msg() ); } @@ -1495,7 +1495,7 @@ void onError( std::string message ){ static bool interactive = basic::options::option[ basic::options::OptionKeys::run::interactive ].value(); TR << message << std::endl; if ( interactive ) { - throw ResfileReaderException(message); + throw CREATE_EXCEPTION(ResfileReaderException, message); } else { utility_exit(); } diff --git a/source/src/core/pack/task/ResfileReader.hh b/source/src/core/pack/task/ResfileReader.hh index b1f09eb4d1..2710f78152 100644 --- a/source/src/core/pack/task/ResfileReader.hh +++ b/source/src/core/pack/task/ResfileReader.hh @@ -45,12 +45,12 @@ namespace pack { namespace task { -class ResfileReaderException: public utility::excn::EXCN_Msg_Exception +class ResfileReaderException: public utility::excn::Exception { public: - ResfileReaderException( std::string message ) : - utility::excn::EXCN_Msg_Exception( message ) + ResfileReaderException(char const *file, int line, std::string message ) : + utility::excn::Exception(file, line, message ) {} std::string get_message(){ diff --git a/source/src/core/pack/task/operation/OperateOnResidueSubset.cc b/source/src/core/pack/task/operation/OperateOnResidueSubset.cc index d6fe742264..db8b30e878 100644 --- a/source/src/core/pack/task/operation/OperateOnResidueSubset.cc +++ b/source/src/core/pack/task/operation/OperateOnResidueSubset.cc @@ -164,9 +164,9 @@ void OperateOnResidueSubset::parse_tag( TagCOP tag , DataMap & datamap ) selector_name = tag->getOption< std::string >( "selector" ); try { selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from OperateOnResidueSubset::parse_tag\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } } @@ -177,7 +177,7 @@ void OperateOnResidueSubset::parse_tag( TagCOP tag , DataMap & datamap ) if ( rltof && rltof->has_type( type ) ) { if ( rltop ) { std::string error_message = "Error from OperateOnResidueSubset::parse_tag: multiple residue-level task operations given; only one allowed\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } rltop = rltof->newRLTO( type ); rltop->parse_tag( subtag ); @@ -188,7 +188,7 @@ void OperateOnResidueSubset::parse_tag( TagCOP tag , DataMap & datamap ) if ( res_selector_factory && res_selector_factory->has_type( type ) ) { if ( selector ) { std::string error_message = "Error from OperateOnResidueSubset::parse_tag: multiple residue selectors given; only one allowed\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } selector = res_selector_factory->new_residue_selector( subtag->getName(), subtag, datamap ); TR(t_debug) << "using ResidueSelector of type " << type << std::endl; @@ -200,13 +200,13 @@ void OperateOnResidueSubset::parse_tag( TagCOP tag , DataMap & datamap ) if ( ! rltop ) { std::string error_message = "Error from OperateOnResidueSubset::parse_tag. No residue-level task operation provided\n"; error_message += "The residue level task operation must be provided as a subtag of the OperateOnResidueSubset tag\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } if ( ! selector ) { std::string error_message = "Error from OperateOnResidueSubset::parse_tag. No residue selector provided\n"; error_message += "The residue selector may be provided either as a subtag of the OperateOnResidueSubset tag\n"; error_message += "or through the 'selector' option.\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } op_ = rltop; diff --git a/source/src/core/pack/task/operation/ResFilterFactory.cc b/source/src/core/pack/task/operation/ResFilterFactory.cc index e6fc7499ce..06c0bd2484 100644 --- a/source/src/core/pack/task/operation/ResFilterFactory.cc +++ b/source/src/core/pack/task/operation/ResFilterFactory.cc @@ -99,8 +99,8 @@ void ResFilterFactory::define_res_filter_xml_schema( utility::tag::XMLSchemaDefi res_filter_xml_schema_group_name(), & complex_type_name_for_res_filter, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for ResFilters from ResFilterFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for ResFilters from ResFilterFactory; offending class" " must call core::pack::task::operation::complex_type_name_for_res_filter when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/core/pack/task/operation/ResLvlTaskOperationFactory.cc b/source/src/core/pack/task/operation/ResLvlTaskOperationFactory.cc index 5f924039fa..55b19c2233 100644 --- a/source/src/core/pack/task/operation/ResLvlTaskOperationFactory.cc +++ b/source/src/core/pack/task/operation/ResLvlTaskOperationFactory.cc @@ -112,8 +112,8 @@ void ResLvlTaskOperationFactory::define_res_lvl_task_op_xml_schema( utility::tag res_lvl_task_op_xml_schema_group_name(), & complex_type_name_for_res_lvl_task_op, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for ResLvlTaskOperations from ResLvlTaskOperationFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for ResLvlTaskOperations from ResLvlTaskOperationFactory; offending class" " must call core::pack::task::operation::complex_type_name_for_res_lvl_task_op when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/core/pack/task/operation/TaskOperationFactory.cc b/source/src/core/pack/task/operation/TaskOperationFactory.cc index 9dc1036a6e..bc79eafcda 100644 --- a/source/src/core/pack/task/operation/TaskOperationFactory.cc +++ b/source/src/core/pack/task/operation/TaskOperationFactory.cc @@ -191,8 +191,8 @@ void TaskOperationFactory::define_task_op_xml_schema( utility::tag::XMLSchemaDef task_operation_xml_schema_group_name(), & complex_type_name_for_task_op, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for TaskOperations from TaskOperationFactory\n" + e.msg() ); + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for TaskOperations from TaskOperationFactory\n" + e.msg() ); } } diff --git a/source/src/core/pack/task/operation/TaskOperations.cc b/source/src/core/pack/task/operation/TaskOperations.cc index c49886386f..88c3d187b4 100644 --- a/source/src/core/pack/task/operation/TaskOperations.cc +++ b/source/src/core/pack/task/operation/TaskOperations.cc @@ -603,7 +603,7 @@ InitializeFromOptionCollection::parse_tag( TagCOP tag, DataMap & datamap ) //runtime_assert( datamap.has( "options")); std::string which_options = tag->getOption< std::string >( "option_collection", "job_options" ); if ( ! datamap.has( "options", which_options ) ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find options named \"" + which_options + "\" in the InitializeFromOptionCollection task operation" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find options named \"" + which_options + "\" in the InitializeFromOptionCollection task operation" ); } options_ = datamap.get_ptr< utility::options::OptionCollection const >( "options", which_options ); } @@ -1084,9 +1084,9 @@ ReadResfile::parse_tag( TagCOP tag , DataMap &datamap ) std::string const selector_name ( tag->getOption< std::string >( "selector" ) ); try { set_residue_selector( datamap.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from ReadResfile::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } debug_assert(residue_selector_); } diff --git a/source/src/core/pose/ResidueIndexDescription.cc b/source/src/core/pose/ResidueIndexDescription.cc index 84cfb60c6b..e03457307a 100644 --- a/source/src/core/pose/ResidueIndexDescription.cc +++ b/source/src/core/pose/ResidueIndexDescription.cc @@ -76,7 +76,7 @@ ResidueIndexDescription::resolve_index( if ( unassigned_ ) { return 0; } if ( pose_numbered_ ) { if ( pose_index_ > pose.size() ) { - throw utility::excn::EXCN_Msg_Exception( "Residue index description exceeds the number of residues in the Pose: pose_index_ = " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Residue index description exceeds the number of residues in the Pose: pose_index_ = " + utility::to_string( pose_index_ ) + " vs pose.size() " + utility::to_string( pose.size() )); } return pose_index_; @@ -87,9 +87,9 @@ ResidueIndexDescription::resolve_index( if ( resid == 0 ) { // Dealing with the inability to return a null char constant by having two error messages. LAAAAAAME. if ( insertion_code() != ' ' ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to find PDB residue " + utility::to_string( resindex_ ) + insertion_code_ + ' ' + "on chain " + chain_ + " in input Pose" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find PDB residue " + utility::to_string( resindex_ ) + insertion_code_ + ' ' + "on chain " + chain_ + " in input Pose" ); } - throw utility::excn::EXCN_Msg_Exception( "Unable to find PDB residue " + utility::to_string( resindex_ ) + insertion_code_ + "on chain " + chain_ + " in input Pose" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find PDB residue " + utility::to_string( resindex_ ) + insertion_code_ + "on chain " + chain_ + " in input Pose" ); } return resid; } @@ -132,7 +132,7 @@ ResidueIndexDescriptionFromFile::resolve_index( if ( pose_numbered() ) { if ( pose_index() > pose.size() ) { - throw utility::excn::EXCN_Msg_Exception( "Residue index description given on line " + utility::to_string( linenum_ ) + + throw CREATE_EXCEPTION(utility::excn::Exception, "Residue index description given on line " + utility::to_string( linenum_ ) + " of the file named " + fname_ + " exceeds the number of residues in the Pose: pose_index_ = " + utility::to_string( pose_index() ) + " vs pose.size() " + utility::to_string( pose.size() )); } @@ -144,9 +144,9 @@ ResidueIndexDescriptionFromFile::resolve_index( if ( resid == 0 ) { // Dealing with the inability to return a null char constant by having two error messages. LAAAAAAME. if ( insertion_code() != ' ' ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to find PDB residue " + utility::to_string( resindex() ) + insertion_code() + ' ' + "on chain " + chain() + " in input Pose" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find PDB residue " + utility::to_string( resindex() ) + insertion_code() + ' ' + "on chain " + chain() + " in input Pose" ); } - throw utility::excn::EXCN_Msg_Exception( "Unable to find PDB residue " + utility::to_string( resindex() ) + insertion_code() + "on chain " + chain() + " in input Pose" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find PDB residue " + utility::to_string( resindex() ) + insertion_code() + "on chain " + chain() + " in input Pose" ); } return resid; } @@ -186,7 +186,7 @@ parse_PDBnum_icode( << " of the file '" << fname << "', " << "the token '" << token << "' " << "is not a valid [] identifier."; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } diff --git a/source/src/core/pose/chains_util.cc b/source/src/core/pose/chains_util.cc index 95921b0a5d..22c5fa1aa6 100644 --- a/source/src/core/pose/chains_util.cc +++ b/source/src/core/pose/chains_util.cc @@ -460,9 +460,9 @@ core::Size get_chain_id_from_chain(char const & chain, core::pose::Pose const & pose){ utility::vector1 chain_ids = get_chain_ids_from_chain(chain, pose); if ( chain_ids.size() == 0 ) { - throw utility::excn::EXCN_RangeError(" chain_id "+utility::to_string(chain)+" does not exist"); + throw CREATE_EXCEPTION(utility::excn::RangeError, " chain_id "+utility::to_string(chain)+" does not exist"); } else if ( chain_ids.size() > 1 ) { - throw utility::excn::EXCN_RangeError("chain_id "+utility::to_string(chain)+" represents more than one chain!"); + throw CREATE_EXCEPTION(utility::excn::RangeError, "chain_id "+utility::to_string(chain)+" represents more than one chain!"); } return chain_ids[1]; } diff --git a/source/src/core/pose/selection.cc b/source/src/core/pose/selection.cc index 608093534a..7bc43ad040 100644 --- a/source/src/core/pose/selection.cc +++ b/source/src/core/pose/selection.cc @@ -340,7 +340,7 @@ get_resnum_string( utility::tag::TagCOP tag_ptr, std::string const & prefix/*="" } else if ( tag_ptr->hasOption( prefix + "res_num" ) ) { return tag_ptr->getOption( prefix + "res_num" ); } - throw utility::excn::EXCN_RosettaScriptsOption("Either " + prefix + "pdb_num or " + prefix + "res_num must be specified."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Either " + prefix + "pdb_num or " + prefix + "res_num must be specified."); } std::string @@ -362,7 +362,7 @@ get_resnum_selector(utility::tag::TagCOP tag_ptr, std::string const& tag) { return core::select::residue_selector::ResidueSelectorOP( new core::select::residue_selector::ResidueIndexSelector( tag_ptr->getOption< std::string >( tag ) ) ); } else { TR.Fatal <<"No "<1 ) { All_CSA_lines_.push_back(CSA(res1,atom1,sigma1,sigma2,sigma3,CSAval,CSAerr,weight)); } else { if ( atom1!="N" ) { - throw( utility::excn::EXCN_BadInput( "only N15 CSA is supported, not yet for " )); + throw CREATE_EXCEPTION(utility::excn::BadInput, "only N15 CSA is supported, not yet for " ); } if ( res1<=1 ) { - throw( utility::excn::EXCN_BadInput( "residue id needs to be greater than 1" )); + throw CREATE_EXCEPTION(utility::excn::BadInput, "residue id needs to be greater than 1" ); } if ( sigma1>sigma2 || sigma1>sigma2 || sigma2>sigma3 ) { - throw( utility::excn::EXCN_BadInput( "sigma1 < sigma2 < sigma3" )); + throw CREATE_EXCEPTION(utility::excn::BadInput, "sigma1 < sigma2 < sigma3" ); } } @@ -637,5 +637,3 @@ CEREAL_REGISTER_TYPE( core::scoring::ChemicalShiftAnisotropy ) CEREAL_REGISTER_DYNAMIC_INIT( core_scoring_ChemicalShiftAnisotropy ) #endif // SERIALIZATION - - diff --git a/source/src/core/scoring/DipolarCoupling.cc b/source/src/core/scoring/DipolarCoupling.cc index 136e4c13a4..39b078f5b8 100644 --- a/source/src/core/scoring/DipolarCoupling.cc +++ b/source/src/core/scoring/DipolarCoupling.cc @@ -140,7 +140,7 @@ void DipolarCoupling::read_DC_file( std::string const& filename ) { utility::io::izstream infile(filename.c_str()); if ( !infile.good() ) { - throw( utility::excn::EXCN_FileNotFound( filename ) ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, filename ); } tr.Info << "Reading DC file " << filename << std::endl; @@ -155,7 +155,7 @@ void DipolarCoupling::read_DC_file( std::string const& filename ) { if ( line_stream.fail() ) { tr.Error << "couldn't read line " << line << " in dc-file " << filename << std::endl; - throw( utility::excn::EXCN_BadInput(" invalid line "+line+" in dc-file "+filename)); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line "+line+" in dc-file "+filename); } else { All_DC_lines_.push_back(DC(res1,atom1,res2,atom2,DCval,DCerr,weight)); } @@ -185,7 +185,7 @@ std::string element_string_dc(std::string atom) { if ( atom == "N" ) { return "N"; } - throw(utility::excn::EXCN_BadInput("unknown atom for DC: " + atom)); + throw CREATE_EXCEPTION(utility::excn::BadInput, "unknown atom for DC: " + atom); return ""; //to make compile happy. } ////////////////////////////////////////////////////// @@ -205,8 +205,7 @@ DC::DC_TYPE DC::get_DC_data_type(std::string const & atom1, std::string const & } else if ( (elem1 == "C" && elem2 == "C") ) { DC_type = DC_TYPE_CC; } else { - throw(utility::excn::EXCN_BadInput( - "unknown combination of atoms for DC " + atom1 + " " + atom2)); + throw CREATE_EXCEPTION(utility::excn::BadInput, "unknown combination of atoms for DC " + atom1 + " " + atom2); } return DC_type; } @@ -333,7 +332,7 @@ Real DipolarCoupling::compute_dcscore(core::pose::Pose & pose) { dc.f2ij_[2] = All_DC_line.weight()*2*devDC*dv_zB; } } else { - throw(utility::excn::EXCN_BadInput( "DC value not in resonable range")); + throw CREATE_EXCEPTION(utility::excn::BadInput, "DC value not in resonable range"); } //Add weight to energy @@ -411,5 +410,3 @@ CEREAL_REGISTER_TYPE( core::scoring::DipolarCoupling ) CEREAL_REGISTER_DYNAMIC_INIT( core_scoring_DipolarCoupling ) #endif // SERIALIZATION - - diff --git a/source/src/core/scoring/MembranePotential.cc b/source/src/core/scoring/MembranePotential.cc index 0e09bebb5f..bc830719f8 100644 --- a/source/src/core/scoring/MembranePotential.cc +++ b/source/src/core/scoring/MembranePotential.cc @@ -368,7 +368,7 @@ MembranePotential::evaluate_env( Real fcen6 ( cenlist_from_pose( pose ).fcen6( rsd.seqpos() ) ); Real fcen10 ( cenlist_from_pose( pose ).fcen10( rsd.seqpos() ) ); - // in rare cases, the density is over 15 within 6 + // in rare cases, the density is over 15 within 6 if ( fcen6 > 15 ) fcen6 = 15 ; if ( fcen10 > 40 ) fcen10 = 40; diff --git a/source/src/core/scoring/MembraneTopology.hh b/source/src/core/scoring/MembraneTopology.hh index 3df74c9852..5fd46f4c85 100644 --- a/source/src/core/scoring/MembraneTopology.hh +++ b/source/src/core/scoring/MembraneTopology.hh @@ -128,7 +128,7 @@ public: allow_scoring(Size const seqpos) const { if ( seqpos > allow_scoring_.size() ) { - throw utility::excn::EXCN_RangeError( + throw CREATE_EXCEPTION(utility::excn::RangeError, "tried to get Membrane score for residue " + utility::to_string(seqpos) + " but spanfile only specifies " + diff --git a/source/src/core/scoring/ResidualDipolarCoupling.cc b/source/src/core/scoring/ResidualDipolarCoupling.cc index db7f81ee70..6415f669e1 100644 --- a/source/src/core/scoring/ResidualDipolarCoupling.cc +++ b/source/src/core/scoring/ResidualDipolarCoupling.cc @@ -163,7 +163,7 @@ void ResidualDipolarCoupling::read_RDC_file( Size expid, std::string const& file std::string line; utility::io::izstream infile(filename.c_str()); if ( !infile.good() ) { - throw( utility::excn::EXCN_FileNotFound( filename ) ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, filename ) ; } // std::cout << "Reading RDC file " << filename << std::endl; tr.Info << "Reading RDC file " << filename << std::endl; @@ -180,12 +180,12 @@ void ResidualDipolarCoupling::read_RDC_file( Size expid, std::string const& file if ( line_stream.fail() ) { tr.Error << "couldn't read line " << line << " in rdc-file " << filename << std::endl; - throw( utility::excn::EXCN_BadInput(" invalid line "+line+" in rdc-file "+filename)); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line "+line+" in rdc-file "+filename); } if ( res1 < 1 || res2 < 1 ) { tr.Error << "negative residue number in line " << line << " in rdc-file " << filename << std::endl; - throw( utility::excn::EXCN_BadInput(" invalid line "+line+" in rdc_file " + filename ) ); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line "+line+" in rdc_file " + filename ); } Real weight(1.0); @@ -201,7 +201,7 @@ void ResidualDipolarCoupling::read_RDC_file( Size expid, std::string const& file } if ( All_RDC_lines_.size() == lines_previously_read ) { tr.Error << "file empty ? " << std::endl; - throw( utility::excn::EXCN_BadInput(" no valid RDCs found in file " + filename + "\n" )); + throw CREATE_EXCEPTION(utility::excn::BadInput, " no valid RDCs found in file " + filename + "\n" ); } //lines_previously_read = All_RDC_lines_.size(); //unused } @@ -234,8 +234,7 @@ void ResidualDipolarCoupling::read_RDC_file() { if ( line_stream.fail() ) { tr.Error << "reading rdc-weight-file " << filename << std::endl; - throw(utility::excn::EXCN_BadInput(" invalid line " + line - + " in rdc-weight-file " + filename)); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line " + line + " in rdc-weight-file " + filename); } for ( auto & All_RDC_line : All_RDC_lines_ ) { if ( All_RDC_line.res1() == res1 ) { @@ -331,7 +330,7 @@ std::string element_string(std::string atom) { if ( atom == "N" ) { return "N"; } - throw(utility::excn::EXCN_BadInput("unknown atom for RDC: " + atom)); + throw CREATE_EXCEPTION(utility::excn::BadInput, "unknown atom for RDC: " + atom); return ""; //to make compile happy. } @@ -357,8 +356,7 @@ RDC::RDC_TYPE RDC::get_RDC_data_type(std::string const & atom1, } else if ( (elem1 == "N" && elem2 == "CA") || (elem1 == "CA" && elem2 == "N") ) { RDC_type = RDC_TYPE_NCA; } else { - throw(utility::excn::EXCN_BadInput( - "unknown combination of atoms for RDC " + atom1 + " " + atom2)); + throw CREATE_EXCEPTION(utility::excn::BadInput, "unknown combination of atoms for RDC " + atom1 + " " + atom2); } return RDC_type; } @@ -533,7 +531,7 @@ Real ResidualDipolarCoupling::compute_dipscore(core::pose::Pose const& pose) { try { m_inv_gen(T_[ex], 5, T_[ex]); // std::cout << "performing SVD decomposition" << std::endl; - } catch (utility::excn::EXCN_BadInput &excn) { + } catch (utility::excn::BadInput &excn) { if ( tr.Debug.visible() ) { pose.dump_pdb("failed_jacobi.pdb"); } @@ -584,7 +582,7 @@ Real ResidualDipolarCoupling::compute_dipscore(core::pose::Pose const& pose) { //Always diagonalize the matrix to find out the alignment try { compute_tensor_stats(); - } catch (utility::excn::EXCN_BadInput &excn) { + } catch (utility::excn::BadInput &excn) { if ( tr.Debug.visible() ) { pose.dump_pdb("failed_jacobi.pdb"); } @@ -1263,7 +1261,7 @@ ResidualDipolarCoupling::do_correct_NH( invr = 1.0 / sqrt(r2); } else { tr.Error << "unreognized type or residue sequence separation does not allow using correct_NH" << std::endl; - throw( utility::excn::EXCN_BadInput("unreognized type or residue sequence separation does not allow using correct_NH ")); + throw CREATE_EXCEPTION(utility::excn::BadInput, "unreognized type or residue sequence separation does not allow using correct_NH "); } } @@ -1524,7 +1522,7 @@ void jacobi( ResidualDipolarCoupling::Tensor5 & a, ResidualDipolarCoupling::rvec } } //probably different type of Exception is better suited - throw( utility::excn::EXCN_BadInput(" too many iterations in Jacobi when compute RDC tensor") ); + throw CREATE_EXCEPTION(utility::excn::BadInput, " too many iterations in Jacobi when compute RDC tensor"); } void jacobi3( @@ -1610,7 +1608,7 @@ void jacobi3( } } //probably different type of Exception is better suited - throw( utility::excn::EXCN_BadInput(" too many iterations in Jacobi when compute RDC tensor") ); + throw CREATE_EXCEPTION(utility::excn::BadInput, " too many iterations in Jacobi when compute RDC tensor"); } } //namespace Scoring diff --git a/source/src/core/scoring/ResidualDipolarCoupling_Rohl.cc b/source/src/core/scoring/ResidualDipolarCoupling_Rohl.cc index ad2aa606c9..00b5d44b9e 100644 --- a/source/src/core/scoring/ResidualDipolarCoupling_Rohl.cc +++ b/source/src/core/scoring/ResidualDipolarCoupling_Rohl.cc @@ -96,7 +96,7 @@ void ResidualDipolarCoupling_Rohl::read_RDC_file() line_stream >> res1 >> atom1 >> res2 >> atom2 >> Jdipolar; if ( line_stream.fail() ) { tr.Error << "couldn't read line " << line << " in rdc-file " << filename << "\n"; - throw( utility::excn::EXCN_BadInput(" invalid line "+line+" in rdc-file "+filename)); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line "+line+" in rdc-file "+filename); } Real weight( 1.0 ); @@ -126,7 +126,7 @@ void ResidualDipolarCoupling_Rohl::read_RDC_file() line_stream >> res1 >> weight; if ( line_stream.fail() ) { tr.Error << "reading rdc-weight-file " << filename << std::endl; - throw( utility::excn::EXCN_BadInput(" invalid line "+line+" in rdc-weight-file "+filename)); + throw CREATE_EXCEPTION(utility::excn::BadInput, " invalid line "+line+" in rdc-weight-file "+filename); } for ( auto & All_RDC_line : All_RDC_lines ) { if ( All_RDC_line.res() == res1 ) All_RDC_line.weight( weight ); diff --git a/source/src/core/scoring/ScoringManager.cc b/source/src/core/scoring/ScoringManager.cc index 278472a810..74be7662fe 100644 --- a/source/src/core/scoring/ScoringManager.cc +++ b/source/src/core/scoring/ScoringManager.cc @@ -2071,7 +2071,7 @@ ScoringManager::energy_method( if ( score_type == python ) return nullptr; /// python special case; this could now be changed... if ( method_creator_map_[ score_type ] == nullptr ) { - throw utility::excn::EXCN_Msg_Exception( "Requested ScoreType '" + utility::to_string( score_type ) + "' does not have a registered EnergyMethodCreator." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Requested ScoreType '" + utility::to_string( score_type ) + "' does not have a registered EnergyMethodCreator." ); } return method_creator_map_[ score_type ]->create_energy_method( options ); diff --git a/source/src/core/scoring/aa_composition_energy/AACompositionEnergySetup.hh b/source/src/core/scoring/aa_composition_energy/AACompositionEnergySetup.hh index 9dab4939ee..9725fe9931 100644 --- a/source/src/core/scoring/aa_composition_energy/AACompositionEnergySetup.hh +++ b/source/src/core/scoring/aa_composition_energy/AACompositionEnergySetup.hh @@ -401,7 +401,7 @@ private: return ( fract_location * property_penalties_[index][i] + (1.0-fract_location) * property_penalties_[index][i-1] ); //Linearly interpolate and return a penalty } } - throw utility::excn::EXCN_Msg_Exception( "Error in core::scoring::aa_composition_energy::AACompositionEnergySetup::interpolate_property_penalties(): No pair of penalties for interpolation could be found! This shouldn't happen, so consult the developer." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Error in core::scoring::aa_composition_energy::AACompositionEnergySetup::interpolate_property_penalties(): No pair of penalties for interpolation could be found! This shouldn't happen, so consult the developer." ); return 0.0; //To make compiler happy, though this line will never be reached. } diff --git a/source/src/core/scoring/bin_transitions/BinTransitionData.cc b/source/src/core/scoring/bin_transitions/BinTransitionData.cc index 6eabac5a86..c3dcf17d25 100644 --- a/source/src/core/scoring/bin_transitions/BinTransitionData.cc +++ b/source/src/core/scoring/bin_transitions/BinTransitionData.cc @@ -715,7 +715,7 @@ core::Size BinTransitionData::which_bin_i( utility::vector1 < core::Real > const std::ostringstream outstr; outstr << "In BinTransitionData::which_bin(): The bin corresponding to the input vector " << mainchain_torsions << " could not be found!\n"; TR.Error << outstr.str() << std::endl; - throw utility::excn::EXCN_Msg_Exception( outstr.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, outstr.str() ); } return bin_index; diff --git a/source/src/core/scoring/constraints/AmbiguousNMRConstraint.cc b/source/src/core/scoring/constraints/AmbiguousNMRConstraint.cc index 73a8e4b5ab..289b2ab56a 100644 --- a/source/src/core/scoring/constraints/AmbiguousNMRConstraint.cc +++ b/source/src/core/scoring/constraints/AmbiguousNMRConstraint.cc @@ -293,7 +293,7 @@ AmbiguousNMRConstraint::add_individual_constraint( ConstraintCOP cst_in ) cst_in_casted = utility::pointer::dynamic_pointer_cast< AtomPairConstraint const >( cst_in ); } if ( !cst_in_casted ) { - throw utility::excn::EXCN_BadInput( "failed attempt to add " + cst_in->type() + " to AmbiguousNMRConstraint. Can only add AmbiguousNMRDistanceConstraint and AtomPairConstraint"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "failed attempt to add " + cst_in->type() + " to AmbiguousNMRConstraint. Can only add AmbiguousNMRDistanceConstraint and AtomPairConstraint"); } //is it unique ? -- otherwise reject constraint for ( ConstraintCOPs::const_iterator it=member_constraints().begin(); it != member_constraints().end(); ++it ) { diff --git a/source/src/core/scoring/constraints/ConstraintIO.cc b/source/src/core/scoring/constraints/ConstraintIO.cc index 0cd725433c..fb3a3b921a 100644 --- a/source/src/core/scoring/constraints/ConstraintIO.cc +++ b/source/src/core/scoring/constraints/ConstraintIO.cc @@ -536,7 +536,7 @@ ConstraintIO::read_individual_constraint_new( if ( cst_op ) { // try { cst_op->read_def( data, pose, func_factory ); - // } catch ( utility::excn::EXCN_Exception &excn ) { + // } catch (utility::excn::Exception &excn ) { // tr.Error << "reading of " + tag + " failed.\n" << excn << std::endl; // cst_op = NULL; //} diff --git a/source/src/core/scoring/constraints/NamedAngleConstraint.cc b/source/src/core/scoring/constraints/NamedAngleConstraint.cc index 26979f1d35..d15ac71f3e 100644 --- a/source/src/core/scoring/constraints/NamedAngleConstraint.cc +++ b/source/src/core/scoring/constraints/NamedAngleConstraint.cc @@ -184,13 +184,13 @@ NamedAngleConstraint::setup_for_scoring( func::XYZ_Func const & xyz, ScoreFunct TR.Warning << std::endl; } if ( !atom1().valid() ) { - throw core::id::EXCN_AtomNotFound( named_atom1_ ); + throw CREATE_EXCEPTION(core::id::EXCN_AtomNotFound, named_atom1_ ); } if ( !atom2().valid() ) { - throw core::id::EXCN_AtomNotFound( named_atom2_ ); + throw CREATE_EXCEPTION(core::id::EXCN_AtomNotFound, named_atom2_ ); } if ( !atom3().valid() ) { - throw core::id::EXCN_AtomNotFound( named_atom3_ ); + throw CREATE_EXCEPTION(core::id::EXCN_AtomNotFound, named_atom3_ ); } } } diff --git a/source/src/core/scoring/constraints/NamedAtomPairConstraint.cc b/source/src/core/scoring/constraints/NamedAtomPairConstraint.cc index ef200451e4..d30c8e9a7a 100644 --- a/source/src/core/scoring/constraints/NamedAtomPairConstraint.cc +++ b/source/src/core/scoring/constraints/NamedAtomPairConstraint.cc @@ -135,10 +135,10 @@ NamedAtomPairConstraint::setup_for_scoring( func::XYZ_Func const & xyz, ScoreFu tr.Warning << std::endl; } if ( !atom1().valid() ) { - throw core::id::EXCN_AtomNotFound( named_atom1_ ); + throw CREATE_EXCEPTION(core::id::EXCN_AtomNotFound, named_atom1_ ); } if ( !atom2().valid() ) { - throw core::id::EXCN_AtomNotFound( named_atom2_ ); + throw CREATE_EXCEPTION(core::id::EXCN_AtomNotFound, named_atom2_ ); } } } @@ -194,7 +194,7 @@ NamedAtomPairConstraint::read_def( func::FuncOP new_func = func_factory.new_func( func_type ); if ( ! new_func ) { - throw utility::excn::EXCN_Msg_Exception( "The function type '" + func_type + "' is not valid" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "The function type '" + func_type + "' is not valid" ); } new_func->read_data( data ); set_func( new_func ); diff --git a/source/src/core/scoring/electron_density/ElectronDensityLoader.cc b/source/src/core/scoring/electron_density/ElectronDensityLoader.cc index 92b706c1a0..88d01e4af9 100644 --- a/source/src/core/scoring/electron_density/ElectronDensityLoader.cc +++ b/source/src/core/scoring/electron_density/ElectronDensityLoader.cc @@ -70,7 +70,7 @@ ElectronDensityLoader::create_resource( ) const { if ( ! dynamic_cast< ElectronDensityOptions const * >( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "ElectronDensityLoader expected to get a ElectronDensityOptions object, " "but was given a ResourceOptions of type '" + options.type() + "', " "which has the name '" + options.name() + "'." ); diff --git a/source/src/core/scoring/fiber_diffraction/FiberDiffractionLoader.cc b/source/src/core/scoring/fiber_diffraction/FiberDiffractionLoader.cc index c7aa881154..f9902c42a4 100644 --- a/source/src/core/scoring/fiber_diffraction/FiberDiffractionLoader.cc +++ b/source/src/core/scoring/fiber_diffraction/FiberDiffractionLoader.cc @@ -69,7 +69,7 @@ FiberDiffractionLoader::create_resource( ) const { if ( ! dynamic_cast< FiberDiffractionOptions const * >( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "FiberDiffractionLoader expected to get a FiberDiffractionOptions object, " "but was given a ResourceOptions of type '" + options.type() + "', " "which has the name '" + options.name() + "'." ); diff --git a/source/src/core/scoring/hbonds/HBondDatabase.cc b/source/src/core/scoring/hbonds/HBondDatabase.cc index 68df0aaf64..6aa4341563 100644 --- a/source/src/core/scoring/hbonds/HBondDatabase.cc +++ b/source/src/core/scoring/hbonds/HBondDatabase.cc @@ -366,7 +366,7 @@ HBondDatabase::initialize_HBPoly1D() xmin, xmax, min_val, max_val, root1, root2, degree, coefficients_) ); - } catch ( utility::excn::EXCN_Msg_Exception& excn ) { + } catch ( utility::excn::Exception& excn ) { std::stringstream msg; msg << "ERROR: Unable to construct the polynomial '" << polynomial_name << "' " @@ -376,7 +376,7 @@ HBondDatabase::initialize_HBPoly1D() << std::endl << "because of the following errors:" << std::endl << excn.msg() << std::endl; - throw( utility::excn::EXCN_Msg_Exception( msg.str() ) ); + throw( CREATE_EXCEPTION(utility::excn::Exception, msg.str() ) ); } if ( HBPoly1D_lookup_.size() + 1 != id ) { diff --git a/source/src/core/scoring/hbonds/hbonds_geom.cc b/source/src/core/scoring/hbonds/hbonds_geom.cc index 8afe9906d3..be86171bca 100644 --- a/source/src/core/scoring/hbonds/hbonds_geom.cc +++ b/source/src/core/scoring/hbonds/hbonds_geom.cc @@ -1532,7 +1532,7 @@ hb_energy_deriv( #ifndef BOINC bool fail_on_bad_hbond = basic::options::option[ basic::options::OptionKeys::in::file::fail_on_bad_hbond ](); if ( fail_on_bad_hbond ) { - throw( utility::excn::EXCN_Msg_Exception( warning ) ); + throw( CREATE_EXCEPTION(utility::excn::Exception, warning ) ); // AMW: cppcheck flags this as unnecessary; I am keeping it just in case // because BOINC is important utility_exit(); diff --git a/source/src/core/scoring/hbonds/types.cc b/source/src/core/scoring/hbonds/types.cc index 0d5909f1d2..f8b5172eda 100644 --- a/source/src/core/scoring/hbonds/types.cc +++ b/source/src/core/scoring/hbonds/types.cc @@ -58,7 +58,7 @@ HBEvalType string_to_hb_eval_type(std::string const& hbe_str) { std::stringstream msg; msg << "Cannot convert " << hbe_str << " into an HBEvalType" << std::endl; - throw( utility::excn::EXCN_Msg_Exception( msg.str() )); + throw( CREATE_EXCEPTION(utility::excn::Exception, msg.str() )); } diff --git a/source/src/core/scoring/methods/CartesianBondedEnergy.cc b/source/src/core/scoring/methods/CartesianBondedEnergy.cc index 7070a29092..9cf9693e3b 100644 --- a/source/src/core/scoring/methods/CartesianBondedEnergy.cc +++ b/source/src/core/scoring/methods/CartesianBondedEnergy.cc @@ -2347,7 +2347,7 @@ CartesianBondedEnergy::eval_singleres_energy( eval_singleres_length_energies( rsd, resparams, phi, psi, pose, emap ); try { eval_singleres_ring_energies( rsd, pose, emap );//removed resparams - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { pose.dump_pdb("badstructure.pdb"); std::cout << "caught exception " << e.msg() << std::endl; exit(0); diff --git a/source/src/core/scoring/sc/MolecularSurfaceCalculator.cc b/source/src/core/scoring/sc/MolecularSurfaceCalculator.cc index 6403a0d9df..60041dbad3 100644 --- a/source/src/core/scoring/sc/MolecularSurfaceCalculator.cc +++ b/source/src/core/scoring/sc/MolecularSurfaceCalculator.cc @@ -192,7 +192,7 @@ int MolecularSurfaceCalculator::Calc() { run_.results.valid = 0; if ( run_.atoms.empty() ) { - throw ShapeComplementarityCalculatorException("No atoms defined"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No atoms defined"); } // Determine assign the attention numbers for each atom @@ -214,7 +214,7 @@ int MolecularSurfaceCalculator::Calc() { void MolecularSurfaceCalculator::GenerateMolecularSurfaces() { if ( run_.atoms.empty() ) { - throw ShapeComplementarityCalculatorException("No atoms defined"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No atoms defined"); } // Now compute the surface for the atoms in the interface and its neighbours @@ -552,7 +552,7 @@ int MolecularSurfaceCalculator::FindNeighborsForAtom(Atom &atom1) d2 = atom1.distance_squared(atom2); if ( d2 <= 0.0001 ) { - throw ShapeComplementarityCalculatorException("Coincident atoms: %d:%s:%s @ (%.3f, %.3f, %.3f) == %d:%s:%s @ (%.3f, %.3f, %.3f)", + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Coincident atoms: %d:%s:%s @ (%.3f, %.3f, %.3f) == %d:%s:%s @ (%.3f, %.3f, %.3f)", atom1.natom, atom1.residue, atom1.atom, atom1.x(), atom1.y(), atom1.z(), atom2.natom, atom2.residue, atom2.atom, atom2.x(), atom2.y(), atom2.z()); } @@ -798,13 +798,13 @@ int MolecularSurfaceCalculator::GenerateConvexSurface(Atom const &atom1) tij = ((atom1 + *neighbor) * 0.5f) + (uij * (asymm * 0.5f)); _far_ = pow(eri + erj, 2) - dij*dij; if ( _far_ <= 0.0 ) { - throw ShapeComplementarityCalculatorException("Imaginary _far_ for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Imaginary _far_ for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); } _far_ = sqrt(_far_); contain = pow(dij, 2) - pow(ri - rj, 2); if ( contain <= 0.0 ) { - throw ShapeComplementarityCalculatorException("Imaginary contain for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Imaginary contain for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); } contain = sqrt(contain); rij = 0.5 * _far_ * contain / dij; @@ -812,7 +812,7 @@ int MolecularSurfaceCalculator::GenerateConvexSurface(Atom const &atom1) south = (pij - atom1) / eri; if ( north.cross(south).dot(eqvec) <= 0.0 ) { - throw ShapeComplementarityCalculatorException("Non-positive frame for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Non-positive frame for atom %d, neighbor atom %d", atom1.natom, neighbor->natom); } } @@ -1244,7 +1244,7 @@ MolecularSurfaceCalculator::ScValue MolecularSurfaceCalculator::SubDiv( } if ( a + delta < angle ) { - throw ShapeComplementarityCalculatorException("Too many subdivisions"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Too many subdivisions"); } if ( !points.empty() ) { diff --git a/source/src/core/scoring/sc/ShapeComplementarityCalculator.cc b/source/src/core/scoring/sc/ShapeComplementarityCalculator.cc index 80289a6371..9564bc7368 100644 --- a/source/src/core/scoring/sc/ShapeComplementarityCalculator.cc +++ b/source/src/core/scoring/sc/ShapeComplementarityCalculator.cc @@ -151,13 +151,13 @@ int ShapeComplementarityCalculator::Calc() run_.results.valid = 0; if ( run_.atoms.empty() ) { - throw ShapeComplementarityCalculatorException("No atoms defined"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No atoms defined"); } if ( !run_.results.surface[0].nAtoms ) { - throw ShapeComplementarityCalculatorException("No atoms defined for molecule 1"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No atoms defined for molecule 1"); } if ( !run_.results.surface[1].nAtoms ) { - throw ShapeComplementarityCalculatorException("No atoms defined for molecule 2"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No atoms defined for molecule 2"); } // Determine and assign the attention numbers for each atom @@ -166,7 +166,7 @@ int ShapeComplementarityCalculator::Calc() GenerateMolecularSurfaces(); if ( !run_.dots[0].size() || !run_.dots[1].size() ) { - throw ShapeComplementarityCalculatorException("No molecular dots generated!"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "No molecular dots generated!"); } // Cut away the periphery of each surface @@ -176,7 +176,7 @@ int ShapeComplementarityCalculator::Calc() for ( int i = 0; i < 2; ++i ) { run_.results.surface[i].trimmedArea = TrimPeripheralBand(run_.dots[i], trimmed_dots[i]); if ( !trimmed_dots[i].size() ) { - throw utility::excn::EXCN_Msg_Exception("No molecular dots for surface " + utility::to_string( i )); + throw CREATE_EXCEPTION(utility::excn::Exception, "No molecular dots for surface " + utility::to_string( i )); } run_.results.surface[i].nTrimmedDots = trimmed_dots[i].size(); run_.results.surface[i].nAllDots = run_.dots[i].size(); @@ -540,7 +540,7 @@ ShapeComplementarityCalculator::ScValue ShapeComplementarityCalculator::gpuTrimP hDotColl = new char[UPPER_MULTIPLE(n, threads)]; if(!hAccDotCoords || !hBurDotCoords || !hDotColl) { - throw ShapeComplementarityCalculatorException("Out of host memory!"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Out of host memory!"); } // Make GPU copy of (x, y, z) buried and accessible coordinates @@ -580,7 +580,7 @@ ShapeComplementarityCalculator::ScValue ShapeComplementarityCalculator::gpuTrimP GPU_OUT, UPPER_MULTIPLE(nBur, threads) * sizeof(*hDotColl), hDotColl, GPU_FLOAT, r2, NULL)) { - throw ShapeComplementarityCalculatorException("Failed to launch GPU kernel TrimPeripheralBand!"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Failed to launch GPU kernel TrimPeripheralBand!"); } // Make a new list of dots that have no collisions @@ -669,7 +669,7 @@ int ShapeComplementarityCalculator::gpuFindClosestNeighbors( GPU_INT, nTheirDots, GPU_OUT, UPPER_MULTIPLE(nNeighbors, threads) * sizeof(*hNeighbors), hNeighbors, NULL)) { - throw ShapeComplementarityCalculatorException("Failed to launch GPU kernel FindClosestNeighbor!"); + throw CREATE_EXCEPTION(ShapeComplementarityCalculatorException, "Failed to launch GPU kernel FindClosestNeighbor!"); } for(int i = 0; i < nNeighbors; ++i) diff --git a/source/src/core/scoring/sc/ShapeComplementarityCalculator_Private.hh b/source/src/core/scoring/sc/ShapeComplementarityCalculator_Private.hh index 38a96fe11d..deb58e3544 100644 --- a/source/src/core/scoring/sc/ShapeComplementarityCalculator_Private.hh +++ b/source/src/core/scoring/sc/ShapeComplementarityCalculator_Private.hh @@ -47,13 +47,13 @@ enum __ATTEN_ENUM__ { //////////////////////////////////////////////////////////// -class ShapeComplementarityCalculatorException : public utility::excn::EXCN_Msg_Exception { +class ShapeComplementarityCalculatorException : public utility::excn::Exception { public: std::string error; - ShapeComplementarityCalculatorException(const char *err, ...) : - utility::excn::EXCN_Msg_Exception( std::string() ) + ShapeComplementarityCalculatorException(char const *file, int line, const char *err, ...) : + utility::excn::Exception(file, line, std::string() ) { va_list p; char buf[256]; diff --git a/source/src/core/select/jump_selector/AndJumpSelector.cc b/source/src/core/select/jump_selector/AndJumpSelector.cc index 469f582e89..694acf923c 100644 --- a/source/src/core/select/jump_selector/AndJumpSelector.cc +++ b/source/src/core/select/jump_selector/AndJumpSelector.cc @@ -89,10 +89,10 @@ void AndJumpSelector::parse_my_tag( std::string selectors_str; try { selectors_str = tag->getOption< std::string >( "selectors" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selectors' from AndJumpSelector::parse_my_tag.\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } utility::vector1< std::string > selector_names = utility::string_split( selectors_str, ',' ); @@ -100,11 +100,11 @@ void AndJumpSelector::parse_my_tag( try { JumpSelectorCOP selector = datamap.get_ptr< JumpSelector const >( "JumpSelector", selector_name ); local_selectors.push_back( selector ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find JumpSelector named '" << selector_name << "' from the Datamap from AndJumpSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } } // hasOption selectors @@ -122,7 +122,7 @@ void AndJumpSelector::parse_my_tag( if ( local_selectors.empty() ) { //size() == 0 ) { std::stringstream error_msg; error_msg << "No JumpSelectors given to the AndJumpSelector; AndJumpSelector requires at least one JumpSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } for ( auto const & local_selector : local_selectors ) { diff --git a/source/src/core/select/jump_selector/JumpIndexSelector.cc b/source/src/core/select/jump_selector/JumpIndexSelector.cc index bbb1fe2dcb..366b5c469f 100644 --- a/source/src/core/select/jump_selector/JumpIndexSelector.cc +++ b/source/src/core/select/jump_selector/JumpIndexSelector.cc @@ -89,11 +89,11 @@ JumpIndexSelector::parse_my_tag( { try { jump( tag->getOption< int >( "jump" ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream err_msg; err_msg << "Failed to access required option 'jump' from JumpIndexSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } diff --git a/source/src/core/select/jump_selector/JumpSelectorFactory.cc b/source/src/core/select/jump_selector/JumpSelectorFactory.cc index 4dfa54ca31..428c9b3b53 100644 --- a/source/src/core/select/jump_selector/JumpSelectorFactory.cc +++ b/source/src/core/select/jump_selector/JumpSelectorFactory.cc @@ -39,7 +39,7 @@ JumpSelectorFactory::factory_register( JumpSelectorCreatorOP creator ) if ( creator_map_.find( creator->keyname() ) != creator_map_.end() ) { std::string err_msg = "Factory Name Conflict: Two or more JumpSelectorCreators registered with the name " + creator->keyname(); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -62,7 +62,7 @@ JumpSelectorFactory::provide_xml_schema( ) const { if ( ! has_type( selector_name ) ) { std::string err_msg = "No JumpSelectorCreator with the name '" + selector_name + "' has been registered with the JumpSelectorFactory"; - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } std::map< std::string, JumpSelectorCreatorOP >::const_iterator iter = creator_map_.find( selector_name ); iter->second->provide_xml_schema( xsd ); @@ -76,7 +76,7 @@ JumpSelectorOP JumpSelectorFactory::new_jump_selector( { if ( ! has_type( selector_name ) ) { std::string err_msg = "No JumpSelectorCreator with the name '" + selector_name + "' has been registered with the JumpSelectorFactory"; - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } std::map< std::string, JumpSelectorCreatorOP >::const_iterator iter = creator_map_.find( selector_name ); JumpSelectorOP new_selector = iter->second->create_jump_selector(); @@ -98,8 +98,8 @@ void JumpSelectorFactory::define_jump_selector_xml_schema( utility::tag::XMLSche jump_selector_xml_schema_group_name(), & complex_type_name_for_jump_selector, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for JumpSelectors from JumpSelectorFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for JumpSelectors from JumpSelectorFactory; offending class" " must call core::select::jump_selector::complex_type_name_for_jump_selector when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/core/select/jump_selector/NotJumpSelector.cc b/source/src/core/select/jump_selector/NotJumpSelector.cc index 9d754bf6ee..778b13d6ee 100644 --- a/source/src/core/select/jump_selector/NotJumpSelector.cc +++ b/source/src/core/select/jump_selector/NotJumpSelector.cc @@ -76,33 +76,33 @@ void NotJumpSelector::parse_my_tag( if ( tag->hasOption( "selector" ) ) { // fetch selector from datamap if ( tag->size() > 1 ) { // has subtags - throw utility::excn::EXCN_Msg_Exception( "NotJumpSelector can negate ONE JumpSelector! Either specify 'selector' option or provide subtags but not BOTH\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NotJumpSelector can negate ONE JumpSelector! Either specify 'selector' option or provide subtags but not BOTH\n" ); } // grab the JumpSelector to be negated from the selector option // and then grab each of the indicated jump selectors from the datamap. std::string selector_str; try { selector_str = tag->getOption< std::string >( "selector" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access required option 'selector' from NotJumpSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } try { JumpSelectorCOP selector = datamap.get_ptr< JumpSelector const >( "JumpSelector", selector_str ); set_jump_selector(selector); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find JumpSelector named '" << selector_str << "' from the Datamap from NotJumpSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else if ( tag->size() > 1 ) { // attempt reading subtag utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "NotJumpSelector takes exactly ONE JumpSelector! Multiple selectors were specified.\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NotJumpSelector takes exactly ONE JumpSelector! Multiple selectors were specified.\n" ); } JumpSelectorCOP rs = JumpSelectorFactory::get_instance()->new_jump_selector( tags.front()->getName(), @@ -115,7 +115,7 @@ void NotJumpSelector::parse_my_tag( if ( !selector_ ) { std::stringstream error_msg; error_msg << "No JumpSelector given to the NotJumpSelector; NotJumpSelector requires a JumpSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } diff --git a/source/src/core/select/jump_selector/OrJumpSelector.cc b/source/src/core/select/jump_selector/OrJumpSelector.cc index 59230d20b8..e85253520e 100644 --- a/source/src/core/select/jump_selector/OrJumpSelector.cc +++ b/source/src/core/select/jump_selector/OrJumpSelector.cc @@ -84,11 +84,11 @@ void OrJumpSelector::parse_my_tag( std::string selectors_str; try { selectors_str = tag->getOption< std::string >( "selectors" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selectors' from OrJumpSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } utility::vector1< std::string > selector_names = utility::string_split( selectors_str, ',' ); @@ -96,11 +96,11 @@ void OrJumpSelector::parse_my_tag( try { JumpSelectorCOP selector = datamap.get_ptr< JumpSelector const >( "JumpSelector", selector_name ); local_selectors.push_back( selector ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find JumpSelector named '" << selector_name << "' from the Datamap from OrJumpSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } } @@ -117,7 +117,7 @@ void OrJumpSelector::parse_my_tag( if ( local_selectors.empty() ) { //size() == 0 ) { std::stringstream error_msg; error_msg << "No JumpSelectors given to the OrJumpSelector; OrJumpSelector requires at least one JumpSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } for ( auto const & local_selector : local_selectors ) { diff --git a/source/src/core/select/jump_selector/util.cc b/source/src/core/select/jump_selector/util.cc index 744b3b8e66..7f47eb8fda 100644 --- a/source/src/core/select/jump_selector/util.cc +++ b/source/src/core/select/jump_selector/util.cc @@ -187,11 +187,11 @@ get_jump_selector( std::string const & selector_name, basic::datacache::DataMap core::select::jump_selector::JumpSelectorCOP selector; try { selector = data.get_ptr< core::select::jump_selector::JumpSelector const >( "JumpSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find JumpSelector named '" << selector_name << "' in the DataMap.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector ); TR << "Found jump selector " << selector_name << std::endl; diff --git a/source/src/core/select/movemap/MoveMapFactory.cc b/source/src/core/select/movemap/MoveMapFactory.cc index 4f9487c2d4..5c7f2f3012 100644 --- a/source/src/core/select/movemap/MoveMapFactory.cc +++ b/source/src/core/select/movemap/MoveMapFactory.cc @@ -358,7 +358,7 @@ void MoveMapFactory::parse_my_tag( if ( subtag->getName() == "Backbone" ) { auto selector = residue_selector::parse_residue_selector( subtag, datacache ); if ( ! selector ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find the (required) residue_selector for a Backbone sub-element of the MoveMapFactory" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find the (required) residue_selector for a Backbone sub-element of the MoveMapFactory" ); } if ( subtag->hasOption( "bb_tor_index" ) ) { Size index = subtag->getOption< Size >( "bb_tor_index" ); @@ -373,25 +373,25 @@ void MoveMapFactory::parse_my_tag( } else if ( subtag->getName() == "Chi" ) { auto selector = residue_selector::parse_residue_selector( subtag, datacache ); if ( ! selector ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find the (required) residue_selector for a Chi sub-element of the MoveMapFactory" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find the (required) residue_selector for a Chi sub-element of the MoveMapFactory" ); } add_chi_action( enable, selector ); } else if ( subtag->getName() == "Nu" ) { auto selector = residue_selector::parse_residue_selector( subtag, datacache ); if ( ! selector ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find the (required) residue_selector for a Nu sub-element of the MoveMapFactory" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find the (required) residue_selector for a Nu sub-element of the MoveMapFactory" ); } add_nu_action( enable, selector ); } else if ( subtag->getName() == "Branches" ) { auto selector = residue_selector::parse_residue_selector( subtag, datacache ); if ( ! selector ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find the (required) residue_selector for a Branches sub-element of the MoveMapFactory" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find the (required) residue_selector for a Branches sub-element of the MoveMapFactory" ); } add_branches_action( enable, selector ); } else if ( subtag->getName() == "Jumps" ) { auto selector = jump_selector::parse_jump_selector( subtag, datacache ); if ( ! selector ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find the (required) jump_selector for a Jumps sub-element of the MoveMapFactory" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find the (required) jump_selector for a Jumps sub-element of the MoveMapFactory" ); } add_jump_action( enable, selector ); } diff --git a/source/src/core/select/movemap/util.cc b/source/src/core/select/movemap/util.cc index c58ef293f4..e2bbb234b8 100644 --- a/source/src/core/select/movemap/util.cc +++ b/source/src/core/select/movemap/util.cc @@ -136,11 +136,11 @@ get_movemap_factory( std::string const & factory_name, basic::datacache::DataMap core::select::movemap::MoveMapFactoryOP factory; try { factory = data.get_ptr< core::select::movemap::MoveMapFactory >( movemap_factory_category(), factory_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find MoveMapFactory named '" << factory_name << "' in the DataMap.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( factory ); TR << "Found MoveMapFactory " << factory_name << std::endl; diff --git a/source/src/core/select/residue_selector/AndResidueSelector.cc b/source/src/core/select/residue_selector/AndResidueSelector.cc index 34428a4e27..9449a6b9b7 100644 --- a/source/src/core/select/residue_selector/AndResidueSelector.cc +++ b/source/src/core/select/residue_selector/AndResidueSelector.cc @@ -98,10 +98,10 @@ void AndResidueSelector::parse_my_tag( std::string selectors_str; try { selectors_str = tag->getOption< std::string >( "selectors" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selectors' from AndResidueSelector::parse_my_tag.\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } utility::vector1< std::string > selector_names = utility::string_split( selectors_str, ',' ); @@ -109,11 +109,11 @@ void AndResidueSelector::parse_my_tag( try { ResidueSelectorCOP selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_name ); local_selectors.push_back( selector ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_name << "' from the Datamap from AndResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } } // hasOption selectors @@ -131,7 +131,7 @@ void AndResidueSelector::parse_my_tag( if ( local_selectors.empty() ) { //size() == 0 ) { std::stringstream error_msg; error_msg << "No ResidueSelectors given to the AndResidueSelector; AndResidueSelector requires at least one ResidueSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } for ( auto const & local_selector : local_selectors ) { diff --git a/source/src/core/select/residue_selector/BondedResidueSelector.cc b/source/src/core/select/residue_selector/BondedResidueSelector.cc index 7f39207368..f6fbc9d261 100644 --- a/source/src/core/select/residue_selector/BondedResidueSelector.cc +++ b/source/src/core/select/residue_selector/BondedResidueSelector.cc @@ -104,40 +104,40 @@ BondedResidueSelector::parse_my_tag( { if ( tag->hasOption("residue_selector") ) { if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "BondedResidueSelector takes EITHER 'selector' OR 'resnum' options, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "BondedResidueSelector takes EITHER 'selector' OR 'resnum' options, not both!\n" ); } if ( tag->size() > 1 ) { // 1 if no subtags exist - throw utility::excn::EXCN_Msg_Exception( "BondedResidueSelector can only have one ResidueSelector loaded!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "BondedResidueSelector can only have one ResidueSelector loaded!\n" ); } // grab the ResidueSelector from the selector option // and then grab each of the indicated residue selectors from the datamap. std::string selector_str; try { selector_str = tag->getOption< std::string >( "residue_selector" ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selector' from BondedResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } try { ResidueSelectorCOP selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_str ); set_input_set_selector( selector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_str << "' from the Datamap from BondedResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else if ( tag->size() > 1 ) { // get focus selector from tag if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "BondedResidueSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "BondedResidueSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); } utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "BondedResidueSelector takes at most one ResidueSelector to determine the input_set!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "BondedResidueSelector takes at most one ResidueSelector to determine the input_set!\n" ); } ResidueSelectorCOP rs = ResidueSelectorFactory::get_instance()->new_residue_selector( tags.front()->getName(), @@ -149,11 +149,11 @@ BondedResidueSelector::parse_my_tag( } else { // do not get input_set from ResidueSelectors but load resnums string instead try { set_input_set ( tag->getOption< std::string >( "resnums" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream err_msg; err_msg << "Failed to access option 'resnums' from BondedResidueSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } @@ -183,7 +183,7 @@ BondedResidueSelector::get_input_set( if ( *it == 0 || *it > subset.size() ) { std::stringstream err_msg; err_msg << "Residue " << *it << " not found in pose!\n"; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } subset[ *it ] = true; // may want to use a tmp subset so we don't wind up with a half-set subset } diff --git a/source/src/core/select/residue_selector/CachedResidueSubset.cc b/source/src/core/select/residue_selector/CachedResidueSubset.cc index da30c29cb3..35ccdd748d 100644 --- a/source/src/core/select/residue_selector/CachedResidueSubset.cc +++ b/source/src/core/select/residue_selector/CachedResidueSubset.cc @@ -61,7 +61,7 @@ CachedResidueSubset::get_subset( std::string const & name ) const msg << s->first << " "; } msg << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } return ResidueSubsetCOP( new ResidueSubset( subset->second->begin(), subset->second->end() ) ); } diff --git a/source/src/core/select/residue_selector/ChainSelector.cc b/source/src/core/select/residue_selector/ChainSelector.cc index 84f33f4575..f6aad4dafe 100644 --- a/source/src/core/select/residue_selector/ChainSelector.cc +++ b/source/src/core/select/residue_selector/ChainSelector.cc @@ -82,7 +82,7 @@ ChainSelector::apply( if ( iichain_string.size() != 1 ) { std::stringstream error_message; error_message << "ChainSelector was given a string identifier '" << iichain_string << "' that cannot be parsed as an unsigned integer and is also longer than a single character\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } select_chain_by_pdb_chain_char( pose, subset, iichain_string[0] ); } @@ -100,11 +100,11 @@ void ChainSelector::parse_my_tag( std::string chain_string; try { chain_string = tag->getOption< std::string >( "chains" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_message; error_message << "ChainSelector::parse_my_tag was not able to find the required option 'chains' in the input Tag\n"; error_message << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } chain_strings_ = utility::string_split( chain_string, ',' ); } @@ -170,7 +170,7 @@ void ChainSelector::select_chain_by_pdb_chain_char( if ( !pose.pdb_info() ) { std::ostringstream err; err << get_name() << "Selector recieved a pose without a valid PDBInfo--chains cannot be selected."; - throw utility::excn::EXCN_NullPointer( err.str() ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, err.str() ); } for ( core::Size ii = 1; ii <= pose.size(); ++ii ) { diff --git a/source/src/core/select/residue_selector/CloseContactResidueSelector.cc b/source/src/core/select/residue_selector/CloseContactResidueSelector.cc index 8b1bb905a6..631e793f6c 100644 --- a/source/src/core/select/residue_selector/CloseContactResidueSelector.cc +++ b/source/src/core/select/residue_selector/CloseContactResidueSelector.cc @@ -183,11 +183,11 @@ CloseContactResidueSelector::parse_my_tag( std::string selector_name = tag->getOption< std::string >( "residue_selector" ); try { selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_name << "' from the Datamap from AndResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else { // add selectors from tags @@ -199,7 +199,7 @@ CloseContactResidueSelector::parse_my_tag( } else { error_msg << "You may only provide a single sub-element of the " << class_name() << " residue selector\n"; } - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } selector = ResidueSelectorFactory::get_instance()->new_residue_selector( subtags[0]->getName(), diff --git a/source/src/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cc b/source/src/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cc index 8cfacfb171..9643e6f074 100644 --- a/source/src/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cc +++ b/source/src/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cc @@ -144,7 +144,7 @@ InterGroupInterfaceByVectorSelector::parse_my_tag( grp1resstring = tag->getOption< std::string >( "grp1_residues" ); } else { std::string error_message = "InterGroupInterfaceByVectorSelector::parse_my_tag requires either grp1_selector or grp1_residues to be specified\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } if ( tag->hasOption( "grp2_selector" ) ) { @@ -153,25 +153,25 @@ InterGroupInterfaceByVectorSelector::parse_my_tag( grp2resstring = tag->getOption< std::string >( "grp2_residues" ); } else { std::string error_message = "InterGroupInterfaceByVectorSelector::parse_my_tag requires either grp2_selector or grp2_residues to be specified\n"; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } ResidueSelectorCOP grp1_sel_op, grp2_sel_op; if ( ! grp1_selector_name.empty() ) { try { grp1_sel_op = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", grp1_selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + grp1_selector_name + "' from the Datamap from InterGroupInterfaceByVectorSelector::parse_my_tag\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } } if ( ! grp2_selector_name.empty() ) { try { grp2_sel_op = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", grp2_selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + grp2_selector_name + "' from the Datamap from InterGroupInterfaceByVectorSelector::parse_my_tag\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } } @@ -181,7 +181,7 @@ InterGroupInterfaceByVectorSelector::parse_my_tag( if ( grp2_sel_op ) { group2_selector( grp2_sel_op ); } else { group2_resstring( grp2resstring ); } } else { // weird number of subtags - throw utility::excn::EXCN_Msg_Exception( "InterGroupInterfaceByVectorSelector takes either two or zero subtags to specify residue groups!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "InterGroupInterfaceByVectorSelector takes either two or zero subtags to specify residue groups!\n" ); } } diff --git a/source/src/core/select/residue_selector/JumpDownstreamSelector.cc b/source/src/core/select/residue_selector/JumpDownstreamSelector.cc index 95e25684e9..82be365afe 100644 --- a/source/src/core/select/residue_selector/JumpDownstreamSelector.cc +++ b/source/src/core/select/residue_selector/JumpDownstreamSelector.cc @@ -92,11 +92,11 @@ JumpDownstreamSelector::parse_my_tag( { try { set_jump( tag->getOption< int >( "jump" ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream err_msg; err_msg << "Failed to access required option 'jump' from JumpDownstreamSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/JumpUpstreamSelector.cc b/source/src/core/select/residue_selector/JumpUpstreamSelector.cc index f972a5fc9c..6a0c182ae9 100644 --- a/source/src/core/select/residue_selector/JumpUpstreamSelector.cc +++ b/source/src/core/select/residue_selector/JumpUpstreamSelector.cc @@ -92,11 +92,11 @@ JumpUpstreamSelector::parse_my_tag( { try { set_jump( tag->getOption< int >( "jump" ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream err_msg; err_msg << "Failed to access required option 'jump' from JumpUpstreamSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/NeighborhoodResidueSelector.cc b/source/src/core/select/residue_selector/NeighborhoodResidueSelector.cc index 0db8fe52d0..1b03ddd646 100644 --- a/source/src/core/select/residue_selector/NeighborhoodResidueSelector.cc +++ b/source/src/core/select/residue_selector/NeighborhoodResidueSelector.cc @@ -181,12 +181,12 @@ NeighborhoodResidueSelector::parse_my_tag( //Check for embedded ResidueSelector as focus. utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "NeighborhoodResidueSelector takes at most one ResidueSelector to determine the focus!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NeighborhoodResidueSelector takes at most one ResidueSelector to determine the focus!\n" ); } ResidueSelectorCOP rs = get_embedded_residue_selector( tag, datamap ); set_focus_selector( rs ); } else { - throw utility::excn::EXCN_Msg_Exception("You must provide either resnums or selector tag, or an embedded selector to give the focus residues."); + throw CREATE_EXCEPTION(utility::excn::Exception, "You must provide either resnums or selector tag, or an embedded selector to give the focus residues."); } set_distance( tag->getOption< Real >( "distance", distance_ ) ); @@ -228,7 +228,7 @@ NeighborhoodResidueSelector::get_focus( } if ( ! focus_set ) { - throw utility::excn::EXCN_Msg_Exception("Focus not set for NeighborhoodResidueSelector. A focus must be set!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Focus not set for NeighborhoodResidueSelector. A focus must be set!"); } diff --git a/source/src/core/select/residue_selector/NotResidueSelector.cc b/source/src/core/select/residue_selector/NotResidueSelector.cc index cdb311c31d..ef03d42cf7 100644 --- a/source/src/core/select/residue_selector/NotResidueSelector.cc +++ b/source/src/core/select/residue_selector/NotResidueSelector.cc @@ -84,33 +84,33 @@ void NotResidueSelector::parse_my_tag( if ( tag->hasOption( "selector" ) ) { // fetch selector from datamap if ( tag->size() > 1 ) { // has subtags - throw utility::excn::EXCN_Msg_Exception( "NotResidueSelector can negate ONE ResidueSelector! Either specify 'selector' option or provide subtags but not BOTH\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NotResidueSelector can negate ONE ResidueSelector! Either specify 'selector' option or provide subtags but not BOTH\n" ); } // grab the ResidueSelector to be negated from the selector option // and then grab each of the indicated residue selectors from the datamap. std::string selector_str; try { selector_str = tag->getOption< std::string >( "selector" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access required option 'selector' from NotResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } try { ResidueSelectorCOP selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_str ); set_residue_selector(selector); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_str << "' from the Datamap from NotResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else if ( tag->size() > 1 ) { // attempt reading subtag utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "NotResidueSelector takes exactly ONE ResidueSelector! Multiple selectors were specified.\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NotResidueSelector takes exactly ONE ResidueSelector! Multiple selectors were specified.\n" ); } ResidueSelectorCOP rs = ResidueSelectorFactory::get_instance()->new_residue_selector( tags.front()->getName(), @@ -123,7 +123,7 @@ void NotResidueSelector::parse_my_tag( if ( !selector_ ) { std::stringstream error_msg; error_msg << "No ResidueSelector given to the NotResidueSelector; NotResidueSelector requires a ResidueSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/OrResidueSelector.cc b/source/src/core/select/residue_selector/OrResidueSelector.cc index 6395a251de..9c9758d7dd 100644 --- a/source/src/core/select/residue_selector/OrResidueSelector.cc +++ b/source/src/core/select/residue_selector/OrResidueSelector.cc @@ -93,11 +93,11 @@ void OrResidueSelector::parse_my_tag( std::string selectors_str; try { selectors_str = tag->getOption< std::string >( "selectors" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selectors' from OrResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } utility::vector1< std::string > selector_names = utility::string_split( selectors_str, ',' ); @@ -105,11 +105,11 @@ void OrResidueSelector::parse_my_tag( try { ResidueSelectorCOP selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_name ); local_selectors.push_back( selector ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_name << "' from the Datamap from OrResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } } @@ -126,7 +126,7 @@ void OrResidueSelector::parse_my_tag( if ( local_selectors.empty() ) { //size() == 0 ) { std::stringstream error_msg; error_msg << "No ResidueSelectors given to the OrResidueSelector; OrResidueSelector requires at least one ResidueSelector as input\n"; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } for ( auto const & local_selector : local_selectors ) { diff --git a/source/src/core/select/residue_selector/PrimarySequenceNeighborhoodSelector.cc b/source/src/core/select/residue_selector/PrimarySequenceNeighborhoodSelector.cc index d3752c904a..5777a52f60 100644 --- a/source/src/core/select/residue_selector/PrimarySequenceNeighborhoodSelector.cc +++ b/source/src/core/select/residue_selector/PrimarySequenceNeighborhoodSelector.cc @@ -115,11 +115,11 @@ PrimarySequenceNeighborhoodSelector::parse_my_tag( std::string const selectorname = tag->getOption< std::string >( "selector" ); try { set_selector( data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selectorname ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selectorname << "' from the Datamap from DisulfidizeMover.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_RosettaScriptsOption( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str() ); } debug_assert( selector_ ); TR << "Using residue selector " << selectorname << std::endl; @@ -135,7 +135,7 @@ PrimarySequenceNeighborhoodSelector::parse_my_tag( } else { std::stringstream ss; ss << "PrimarySequenceNeighborhood requires a selector to be set either through the \"selector\" option or by placing a residue selector as a subtag." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } debug_assert( selector_ ); } diff --git a/source/src/core/select/residue_selector/RandomResidueSelector.cc b/source/src/core/select/residue_selector/RandomResidueSelector.cc index 3e6a3f2041..18e205ea69 100644 --- a/source/src/core/select/residue_selector/RandomResidueSelector.cc +++ b/source/src/core/select/residue_selector/RandomResidueSelector.cc @@ -153,11 +153,11 @@ RandomResidueSelector::parse_my_tag( ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selectorname ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selectorname << "' in the DataMap.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector ); TR << "Using residue selector " << selectorname << std::endl; diff --git a/source/src/core/select/residue_selector/ResidueIndexSelector.cc b/source/src/core/select/residue_selector/ResidueIndexSelector.cc index 02c8030b1b..bb83ae3aa2 100644 --- a/source/src/core/select/residue_selector/ResidueIndexSelector.cc +++ b/source/src/core/select/residue_selector/ResidueIndexSelector.cc @@ -90,7 +90,7 @@ ResidueIndexSelector::apply( core::pose::Pose const & pose ) const if ( res == 0 || res > subset.size() ) { std::stringstream err_msg; err_msg << "Residue " << res << " not found in pose!\n"; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } subset[ res ] = true; } @@ -104,11 +104,11 @@ ResidueIndexSelector::parse_my_tag( { try { set_index( tag->getOption< std::string >( "resnums" ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream err_msg; err_msg << "Failed to access required option 'resnums' from ResidueIndexSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/ResidueNameSelector.cc b/source/src/core/select/residue_selector/ResidueNameSelector.cc index 98e15732e2..821bf13f40 100644 --- a/source/src/core/select/residue_selector/ResidueNameSelector.cc +++ b/source/src/core/select/residue_selector/ResidueNameSelector.cc @@ -94,7 +94,7 @@ ResidueNameSelector::apply( core::pose::Pose const & pose ) const if ( ! pose.residue_type_set_for_pose()->has_name( n ) ) { std::stringstream err; err << "ResidueNameSelector: " << n << " is not a valid residue type name."; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } res_set.insert( n ); } @@ -109,7 +109,7 @@ ResidueNameSelector::apply( core::pose::Pose const & pose ) const if ( ! pose.residue_type_set_for_pose()->has_name3( n ) ) { std::stringstream err; err << "ResidueNameSelector: " << n << " is not a valid residue type name."; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } res_name3_set.insert( n ); } @@ -141,7 +141,7 @@ ResidueNameSelector::parse_my_tag( if ( res_name_str_.empty() && res_name3_str_.empty() ) { std::stringstream err_msg; err_msg << "ResidueName selector requires either 'residue_names' or 'residue_name3' to be specified. From ResidueNameSelector::parse_my_tag." << std::endl; - throw utility::excn::EXCN_BadInput( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cc b/source/src/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cc index 0b1eee67b5..56b86ce319 100644 --- a/source/src/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cc +++ b/source/src/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cc @@ -94,7 +94,7 @@ ResiduePDBInfoHasLabelSelector::parse_my_tag( if ( label_.empty() ) { std::stringstream err_msg; err_msg << "ResiduePDBInfoHasLabel selector requires 'property' to be specified. From ResiduePDBInfoHasLabelSelector::parse_my_tag." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err_msg.str() ); } } diff --git a/source/src/core/select/residue_selector/ResidueSelectorFactory.cc b/source/src/core/select/residue_selector/ResidueSelectorFactory.cc index e605732038..15a5934c53 100644 --- a/source/src/core/select/residue_selector/ResidueSelectorFactory.cc +++ b/source/src/core/select/residue_selector/ResidueSelectorFactory.cc @@ -39,7 +39,7 @@ ResidueSelectorFactory::factory_register( ResidueSelectorCreatorOP creator ) if ( creator_map_.find( creator->keyname() ) != creator_map_.end() ) { std::string err_msg = "Factory Name Conflict: Two or more ResidueSelectorCreators registered with the name " + creator->keyname(); if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -62,7 +62,7 @@ ResidueSelectorFactory::provide_xml_schema( ) const { if ( ! has_type( selector_name ) ) { std::string err_msg = "No ResidueSelectorCreator with the name '" + selector_name + "' has been registered with the ResidueSelectorFactory"; - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } std::map< std::string, ResidueSelectorCreatorOP >::const_iterator iter = creator_map_.find( selector_name ); iter->second->provide_xml_schema( xsd ); @@ -76,7 +76,7 @@ ResidueSelectorOP ResidueSelectorFactory::new_residue_selector( { if ( ! has_type( selector_name ) ) { std::string err_msg = "No ResidueSelectorCreator with the name '" + selector_name + "' has been registered with the ResidueSelectorFactory"; - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } std::map< std::string, ResidueSelectorCreatorOP >::const_iterator iter = creator_map_.find( selector_name ); ResidueSelectorOP new_selector = iter->second->create_residue_selector(); @@ -98,8 +98,8 @@ void ResidueSelectorFactory::define_residue_selector_xml_schema( utility::tag::X residue_selector_xml_schema_group_name(), & complex_type_name_for_residue_selector, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for ResidueSelectors from ResidueSelectorFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for ResidueSelectors from ResidueSelectorFactory; offending class" " must call core::select::residue_selector::complex_type_name_for_residue_selector when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/core/select/residue_selector/ScoreTermValueBasedSelector.cc b/source/src/core/select/residue_selector/ScoreTermValueBasedSelector.cc index 21f902aefc..8eb88fbde6 100644 --- a/source/src/core/select/residue_selector/ScoreTermValueBasedSelector.cc +++ b/source/src/core/select/residue_selector/ScoreTermValueBasedSelector.cc @@ -119,7 +119,7 @@ void ScoreTermValueBasedSelector::parse_my_tag(utility::tag::TagCOP tag, basic:: } TR << "Using '" << score_type << "' for defining selection.\n"; } else { - throw utility::excn::EXCN_Msg_Exception( "Missing score_type name! A predeclared filter should be specified as an option." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Missing score_type name! A predeclared filter should be specified as an option." ); } if ( tag->hasOption( "selector" ) ) { @@ -130,7 +130,7 @@ void ScoreTermValueBasedSelector::parse_my_tag(utility::tag::TagCOP tag, basic:: //Check for embedded ResidueSelector as focus. utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "ScoreTermValueBased Residue Selector can take only a single sub residue selector tag!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ScoreTermValueBased Residue Selector can take only a single sub residue selector tag!\n" ); } input_residues_selector_ = core::select::residue_selector::get_embedded_residue_selector( tag, datamap ); TR << "Will operate on the subset of residues resulting from " @@ -148,14 +148,14 @@ void ScoreTermValueBasedSelector::parse_my_tag(utility::tag::TagCOP tag, basic:: TR << "Setting lower threshold to " << lower_threshold_ << ". Residues scoring equal to or above this threshold will be selected." << std::endl; } else { - throw utility::excn::EXCN_Msg_Exception( "Missing lower threshold value! ScoreTermValueBasedSelector requires a lower threshold to be specified." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Missing lower threshold value! ScoreTermValueBasedSelector requires a lower threshold to be specified." ); } if ( tag->hasOption( "upper_threshold" ) ) { upper_threshold_ = tag->getOption< core::Real >( "upper_threshold" ); TR << "Setting upper threshold to " << upper_threshold_ << ". Residues scoring equal to or below this threshold will be selected." << std::endl; } else { - throw utility::excn::EXCN_Msg_Exception( "Missing upper thershold value! ScoreTermValueBasedSelector requires a upper threshold to be specified." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Missing upper thershold value! ScoreTermValueBasedSelector requires a upper threshold to be specified." ); } } diff --git a/source/src/core/select/residue_selector/SecondaryStructureSelector.cc b/source/src/core/select/residue_selector/SecondaryStructureSelector.cc index 90216e6784..e0c41bd01b 100644 --- a/source/src/core/select/residue_selector/SecondaryStructureSelector.cc +++ b/source/src/core/select/residue_selector/SecondaryStructureSelector.cc @@ -81,7 +81,7 @@ SecondaryStructureSelector::SecondaryStructureSelector( std::string const & sele selected_ss_() { if ( !check_ss( selected ) ) { - throw utility::excn::EXCN_BadInput( "SecondaryStructureSelector: invalid ss to select: " + selected + " -- only H, E and L are allowed.\n" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "SecondaryStructureSelector: invalid ss to select: " + selected + " -- only H, E and L are allowed.\n" ); } set_selected_ss( selected ); } @@ -129,7 +129,7 @@ SecondaryStructureSelector::apply( core::pose::Pose const & pose ) const if ( selected_ss_.empty() ) { std::stringstream err; err << "SecondaryStructureSelector: no secondary structure types are selected -- you must specify one or more secondary structure types for selection." << std::endl; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } // first check pose secstruct, otherwise use dssp @@ -137,7 +137,7 @@ SecondaryStructureSelector::apply( core::pose::Pose const & pose ) const if ( !check_ss( ss ) ) { std::stringstream err; err << "SecondaryStructureSelector: the secondary structure string " << ss << " is invalid." << std::endl; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } fix_secstruct_definition( ss ); @@ -172,7 +172,7 @@ void SecondaryStructureSelector::parse_my_tag( std::stringstream msg; msg << "SecondaryStructureSelector::parse_my_tag(): You cannot specify a blueprint and a pose secondary structure to the same selector." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( err.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err.str() ); } std::string const bp_name = tag->getOption< std::string >( "blueprint" ); protocols::parser::BluePrint bp( bp_name ); @@ -184,14 +184,14 @@ void SecondaryStructureSelector::parse_my_tag( std::stringstream err; err << "SecondaryStructureSelector: the ss option is required to specify which secondary structure elements are being selected." << std::endl; err << "Usage: ss=\"([HEL])*\" (e.g. ss=\"L\" for loops only, ss=\"HE\" for helices and strands)" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( err.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err.str() ); } std::string const selected = tag->getOption< std::string >( "ss" ); if ( !check_ss( selected ) ) { std::stringstream err; err << "SecondaryStructureSelector: an invalid character was specified in the ss option -- only H, E and L are allowed: " << selected << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( err.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err.str() ); } set_selected_ss( selected ); diff --git a/source/src/core/select/residue_selector/SymmetricalResidueSelector.cc b/source/src/core/select/residue_selector/SymmetricalResidueSelector.cc index ccdafe0a74..6763a9b955 100644 --- a/source/src/core/select/residue_selector/SymmetricalResidueSelector.cc +++ b/source/src/core/select/residue_selector/SymmetricalResidueSelector.cc @@ -124,11 +124,11 @@ SymmetricalResidueSelector::parse_my_tag( //make sure it is a valid residue selector try { set_selector( data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selectorname ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selectorname << "' from the Datamap from SymmetricalResidueSelector.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_RosettaScriptsOption( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str() ); } debug_assert( selector_ ); TR << "Using residue selector " << selectorname << std::endl; @@ -151,7 +151,7 @@ SymmetricalResidueSelector::parse_my_tag( //if there is not a selector tag option, then: std::stringstream ss; ss << "SymmetricalResidueSelector requires a selector to be set either through the \"selector\" option." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } debug_assert( selector_ ); } diff --git a/source/src/core/select/residue_selector/util.cc b/source/src/core/select/residue_selector/util.cc index 7585d2feca..dbaa9f12ae 100644 --- a/source/src/core/select/residue_selector/util.cc +++ b/source/src/core/select/residue_selector/util.cc @@ -192,11 +192,11 @@ get_residue_selector( std::string const & selector_name, basic::datacache::DataM core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_name << "' in the DataMap.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector ); TR << "Found residue selector " << selector_name << std::endl; @@ -208,7 +208,7 @@ get_embedded_residue_selector( utility::tag::TagCOP tag, basic::datacache::DataM if ( tag->size() > 1 ) { utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "NeighborhoodResidueSelector takes at most one ResidueSelector to determine the focus!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "NeighborhoodResidueSelector takes at most one ResidueSelector to determine the focus!\n" ); } ResidueSelectorOP rs = ResidueSelectorFactory::get_instance()->new_residue_selector( tags.front()->getName(), @@ -217,7 +217,7 @@ get_embedded_residue_selector( utility::tag::TagCOP tag, basic::datacache::DataM ); return rs; } else { - throw utility::excn::EXCN_Msg_Exception( "No selector embedded! " ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No selector embedded! " ); } } @@ -236,7 +236,7 @@ get_embedded_residue_selectors( utility::tag::TagCOP tag, basic::datacache::Data } return selectors; } else { - throw utility::excn::EXCN_Msg_Exception( "No selector embedded! " ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No selector embedded! " ); } } diff --git a/source/src/devel/constel/ResidueMask.cc b/source/src/devel/constel/ResidueMask.cc index 4b68523d99..44b7945eef 100644 --- a/source/src/devel/constel/ResidueMask.cc +++ b/source/src/devel/constel/ResidueMask.cc @@ -41,7 +41,7 @@ ResidueMask::ResidueMask(Pose& ps, std::string const &fname) : std::ifstream ifs(fname.c_str()); if ( !ifs ) { TR << "can't open " << fname << std::endl; - throw utility::excn::EXCN_BadInput(fname); + throw CREATE_EXCEPTION(utility::excn::BadInput, fname); } int ri; diff --git a/source/src/devel/denovo_design/filters/CavityVolumeFilter.cc b/source/src/devel/denovo_design/filters/CavityVolumeFilter.cc index 382d548809..c34659959d 100644 --- a/source/src/devel/denovo_design/filters/CavityVolumeFilter.cc +++ b/source/src/devel/denovo_design/filters/CavityVolumeFilter.cc @@ -122,11 +122,11 @@ CavityVolumeFilter::parse_my_tag( std::string const & selectorname = tag->getOption< std::string >( "selector" ); try { selector_ = datamap.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selectorname ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selectorname << "' from the Datamap from CavityVolumeFilter::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } @@ -136,7 +136,7 @@ CavityVolumeFilter::parse_my_tag( if ( selector_ ) { std::stringstream error_msg; error_msg << "Residue selector can either be specified via name or subtag, but not both in CavityVolumeFilter." << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } selector_ = core::select::residue_selector::ResidueSelectorFactory::get_instance()->new_residue_selector( (*itag)->getName(), diff --git a/source/src/devel/denovo_design/filters/FoldabilityFilter.cc b/source/src/devel/denovo_design/filters/FoldabilityFilter.cc index 7c7ed79ac4..ceabd1eef6 100644 --- a/source/src/devel/denovo_design/filters/FoldabilityFilter.cc +++ b/source/src/devel/denovo_design/filters/FoldabilityFilter.cc @@ -143,16 +143,16 @@ FoldabilityFilter::parse_my_tag( tries_ = tag->getOption< core::Size >( "tries", tries_ ); if ( tag->hasOption("selector") ) { if ( tag->hasOption("start_res") || tag->hasOption("end_res" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "\"start_res\" and \"end_res\" cannot be used at the same time as \"selector\" in FoldabilityFilter." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "\"start_res\" and \"end_res\" cannot be used at the same time as \"selector\" in FoldabilityFilter." ); } std::string const selectorname = tag->getOption< std::string >("selector"); try { selector_ = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selectorname ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selectorname << "' from the Datamap from DisulfidizeMover.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector_ ); TR << "Using residue selector " << selectorname << std::endl; diff --git a/source/src/devel/denovo_design/scoring/SideChainNeighborsEnergy.cc b/source/src/devel/denovo_design/scoring/SideChainNeighborsEnergy.cc index 43d785932a..c90b6c9f2f 100644 --- a/source/src/devel/denovo_design/scoring/SideChainNeighborsEnergy.cc +++ b/source/src/devel/denovo_design/scoring/SideChainNeighborsEnergy.cc @@ -98,7 +98,7 @@ SideChainNeighborsEnergy::residue_energy( } else if ( rsd_mode == core::chemical::CENTROID_t ) { my_sc_coordinates = rsd.atom(rsd.atom_index("CEN")).xyz(); } else { - throw utility::excn::EXCN_BadInput( "Unknown residue type set for gly residue: " + core::chemical::string_from_type_set_mode( rsd_mode ) ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Unknown residue type set for gly residue: " + core::chemical::string_from_type_set_mode( rsd_mode ) ); } my_bb_coordinates = rsd.atom(rsd.atom_index("CA")).xyz() ; } else { diff --git a/source/src/devel/domain_assembly/DomainAssemblyMover.cc b/source/src/devel/domain_assembly/DomainAssemblyMover.cc index 0f51ba4efb..0a3aee3d41 100644 --- a/source/src/devel/domain_assembly/DomainAssemblyMover.cc +++ b/source/src/devel/domain_assembly/DomainAssemblyMover.cc @@ -297,7 +297,7 @@ DomainAssemblyMover::run_centroid_stage( core::pose::Pose & pose ) void DomainAssemblyMover::run_abinitio_centroid_stage( core::pose::Pose & pose ) { if ( !fragsets_set() ) { - throw utility::excn::EXCN_Msg_Exception( "No FragmentSet specified - exiting!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No FragmentSet specified - exiting!\n" ); } core::util::switch_to_residue_type_set( pose, core::chemical::CENTROID_t ); @@ -642,7 +642,7 @@ void DomainAssemblyMover::initialize_target_pose() { *(core::chemical::ChemicalManager::get_instance()->residue_type_set( core::chemical::FA_STANDARD )), basic::options::option[ basic::options::OptionKeys::in::file::native ](), false, core::import_pose::PDB_file ); } else { - throw utility::excn::EXCN_Msg_Exception( "No native pose specified! Use -in::file::native\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No native pose specified! Use -in::file::native\n" ); } } @@ -653,7 +653,7 @@ void DomainAssemblyMover::initialize_pose_map_from_commandline() { if ( !data ) { std::stringstream err_msg; err_msg << " cannot open map file: " << filename << std::endl; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } std::string line; @@ -664,7 +664,7 @@ void DomainAssemblyMover::initialize_pose_map_from_commandline() { if ( line_stream.fail() ) { std::stringstream err_msg; err_msg << " cannot parse line in map file: " << line << std::endl; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } target_pose_map_.insert( std::make_pair( pose_number, native_pose_number ) ); } @@ -680,7 +680,7 @@ void DomainAssemblyMover::initialize_buried_from_commandline() { if ( !data ) { std::stringstream err_msg; err_msg << " cannot open buried residue definition file: " << filename << std::endl; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } std::stringstream buried_string; @@ -726,7 +726,7 @@ DomainAssemblyMover::initialize_fragments_from_commandline() void DomainAssemblyMover::recover_sidechains( core::pose::Pose & pose ) const { if ( starting_pose_.empty() ) { - throw utility::excn::EXCN_Msg_Exception( "No starting pose specified! Use -da_start_pdb\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No starting pose specified! Use -da_start_pdb\n" ); } protocols::simple_moves::ReturnSidechainMover return_sidechains( starting_pose_ ); return_sidechains.apply( pose ); diff --git a/source/src/devel/fold_from_loops/FoldFromLoopsMover.cc b/source/src/devel/fold_from_loops/FoldFromLoopsMover.cc index ced0247907..8d166c954c 100644 --- a/source/src/devel/fold_from_loops/FoldFromLoopsMover.cc +++ b/source/src/devel/fold_from_loops/FoldFromLoopsMover.cc @@ -209,7 +209,7 @@ void FoldFromLoopsMover::apply (core::pose::Pose & input_pose ) Real loop_tag = 1; try{ protocols::jumping::close_chainbreaks( closure_protocol, input_pose, sliding_checkpoint ,"sliding", f ); - } catch ( protocols::loops::EXCN_Loop_not_closed& excn ) { + } catch (protocols::loops::EXCN_Loop_not_closed& excn ) { loop_tag = 0; set_last_move_status ( FAIL_RETRY ); // if the loops fail set fail_retry diff --git a/source/src/devel/mmt_msd/MMTDriver.cc b/source/src/devel/mmt_msd/MMTDriver.cc index 0561d2d785..02d7c0d30e 100644 --- a/source/src/devel/mmt_msd/MMTDriver.cc +++ b/source/src/devel/mmt_msd/MMTDriver.cc @@ -74,7 +74,7 @@ sequence_from_entity( protocols::genetic_algorithm::EntityElementCOP iiee = entity.traits()[ ii ]; PosTypeCOP ii_pos_type = utility::pointer::dynamic_pointer_cast< protocols::multistate_design::PosType const > ( iiee ); if ( ! ii_pos_type ) { - throw utility::excn::EXCN_Msg_Exception( "Position " + utility::to_string( ii ) + " of entity " + entity.to_string() + " could not be dynamically casted to PosType" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Position " + utility::to_string( ii ) + " of entity " + entity.to_string() + " could not be dynamically casted to PosType" ); } sequence.push_back( core::chemical::oneletter_code_from_aa( ii_pos_type->type() )); } @@ -290,8 +290,8 @@ MMTDriver::setup() protocols::pack_daemon::create_entity_resfile_contents( entity_resfile_stream, entity_resfile_fname_, entity_resfile_contents_, entity_task_, num_entities_ ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "MMTDriver failed to initialize the entity resfile\n" + e.msg() ); + } catch (utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "MMTDriver failed to initialize the entity resfile\n" + e.msg() ); } daf_ = protocols::pack_daemon::DynamicAggregateFunctionOP( new protocols::pack_daemon::DynamicAggregateFunction ); @@ -300,8 +300,8 @@ MMTDriver::setup() try { std::istringstream daf_stream( file_contents_->get_file_contents_ref( daf_fname_ ) ); daf_->read_all_variables_from_input_file( daf_stream ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "MMTDriver::setup failed to initialize DyanmicAggregateFunction\n" + e.msg() ); + } catch (utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "MMTDriver::setup failed to initialize DyanmicAggregateFunction\n" + e.msg() ); } if ( ! ga_randomizer_ ) { @@ -675,7 +675,7 @@ MMTDriver::retrieve_pdb_from_node( if ( retrieval_status == error ) { std::string emsg = utility::receive_string_from_node( node ); // oh no! -- spin_down_everything_but_node( node ); - throw utility::excn::EXCN_Msg_Exception( emsg ); + throw CREATE_EXCEPTION(utility::excn::Exception, emsg ); } return utility::receive_string_from_node( node ); diff --git a/source/src/devel/mmt_msd/MMTMinPackingJob.cc b/source/src/devel/mmt_msd/MMTMinPackingJob.cc index b36b7d47ba..bd6718a394 100644 --- a/source/src/devel/mmt_msd/MMTMinPackingJob.cc +++ b/source/src/devel/mmt_msd/MMTMinPackingJob.cc @@ -84,7 +84,7 @@ void MMTMinPackingJob::update_pose( core::pose::Pose & final_pose ) if ( ! rotsets_ ) { errormsg += "MMTMinPackingJob::update_pose() -- Could not update pose; rotamer sets not yet initialized\n"; } if ( ! best_assignment_ ) { errormsg += "MMTMinPackingJob::update_pose() -- Could not update pose; no best state assignment present\n"; } - if ( errormsg != "" ) { throw utility::excn::EXCN_Msg_Exception( errormsg ); } + if ( errormsg != "" ) { throw CREATE_EXCEPTION(utility::excn::Exception, errormsg ); } if ( rotsets_->nmoltenres() != best_assignment_->nmoltenres() ) { errormsg += "MMTMinPackingJob::update_pose() -- Could not update pose; nmoltenres disagreement between rotsets_ and best_assignment_\n"; @@ -92,7 +92,7 @@ void MMTMinPackingJob::update_pose( core::pose::Pose & final_pose ) if ( pose().size() != final_pose.size() ) { errormsg += "MMTMinPackingJob::update_pose() -- Could not update pose; internal pose and final_pose have different numbers of residues\n"; } - if ( errormsg != "" ) { throw utility::excn::EXCN_Msg_Exception( errormsg ); } + if ( errormsg != "" ) { throw CREATE_EXCEPTION(utility::excn::Exception, errormsg ); } // ok, if we made it this far, we're golden. core::pack::min_pack_place_opt_rotamers_on_pose( final_pose, sfxn(), rotsets_, atc_, *best_assignment_, 0.0 ); diff --git a/source/src/devel/mmt_msd/MMTOffRotamerPackingJob.cc b/source/src/devel/mmt_msd/MMTOffRotamerPackingJob.cc index 70d4f7ec70..0994a1c69c 100644 --- a/source/src/devel/mmt_msd/MMTOffRotamerPackingJob.cc +++ b/source/src/devel/mmt_msd/MMTOffRotamerPackingJob.cc @@ -74,7 +74,7 @@ void MMTOffRotamerPackingJob::update_pose( core::pose::Pose & final_pose ) if ( ! rotsets_ ) { errormsg += "MMTOffRotamerPackingJob::update_pose() -- Could not update pose; rotamer sets not yet initialized\n"; } if ( ! best_assignment_ ) { errormsg += "MMTOffRotamerPackingJob::update_pose() -- Could not update pose; no best state assignment present\n"; } - if ( errormsg != "" ) { throw utility::excn::EXCN_Msg_Exception( errormsg ); } + if ( errormsg != "" ) { throw CREATE_EXCEPTION(utility::excn::Exception, errormsg ); } if ( rotsets_->nmoltenres() != best_assignment_->nmoltenres() ) { errormsg += "MMTOffRotamerPackingJob::update_pose() -- Could not update pose; nmoltenres disagreement between rotsets_ and best_assignment_\n"; @@ -82,7 +82,7 @@ void MMTOffRotamerPackingJob::update_pose( core::pose::Pose & final_pose ) if ( pose().size() != final_pose.size() ) { errormsg += "MMTOffRotamerPackingJob::update_pose() -- Could not update pose; internal pose and final_pose have different numbers of residues\n"; } - if ( errormsg != "" ) { throw utility::excn::EXCN_Msg_Exception( errormsg ); } + if ( errormsg != "" ) { throw CREATE_EXCEPTION(utility::excn::Exception, errormsg ); } // ok, if we made it this far, we're golden. core::pack::off_rotamer_pack_update_pose( final_pose, *rotsets_, atc_, *best_assignment_ ); diff --git a/source/src/devel/mmt_msd/MMTReceiver.cc b/source/src/devel/mmt_msd/MMTReceiver.cc index 1c4f65e6ab..c519192058 100644 --- a/source/src/devel/mmt_msd/MMTReceiver.cc +++ b/source/src/devel/mmt_msd/MMTReceiver.cc @@ -243,7 +243,7 @@ bool MMTReceiver::recreate_previously_generated_result_pose() try { job->update_pose( *sd.pose ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { utility::send_integer_to_node( 0, error ); std::string emessage = "Could not recover previously generated pose. Node " + utility::to_string( utility::mpi_rank() ) + "\n"; utility::send_string_to_node( 0, emessage + e.msg() ); @@ -416,14 +416,14 @@ MMTReceiver::restrict_task_for_job( utility::vector1< bool > aas_present( core::chemical::num_canonical_aas, false ); char iiaachar = seqstring[ ii_entity-1 ]; if ( ! core::chemical::oneletter_code_specifies_aa( iiaachar ) ) { - throw utility::excn::EXCN_Msg_Exception( "Bad aa received in seqstring " + utility::to_string( ii_entity ) + " " + seqstring ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Bad aa received in seqstring " + utility::to_string( ii_entity ) + " " + seqstring ); } core::chemical::AA iiaa = core::chemical::aa_from_oneletter_code( iiaachar ); aas_present[ iiaa ] = true; task->nonconst_residue_task( ii ).restrict_absent_canonical_aas( aas_present ); if ( ! task->residue_task(ii).being_packed() ) { // sanity check; residue ii should be repacked if it's listed in the correspondence file - throw utility::excn::EXCN_Msg_Exception( "Completely disabled a residue listed in the correspondence file. Something has gone very wrong" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Completely disabled a residue listed in the correspondence file. Something has gone very wrong" ); } } diff --git a/source/src/devel/replica_docking/InteractionScoreFilter.cc b/source/src/devel/replica_docking/InteractionScoreFilter.cc index c391bfa6e5..d2688cbefd 100644 --- a/source/src/devel/replica_docking/InteractionScoreFilter.cc +++ b/source/src/devel/replica_docking/InteractionScoreFilter.cc @@ -102,7 +102,7 @@ InteractionScoreFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache jump( tag->getOption< core::Size >( "jump", 1 )); if ( !pose.is_fullatom() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ERROR: it doesn't make sense to calculate the interaction score on low-res pose since in I_sc=bound-A-B, A&B are constant.\n It is totally a waste of time" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ERROR: it doesn't make sense to calculate the interaction score on low-res pose since in I_sc=bound-A-B, A&B are constant.\n It is totally a waste of time" ); } TR<<"InterfaceScoreFilter with lower threshold of "<getOption< std::string >( "tempering", "null" ), movers ); tempering_ = utility::pointer::dynamic_pointer_cast< protocols::canonical_sampling::HamiltonianExchange > ( mover ); if ( !tempering_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ModulatedMover requires an tempering argument" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ModulatedMover requires an tempering argument" ); } // n_temp_levels_ = tempering_->n_temp_levels(); //if ( tag->hasOption( "type" ) ) { @@ -107,12 +107,12 @@ ModulatedMover::parse_my_tag( // Save its tag utility::vector1< TagCOP > subtags = tag->getTags(); if ( subtags.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ModulatedMover requires at least a single subtag: the Mover that it is going to modulate. Have you used the rewrite_rosetta_script.py utility that lives in tools/xsd_xrw/ since the XSD XRW?" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ModulatedMover requires at least a single subtag: the Mover that it is going to modulate. Have you used the rewrite_rosetta_script.py utility that lives in tools/xsd_xrw/ since the XSD XRW?" ); } utility::tag::TagCOP initial_mover_tag = subtags[0]; mover_name_ = subtags[ 0 ]->getName(); if ( protocols::moves::MoverFactory::get_instance()->mover_creator_map().count( "mover_name_" ) == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ModulatedMover's first subtag must be the ThermodynamicMover that will be modulated. Have you used the rewrite_rosetta_script.py utility that lives in tools/xsd_xrw/ since the XSD XRW?" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ModulatedMover's first subtag must be the ThermodynamicMover that will be modulated. Have you used the rewrite_rosetta_script.py utility that lives in tools/xsd_xrw/ since the XSD XRW?" ); } // have to go through all the options in the mover tag, to avoid Tag::die_for_unaccessed_options() @@ -176,11 +176,11 @@ ModulatedMover::parse_my_tag( using namespace protocols::canonical_sampling; MoverOP new_mover( MoverFactory::get_instance()->newMover( mover_tag, data_map, filters, movers, pose ) ); if ( !new_mover ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Failed to instantiate a Mover with name \"" + mover_name_ + "\" from the ModulatedMover" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Failed to instantiate a Mover with name \"" + mover_name_ + "\" from the ModulatedMover" ); } ThermodynamicMoverOP th_mover( utility::pointer::dynamic_pointer_cast< protocols::canonical_sampling::ThermodynamicMover > ( new_mover ) ); if ( !th_mover ) { - throw utility::excn::EXCN_RosettaScriptsOption( "The \""+mover_name_+"\" requested in the ModulatedMover does not inherit from ThermodynamicMover" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The \""+mover_name_+"\" requested in the ModulatedMover does not inherit from ThermodynamicMover" ); } movers_.push_back( th_mover ); // } // end of for ( temp_level ) @@ -207,7 +207,7 @@ ModulatedMover::generate_mover_tag( tag->setOption< core::Real >( it.first, (it.second->get_value(grid_coord[1]) )*interps_2_.find(key)->second->get_value( grid_coord[2])); tr.Debug << "level " << temp_level << " modulated " << it.first << " is " << tag->getOption< core::Real >( it.first ) << std::endl; } else { - throw utility::excn::EXCN_RosettaScriptsOption( "key value is not provided for the 2nd dim" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "key value is not provided for the 2nd dim" ); } } tr.Debug << "tag generated for temp_level " << temp_level << std::endl; diff --git a/source/src/devel/replica_docking/TempInterpolatorFactory.cc b/source/src/devel/replica_docking/TempInterpolatorFactory.cc index 9a16f658ad..3fed56329c 100644 --- a/source/src/devel/replica_docking/TempInterpolatorFactory.cc +++ b/source/src/devel/replica_docking/TempInterpolatorFactory.cc @@ -46,7 +46,7 @@ TempInterpolatorBaseOP TempInterpolatorFactory::new_tempInterpolator( utility::tag::TagCOP tag, core::Size n_levels ) { if ( !tag->hasOption( "curve" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: interpolation curve type required !" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: interpolation curve type required !" ); } std::string curve = tag->getOption< std::string >( "curve" ); if ( curve == "const" ) { @@ -57,7 +57,7 @@ TempInterpolatorFactory::new_tempInterpolator( utility::tag::TagCOP tag, core::S core::Real end = tag->getOption< core::Real >( "end" ); return TempInterpolatorBaseOP( new TempInterpolator( n_levels, start, end, curve ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: start and end value must be given for linear and expotential interpolation !" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: start and end value must be given for linear and expotential interpolation !" ); } } } diff --git a/source/src/numeric/polynomial.cc b/source/src/numeric/polynomial.cc index c94008ecab..964a24fd82 100644 --- a/source/src/numeric/polynomial.cc +++ b/source/src/numeric/polynomial.cc @@ -38,6 +38,8 @@ #include #endif // SERIALIZATION +#include + namespace numeric { using std::string; @@ -83,19 +85,19 @@ Polynomial_1d::check_invariants() const if ( xmin_ > xmax_ ) { std::stringstream msg; msg << "Polnomial_1d is badly formed because (xmin: '" << xmin_ << "') > (xmax: '" << xmax_ << "')"; - throw utility::excn::EXCN_Msg_Exception(msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg.str() ); } if ( coefficients_.size() == 0 ) { std::stringstream msg; msg << "Polnomial_1d is badly formed because no coefficients were provided"; - throw utility::excn::EXCN_Msg_Exception(msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg.str() ); } if ( coefficients_.size() != degree_ ) { std::stringstream msg; msg << "Polnomial_1d is badly formed because the degree was given to be '" << degree_ << "' while '" << coefficients_.size() << "' coefficients were provided, while they should be equal."; - throw utility::excn::EXCN_Msg_Exception(msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg.str() ); } diff --git a/source/src/numeric/trig.functions.hh b/source/src/numeric/trig.functions.hh index 7854a22b6d..59cd926875 100644 --- a/source/src/numeric/trig.functions.hh +++ b/source/src/numeric/trig.functions.hh @@ -119,7 +119,7 @@ sin_cos_range( T const & x, T const & tol = T( .001 ) ) #endif #ifdef USEMPI std::string const warning( "NANs occured in sin_cos_range!" ); - throw( utility::excn::EXCN_Msg_Exception( warning ) ); + throw ( CREATE_EXCEPTION(utility::excn::Exception, warning ) ); #endif utility_exit(); return T( 0.0 ); // Keep compiler happy diff --git a/source/src/numeric/xyzVector.hh b/source/src/numeric/xyzVector.hh index a6db6510a5..d2d0cfbee0 100644 --- a/source/src/numeric/xyzVector.hh +++ b/source/src/numeric/xyzVector.hh @@ -662,7 +662,7 @@ public: // Methods Value const length_ = length(); //assert ( length_ != Value ( 0 )); if ( length_ == Value ( 0 ) ) { - throw utility::excn::EXCN_Msg_Exception("Cannot normalize xyzVector of length() zero"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Cannot normalize xyzVector of length() zero"); } Value const inv_length( Value( 1 ) / length_ ); diff --git a/source/src/protocols/aa_composition/AddCompositionConstraintMover.cc b/source/src/protocols/aa_composition/AddCompositionConstraintMover.cc index 039e886e6b..171fb7e66f 100644 --- a/source/src/protocols/aa_composition/AddCompositionConstraintMover.cc +++ b/source/src/protocols/aa_composition/AddCompositionConstraintMover.cc @@ -131,9 +131,9 @@ AddCompositionConstraintMover::parse_my_tag( core::select::residue_selector::ResidueSelectorCOP residue_selector; try { residue_selector = datamap.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from AddCompositionConstraintMover::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } runtime_assert( residue_selector ); add_residue_selector( residue_selector ); diff --git a/source/src/protocols/abinitio/AbrelaxApplication.cc b/source/src/protocols/abinitio/AbrelaxApplication.cc index 1d2df87e52..44006e6b0f 100644 --- a/source/src/protocols/abinitio/AbrelaxApplication.cc +++ b/source/src/protocols/abinitio/AbrelaxApplication.cc @@ -456,7 +456,7 @@ bool AbrelaxApplication::close_loops( pose::Pose &pose, core::scoring::ScoreFunc try { jumping::close_chainbreaks( closure_protocol, pose, abrelax_checkpoints_, tag, kinematics::FoldTree() ); if ( option[ OptionKeys::loops::debug_loop_closure ]() ) pose.dump_pdb(tag+"_post_closure.pdb"); - } catch ( loops::EXCN_Loop_not_closed& excn ) { + } catch (loops::EXCN_Loop_not_closed& excn ) { success = false; } diff --git a/source/src/protocols/abinitio/AbrelaxMover.cc b/source/src/protocols/abinitio/AbrelaxMover.cc index 0ca898aec2..634c2b37e6 100644 --- a/source/src/protocols/abinitio/AbrelaxMover.cc +++ b/source/src/protocols/abinitio/AbrelaxMover.cc @@ -347,7 +347,7 @@ void AbrelaxMover::apply( pose::Pose &pose ) { sampling_protocol()->get_checkpoints(), get_current_tag(), topology_broker()->final_fold_tree()); - } catch ( loops::EXCN_Loop_not_closed& excn ) { + } catch (loops::EXCN_Loop_not_closed& excn ) { set_current_tag( "C_"+get_current_tag().substr(std::min(2,(int)get_current_tag().size())) ); set_last_move_status( moves::FAIL_DO_NOT_RETRY ); loop_success = false; diff --git a/source/src/protocols/abinitio/HedgeArchive.cc b/source/src/protocols/abinitio/HedgeArchive.cc index 4c9fd975d5..ecc61beb00 100644 --- a/source/src/protocols/abinitio/HedgeArchive.cc +++ b/source/src/protocols/abinitio/HedgeArchive.cc @@ -166,7 +166,7 @@ void HedgeArchive::restore_status( std::istream& is ) { using namespace core::io::silent; core::io::silent::SilentFileOptions opts; SilentFileData sfd( opts ); - if ( !sfd.read_file( ffilename ) ) throw ( utility::excn::EXCN_BadInput( "problem reading silent file"+ffilename ) ); + if ( !sfd.read_file( ffilename ) ) throw ( CREATE_EXCEPTION(utility::excn::BadInput, "problem reading silent file"+ffilename ) ); for ( SilentFileData::iterator it=sfd.begin(), eit=sfd.end(); it!=eit; ++it ) { incoming_structures_[ batch_id ].push_back( std::make_pair( select_score( *it ), *it ) ); } diff --git a/source/src/protocols/abinitio/IterativeBase.cc b/source/src/protocols/abinitio/IterativeBase.cc index 4e2ce2b938..9b89d02e41 100644 --- a/source/src/protocols/abinitio/IterativeBase.cc +++ b/source/src/protocols/abinitio/IterativeBase.cc @@ -415,7 +415,7 @@ IterativeBase::IterativeBase(std::string name_in ) // maximum of sampled structures per stage max_nstruct_list_ = option[ iterative::max_nstruct ](); if ( max_nstruct_list_.size() != ( FINISHED-1 ) ) { - throw EXCN_Archive("wrong number "+string_of( max_nstruct_list_.size() ) + throw CREATE_EXCEPTION(EXCN_Archive, "wrong number "+string_of( max_nstruct_list_.size() ) +" of values for max_nstruct -- needs exactly "+string_of( FINISHED - 1 )+" values."); } max_nstruct_list_.push_back( 0 ); //for FINISH_STAGE @@ -423,7 +423,7 @@ IterativeBase::IterativeBase(std::string name_in ) // min cluster radius for diversification min_diversity_list_ = option[ iterative::min_diversity ](); if ( min_diversity_list_.size() != ( FINISHED-1 ) ) { - throw EXCN_Archive("wrong number "+string_of( min_diversity_list_.size() ) + throw CREATE_EXCEPTION(EXCN_Archive, "wrong number "+string_of( min_diversity_list_.size() ) +" of values for min_diversity -- needs exactly "+string_of( FINISHED - 1 )+" values."); } min_diversity_list_.push_back( 0 ); //for FINISH_STAGE @@ -431,7 +431,7 @@ IterativeBase::IterativeBase(std::string name_in ) // accept ratio to end stage target_accept_ratio_ = option[ iterative::accept_ratio ](); if ( target_accept_ratio_.size() != ( FINISHED-1 ) ) { - throw EXCN_Archive("wrong number "+string_of( target_accept_ratio_.size() ) + throw CREATE_EXCEPTION(EXCN_Archive, "wrong number "+string_of( target_accept_ratio_.size() ) +" of values for accept_ratio -- needs exactly "+string_of( FINISHED - 1 )+" values."); } target_accept_ratio_.push_back( 1 ); //for FINISH_STAGE @@ -459,7 +459,7 @@ IterativeBase::IterativeBase(std::string name_in ) if ( reference_pose_ ) { target_sequence_ = reference_pose_->sequence(); } else { - throw EXCN_Archive("need either fasta-sequence (-in:file:fasta) or native structure ( -in:file:native )"); + throw CREATE_EXCEPTION(EXCN_Archive, "need either fasta-sequence (-in:file:fasta) or native structure ( -in:file:native )"); } } @@ -1051,8 +1051,7 @@ void IterativeBase::gen_enumerate_pairings( jd2::archive::Batch& batch ) { if ( option[ iterative::enumerate::broker ].user() ) { utility::io::izstream enum_broker( option[ iterative::enumerate::broker ]() ); if ( !enum_broker.good() ) { - throw ( utility::excn::EXCN_FileNotFound - ( "-iterative::enumerate::broker: File " + throw ( CREATE_EXCEPTION(utility::excn::FileNotFound, "-iterative::enumerate::broker: File " +std::string( option[ iterative::enumerate::broker ]())+" not found! ") ); } std::string line; @@ -2153,12 +2152,12 @@ IterativeBase::test_broker_settings( jd2::archive::Batch const& batch ) { utility::vector1< std::string > files( option[ OptionKeys::broker::setup ]() ); std::copy( files.begin(), files.end(), std::ostream_iterator( tr.Debug, " ")); tr.Debug << std::endl; - } catch ( utility::excn::EXCN_Exception &excn ) { // clean up options and rethrow + } catch ( utility::excn::Exception &excn ) { // clean up options and rethrow utility_exit_with_message( "[ERROR] problems with broker setup in "+batch.all_broker_files()+" aborting... "); tr.Error << "problems with broker setup in " << batch.all_broker_files() << " aborting... " << std::endl; // excn.show( tr.Error ); option = vanilla_options; - throw ( EXCN_Archive( batch.all_broker_files() + " contains errors: " + excn.msg() ) ); + throw ( CREATE_EXCEPTION(EXCN_Archive, batch.all_broker_files() + " contains errors: " + excn.msg() ) ); } option = vanilla_options; } diff --git a/source/src/protocols/abinitio/KinematicAbinitio.cc b/source/src/protocols/abinitio/KinematicAbinitio.cc index 3b05e5dbf5..599a00512a 100644 --- a/source/src/protocols/abinitio/KinematicAbinitio.cc +++ b/source/src/protocols/abinitio/KinematicAbinitio.cc @@ -470,7 +470,7 @@ KinematicAbinitio::apply( core::pose::Pose& pose ) { closure_protocol_->set_current_tag( get_current_tag() ); try { jumping::close_chainbreaks( closure_protocol_, pose, get_checkpoints(), get_current_tag(), kinematics().final_fold_tree() ); - } catch ( loops::EXCN_Loop_not_closed& excn ) { + } catch (loops::EXCN_Loop_not_closed& excn ) { set_current_tag( "C_"+get_current_tag().substr(std::min(2,(int)get_current_tag().size())) ); set_last_move_status( moves::FAIL_RETRY ); } diff --git a/source/src/protocols/abinitio/abscript/AbscriptLoopCloserCM.cc b/source/src/protocols/abinitio/abscript/AbscriptLoopCloserCM.cc index 6997c40e93..4e2ac2ad67 100644 --- a/source/src/protocols/abinitio/abscript/AbscriptLoopCloserCM.cc +++ b/source/src/protocols/abinitio/abscript/AbscriptLoopCloserCM.cc @@ -157,7 +157,7 @@ bool angle_cpy( core::pose::Pose& target, core::pose::Pose const& source, core:: << t_id << "). Target angle was " << target.torsion( t_id ) << " and source angle was " << source.torsion( t_id ) << " (delta=" << angle_diff( target.torsion( t_id ), source.torsion( t_id ) ) << "; tolerance is " << TOLERANCE << ")." << std::endl; - throw protocols::loops::EXCN_Loop_not_closed( ss.str() ); + throw CREATE_EXCEPTION(protocols::loops::EXCN_Loop_not_closed, ss.str() ); } } else { tr.Debug << " ignoring modified " << angle << " @ " << t_id.torsion() << " (input=" << source.torsion( t_id ) << ", output=" << target.torsion( t_id ) << std::endl; @@ -215,7 +215,7 @@ void AbscriptLoopCloserCM::apply( core::pose::Pose& in_pose ){ warn += 1; } } - } catch( utility::excn::EXCN_Msg_Exception& e ) { + } catch( utility::excn::Exception& e ) { tr.Warning << this->get_name() << " failed to close loops without violating the ClientMover contract. Report: " << e.msg() << std::endl; this->set_last_move_status( moves::FAIL_DO_NOT_RETRY ); @@ -241,7 +241,7 @@ bool AbscriptLoopCloserCM::attempt_ccd( core::pose::Pose& pose ){ checkpointer, get_current_tag(), *final_ft_ ); - } catch ( loops::EXCN_Loop_not_closed& excn ) { + } catch (loops::EXCN_Loop_not_closed& excn ) { tr.Warning << this->get_name() << " failed to close a loop. Report: " << excn << std::endl; set_last_move_status( moves::FAIL_DO_NOT_RETRY ); set_current_tag( "C_"+get_current_tag().substr(std::min(2,(int)get_current_tag().size())) ); @@ -271,7 +271,7 @@ void AbscriptLoopCloserCM::parse_my_tag( utility::tag::TagCOP tag, fragfile = tag->getOption("fragments"); } else if ( !option[OptionKeys::in::file::frag3].user() ) { tr.Error <<"enter frags with either fragments= or -in:file:frag3" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "fragment file wrong type" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "fragment file wrong type" ); } else { fragfile = option[ OptionKeys::in::file::frag3 ](); } @@ -326,7 +326,7 @@ void AbscriptLoopCloserCM::attempt_idealize( core::pose::Pose& pose ) { ss << this->get_name() << " tried to start closing the fold tree by idealization (" << pose.fold_tree().num_cutpoint() - final_ft_->num_cutpoint() << " cuts are to be closed) but was not given any movable positions." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } idealizer->set_pos_list( pos_list ); diff --git a/source/src/protocols/abinitio/abscript/AbscriptMover.cc b/source/src/protocols/abinitio/abscript/AbscriptMover.cc index c7492dc5ac..41733d7d3f 100644 --- a/source/src/protocols/abinitio/abscript/AbscriptMover.cc +++ b/source/src/protocols/abinitio/abscript/AbscriptMover.cc @@ -213,7 +213,7 @@ AbscriptMover::AbscriptMover(): if ( option[ OptionKeys::fold_cst::seq_sep_stages ].user() ) { if ( option[ OptionKeys::fold_cst::seq_sep_stages ]().size() != 3 ) { - throw utility::excn::EXCN_BadInput("Option seq_sep_stages requires exactly 3 values."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Option seq_sep_stages requires exactly 3 values."); } seqsep_stage1 = option[ OptionKeys::fold_cst::seq_sep_stages ]()[ 1 ]; //default 15 seqsep_stage3 = option[ OptionKeys::fold_cst::seq_sep_stages ]()[ 2 ]; //default 15 @@ -255,7 +255,7 @@ void AbscriptMover::apply( core::pose::Pose& pose ){ using namespace basic::options; if ( ! pose.is_centroid() ) { - throw utility::excn::EXCN_BadInput( "AbscriptMover recieved a non-centroid pose. Only centroid poses are accepted because of the score functions used in this algorithm." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "AbscriptMover recieved a non-centroid pose. Only centroid poses are accepted because of the score functions used in this algorithm." ); } StageTracker tracker( mc_ ); @@ -331,7 +331,7 @@ AbscriptMover::parse_my_tag( if ( datamap.has( "scorefxns", scorefxn_name ) ) { //This error condition would be pretty easy to remove by just changing the way - throw utility::excn::EXCN_BadInput( "Automatic score function " + scorefxn_name + + throw CREATE_EXCEPTION(utility::excn::BadInput, "Automatic score function " + scorefxn_name + " was already registered." ); } @@ -345,7 +345,7 @@ AbscriptMover::parse_my_tag( if ( tag->hasOption( "cycles" ) ) { cycles_prefactor = tag->getOption< core::Real >( "cycles", 1.0 ); if ( option[ OptionKeys::abinitio::increase_cycles ].user() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Flag increase_cycles and AbscriptMover 'cycles' option are incompatible."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Flag increase_cycles and AbscriptMover 'cycles' option are incompatible."); } } else if ( option[ OptionKeys::abinitio::increase_cycles ].user() ) { cycles_prefactor = option[ OptionKeys::abinitio::increase_cycles ]; @@ -365,7 +365,7 @@ AbscriptMover::parse_my_tag( utility::vector1< StageID > skipped_stages; if ( tag->hasOption("skip_stages") ) { if ( option[ OptionKeys::abinitio::skip_stages ].user() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Flag abinitio::skip_stages and AbscriptMover 'skip_stages' option are incompatible."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Flag abinitio::skip_stages and AbscriptMover 'skip_stages' option are incompatible."); } else { utility::vector1< std::string > const skipped_str( utility::string_split( tag->getOption< std::string >( "skip_stages" ), ',' ) ); for ( utility::vector1< std::string >::const_iterator stage_it = skipped_str.begin(); @@ -377,13 +377,13 @@ AbscriptMover::parse_my_tag( try { stage_int = utility::string2int( *stage_it ); } catch (...) { - throw utility::excn::EXCN_RosettaScriptsOption( "Stage '"+*stage_it+"' is not recognized." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Stage '"+*stage_it+"' is not recognized." ); } if ( stage_int > 0 && stage_int <= 4 ) { skipped_stages.push_back( StageID( stage_int ) ); } else { tr.Error << "Skipped stage " << stage_int << " must be between 1 and 4." << std::endl; - utility::excn::EXCN_RosettaScriptsOption( "Stage number "+*stage_it+" is invalid." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Stage number "+*stage_it+" is invalid." ); } } } @@ -392,7 +392,7 @@ AbscriptMover::parse_my_tag( for ( IntegerVectorOption::const_iterator it = option[ OptionKeys::abinitio::skip_stages ]().begin(); it != option[ OptionKeys::abinitio::skip_stages ]().end(); ++it ) { if ( *it < 1 || *it > 4 ) { - throw utility::excn::EXCN_BadInput( "The option abinitio::skip_stages specified value "+ + throw CREATE_EXCEPTION(utility::excn::BadInput, "The option abinitio::skip_stages specified value "+ utility::to_string( *it )+", which is not a valid stage." ); } skipped_stages.push_back( StageID(*it) ); @@ -430,7 +430,7 @@ AbscriptMover::parse_my_tag( std::string name = movertag->getOption( "name", "null" ); if ( movers.find( name ) == movers.end() ) { tr.Error << "Mover not found for XML tag:\n" << movertag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Mover '"+name+"' not found."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover '"+name+"' not found."); } if ( movertag->getName() == "Mover" ) { @@ -439,7 +439,7 @@ AbscriptMover::parse_my_tag( } else if ( movertag->getName() == "Preparer" ) { register_preparer( movers.find( name )->second, stages ); } else { - throw utility::excn::EXCN_RosettaScriptsOption( "Stage subtag "+movertag->getName()+ + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Stage subtag "+movertag->getName()+ " is not valid. Only 'Mover' and 'Preparer' are accepted." ); } } @@ -457,7 +457,7 @@ AbscriptMover::parse_my_tag( stagetag->getOption< bool >( "initialize", true )); } else { tr.Error << "AbscriptMover recieved illegal tag ('Stage' and 'Fragments' are acceptable): '" << stagetag << "'" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Illegal AbscriptMover subtag."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Illegal AbscriptMover subtag."); } } @@ -537,7 +537,7 @@ void AbscriptMover::add_frags( void verify_stage_ID( std::map< std::string, StageID > const& id_map, std::string const& id ){ if ( id_map.find( id ) == id_map.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Stage id '" + id + "' is not recognized." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Stage id '" + id + "' is not recognized." ); } } @@ -562,7 +562,7 @@ StageIDs AbscriptMover::parse_stage_id( std::string const& id_str ) const { ids.push_back( id ); } } else { - throw utility::excn::EXCN_RosettaScriptsOption("Stage ID range syntax error for '" + *range + "'" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Stage ID range syntax error for '" + *range + "'" ); } } @@ -577,7 +577,7 @@ void AbscriptMover::register_submover( protocols::moves::MoverOP mover_in, tr.Error << "The mover " << mover_in->get_name() << " cannot be attached to the Abscript mover because it is not a ClientMover " << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Abscript mover takes only ClientMovers."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Abscript mover takes only ClientMovers."); } for ( StageIDs::const_iterator id = ids.begin(); id != ids.end(); ++id ) { @@ -623,7 +623,7 @@ void AbscriptMover::register_preparer( protocols::moves::MoverOP mover, StageIDs StagePreparerOP preparer = utility::pointer::dynamic_pointer_cast< protocols::abinitio::abscript::StagePreparer > ( mover ); if ( !preparer ) { tr.Error << "The mover '" << mover->get_name() << "' is not a preparer." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Non-preparer mover added as preparer to Abscript."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Non-preparer mover added as preparer to Abscript."); } for ( StageIDs::const_iterator id = ids.begin(); id != ids.end(); ++id ) { diff --git a/source/src/protocols/abinitio/abscript/ConstraintPreparer.cc b/source/src/protocols/abinitio/abscript/ConstraintPreparer.cc index cf1aa0d3fe..42c2370fd6 100644 --- a/source/src/protocols/abinitio/abscript/ConstraintPreparer.cc +++ b/source/src/protocols/abinitio/abscript/ConstraintPreparer.cc @@ -105,8 +105,8 @@ void ConstraintPreparer::prepare( core::pose::Pose& pose, core::Real ){ try{ // it's not great that this is re-loaded each time, but it's safe and doesn't get called that often. constraints_ = ConstraintIO::get_instance()->read_constraints( cst_file(), ConstraintSetOP( new ConstraintSet ), pose ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_BadInput( get_name() + " encountered problem loading constraint file '" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::BadInput, get_name() + " encountered problem loading constraint file '" + cst_file() + "' : " + e.msg() ); } @@ -151,14 +151,14 @@ void ConstraintPreparer::parse_my_tag( utility::tag::TagCOP tag, tr.Error << "Command line option constraints::skip_redundant conflicts " << "with RosettaScripts initialization of ConstraintPreparer " << tag->getOption< std::string >( "name", "null" ) << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "ConstraintPreparer " + this->get_name() + + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ConstraintPreparer " + this->get_name() + "skip_redundant conflict" ); } else if ( option[ constraints::skip_redundant_width ].user() && (Size) option[ constraints::skip_redundant_width ] != skip_redundant_width() ) { tr.Error << "Command line option constraints::skip_redundant_width conflicts " << "with RosettaScripts initialization of ConstraintPreparer " << tag->getOption< std::string >( "name", "null" ) << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "ConstraintPreparer " + this->get_name() + + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ConstraintPreparer " + this->get_name() + "skip_redundant_width conflict" ); } } else { @@ -175,7 +175,7 @@ void ConstraintPreparer::parse_my_tag( utility::tag::TagCOP tag, } else { tr.Error << "ConstraintPreparers require a constraint file. " << "Use the 'cst_file' tag in the mover definition. " << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("ConstraintPreparer has no constraint file."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ConstraintPreparer has no constraint file."); } combine_ratio( tag->getOption< core::Size >( "combine_ratio", 1 ) ); diff --git a/source/src/protocols/abinitio/abscript/FragmentCM.cc b/source/src/protocols/abinitio/abscript/FragmentCM.cc index d7d263723d..118938400c 100644 --- a/source/src/protocols/abinitio/abscript/FragmentCM.cc +++ b/source/src/protocols/abinitio/abscript/FragmentCM.cc @@ -170,7 +170,7 @@ void FragmentCM::parse_my_tag( utility::tag::TagCOP tag, std::ostringstream ss; ss << "The fragment type " << frag_type << " is not valid. The options " << " are 'classic' and 'smooth'."; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } initialize( tag->getOption< bool >( "initialize", true ) ); @@ -196,7 +196,7 @@ claims::EnvClaims FragmentCM::yield_claims( core::pose::Pose const& pose, utility::vector1< bool > torsion_mask; try { torsion_mask = selector()->apply( pose ); - } catch( utility::excn::EXCN_Msg_Exception& e ){ + } catch( utility::excn::Exception& e ){ std::ostringstream ss; ss << this->get_name() << " failed to apply its ResidueSelector in " << __FUNCTION__ << "."; e.add_msg(ss.str()); @@ -207,7 +207,7 @@ claims::EnvClaims FragmentCM::yield_claims( core::pose::Pose const& pose, if ( shift == -1 ) { // verify that torsion_mask isn't all-false. std::ostringstream ss; ss << "Selector used address fragment insertions of '" << this->get_name() << "' was empty."; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } mover()->set_fragments( mover()->fragments()->clone_shifted( shift ) ); diff --git a/source/src/protocols/abinitio/abscript/FragmentJumpCM.cc b/source/src/protocols/abinitio/abscript/FragmentJumpCM.cc index 40530c2c61..4d4f8deebc 100644 --- a/source/src/protocols/abinitio/abscript/FragmentJumpCM.cc +++ b/source/src/protocols/abinitio/abscript/FragmentJumpCM.cc @@ -133,7 +133,7 @@ void FragmentJumpCM::parse_my_tag( utility::tag::TagCOP tag, tr.Error << "Parsing problem in FragmentJumpCM: " << " option set not compatible. Valid sets are 'topol_file' " << " or 'ss_info', 'pairing_file', and 'n_sheets'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "FragmentJumpCM incompatible options." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "FragmentJumpCM incompatible options." ); } initialize( tag->getOption< bool >( "initialize", true ) ); @@ -293,7 +293,7 @@ void FragmentJumpCM::set_topology( std::string const& ss_info_file, jumping::JumpSample jump_sample; try{ jump_sample = calculate_jump_sample(); - } catch( utility::excn::EXCN_BadInput ){ + } catch( utility::excn::BadInput ){ std::stringstream ss; ss << "Was not able to construct a valid jump sample in 10 attempts using ss_info file " << ss_info_file << ", pairing file " << pairing_file << " and " << n_sheets @@ -301,7 +301,7 @@ void FragmentJumpCM::set_topology( std::string const& ss_info_file, tr.Error << ss.str() << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } @@ -314,7 +314,7 @@ void FragmentJumpCM::set_topology( std::string const& topol_filename ){ utility::io::izstream is( topol_filename ); if ( !is.good() ) { - throw utility::excn::EXCN_FileNotFound(" Topology file '" + topol_filename +"' not found." ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, " Topology file '" + topol_filename +"' not found." ); } abinitio::PairingStatisticsOP ps( new abinitio::PairingStatistics ); @@ -330,8 +330,8 @@ void FragmentJumpCM::set_topology( std::string const& topol_filename ){ jumping::JumpSample jump_sample; try{ jump_sample = calculate_jump_sample(); - } catch( utility::excn::EXCN_BadInput ){ - throw utility::excn::EXCN_BadInput( "Was not able to construct a valid jump sample in 10 attempts using topology file " + } catch( utility::excn::BadInput ){ + throw CREATE_EXCEPTION(utility::excn::BadInput, "Was not able to construct a valid jump sample in 10 attempts using topology file " + topol_filename + "." ); } } @@ -370,14 +370,14 @@ jumping::JumpSample FragmentJumpCM::calculate_jump_sample() const { tr.Error << get_name() << " tried to make jumps but couldn't because no " << "(appropriate) JumpSampleData was cached in the pose and no topology information was " << "provided through parse_my_tag." << std::endl; - throw utility::excn::EXCN_BadInput( "FragmentJumpCM requires, but did not have, a JumpSample." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "FragmentJumpCM requires, but did not have, a JumpSample." ); } core::Size attempts = 10; while ( !jump_sample.is_valid() ) { attempts -= 1; if ( attempts <= 0 ) { - throw utility::excn::EXCN_BadInput( "Was not able to construct a valid jump sample in 10 attempts." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Was not able to construct a valid jump sample in 10 attempts." ); } jump_sample = jump_def_->create_jump_sample(); diff --git a/source/src/protocols/abinitio/abscript/JumpSampleData.cc b/source/src/protocols/abinitio/abscript/JumpSampleData.cc index f1acc2c619..3257de059a 100644 --- a/source/src/protocols/abinitio/abscript/JumpSampleData.cc +++ b/source/src/protocols/abinitio/abscript/JumpSampleData.cc @@ -48,13 +48,11 @@ std::string JumpSampleDataCreator::keyname() const{ JumpSampleData::JumpSampleData( std::istream &in ) : Parent() { - utility::excn::EXCN_BadInput e( "JumpSampleData tried to read an improperly formatted SilentFile remark." ); - std::string token; in >> token; if ( token != "MOVERKEY" ) { - throw e; + throw CREATE_EXCEPTION(utility::excn::BadInput, "JumpSampleData tried to read an improperly formatted SilentFile remark." ); } in >> moverkey_; diff --git a/source/src/protocols/abinitio/abscript/RigidChunkCM.cc b/source/src/protocols/abinitio/abscript/RigidChunkCM.cc index cbf2e5faf2..df657a85fb 100644 --- a/source/src/protocols/abinitio/abscript/RigidChunkCM.cc +++ b/source/src/protocols/abinitio/abscript/RigidChunkCM.cc @@ -170,7 +170,7 @@ loops::Loops read_rigid_core( std::string const& file){ if ( !infile.good() ) { tr.Error << "Error opening RBSeg file '" << file << "'" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "[ERROR] Error opening RBSeg file '" + file + "'" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "[ERROR] Error opening RBSeg file '" + file + "'" ); } return loops::Loops( reader.read_pose_numbered_loops_file( infile, file, false ) ); @@ -205,7 +205,7 @@ void RigidChunkCM::parse_my_tag( utility::tag::TagCOP tag, std::ostringstream ss; ss << "In mover '" << xml_name_ << "', the 'apply_to_template' tag contained the mover '" << *movername << "', which could not be found." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } } } @@ -217,7 +217,7 @@ void RigidChunkCM::parse_my_tag( utility::tag::TagCOP tag, std::ostringstream ss; ss << "In " << this->get_name() << " the option '" << APPLY_TO_TEMPLATE << "' is not combinable with input templates." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } template_ = NULL; } else { @@ -233,13 +233,13 @@ void RigidChunkCM::parse_my_tag( utility::tag::TagCOP tag, } else { std::ostringstream ss; ss << "RigidChunkCM named '" << this->get_name() << " couldn't apply one of its input movers because it doesn't exist."; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } } template_ = p; } } else { - throw utility::excn::EXCN_BadInput( "RigidChunkCM requires a template pdb with coordinates for rigid regions."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "RigidChunkCM requires a template pdb with coordinates for rigid regions."); } // Determine which region of the template file we want to take. @@ -323,12 +323,12 @@ void RigidChunkCM::configure( std::ostringstream ss; ss << this->get_name() << " reports that its input loops file (aka rigid core file) contained no residues." << " Check your input." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } else if ( sim_selection.index( true ) == 0 ) { std::ostringstream ss; ss << this->get_name() << " reports that its selector (used on the simulation to determine where to insert residues)" << " returned an empty selection. Check your input." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } @@ -393,7 +393,7 @@ void RigidChunkCM::configure( << " combination because template residue " << templ().residue(cys_partner).name3() << cys_partner << " is disulfide bonded with " << templ().residue( i ).name3() << i << ". RigidChunkClaimer must include both or neither." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } } @@ -409,7 +409,7 @@ void RigidChunkCM::configure( << " selection because input pose residue " << in_p.residue(cys_partner).name3() << cys_partner << " is disulfide bonded with " << in_p.residue( i ).name3() << i << ". RigidChunkClaimer's rigid chunk must include both or neither." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } } @@ -424,7 +424,7 @@ claims::EnvClaims RigidChunkCM::yield_claims( core::pose::Pose const& in_p, utility::vector1< bool > selection( in_p.size(), false ); try { selection = sim_selector()->apply( in_p ); - } catch( utility::excn::EXCN_Msg_Exception& e ){ + } catch( utility::excn::Exception& e ){ std::ostringstream ss; ss << this->get_name() << " failed to apply its ResidueSelector in " << __FUNCTION__ << ". "; ss << "Pose was length " << in_p.size() << ": " << in_p.sequence(); @@ -659,7 +659,7 @@ void RigidChunkCM::initialize( Pose& pose ){ DofUnlock activation( pose.conformation(), passport() ); // if ( missing_density( pose, rigid_core(), region_offset_ ) ) { - // throw utility::excn::EXCN_BadInput( " missing density in backbone of rigid-chunk. Check your LOOP definitions."); + // throw CREATE_EXCEPTION(utility::excn::BadInput, " missing density in backbone of rigid-chunk. Check your LOOP definitions."); // } core::pose::Pose reference( pose ); @@ -709,7 +709,7 @@ void RigidChunkCM::initialize( Pose& pose ){ << "Template: " << utility::to_string( templ().residue( templ_pos ).type().properties().get_list_of_variants() ) << std::endl; } - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } } @@ -805,7 +805,7 @@ loops::Loops RigidChunkCM::select_parts( loops::Loops const& rigid_core, core::S if ( rigid_core.size() < 1 ) { tr.Error << "Given rigid core had size < 1. Check your loop definitions." << std::endl; - throw utility::excn::EXCN_BadInput( "Given rigid core had size < 1. Check your loop definitions." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Given rigid core had size < 1. Check your loop definitions." ); } for ( Size attempts = 1; attempts <= 50 && current_rigid_core.size() != 0; ++attempts ) { diff --git a/source/src/protocols/analysis/InterfaceAnalyzerMover.cc b/source/src/protocols/analysis/InterfaceAnalyzerMover.cc index 1d2e89ea04..daefec144f 100644 --- a/source/src/protocols/analysis/InterfaceAnalyzerMover.cc +++ b/source/src/protocols/analysis/InterfaceAnalyzerMover.cc @@ -1363,7 +1363,7 @@ InterfaceAnalyzerMover::compute_interface_sc( core::Size &, core::pose::Pose con core::scoring::sc::RESULTS const results = sc_calc.GetResults(); data_.sc_value = results.sc; } -catch (utility::excn::EXCN_Base& excn){ +catch (utility::excn::Exception& excn){ TR << "SC calculation failed. Setting to 0" << std::endl; data_.sc_value = 0; } @@ -1467,11 +1467,11 @@ InterfaceAnalyzerMover::parse_my_tag( if ( tag->hasOption( "jump" ) && tag->hasOption( "fixedchains" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Jump and fixedchains are mutually exclusive. Use either jump or fixedchains" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Jump and fixedchains are mutually exclusive. Use either jump or fixedchains" ); } if ( ( tag->hasOption( "jump" ) || tag->hasOption( "fixedchains" ) ) && tag->hasOption( "ligandchain" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "if you specify Jump or fixedchains you cannot also specify ligandchain" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "if you specify Jump or fixedchains you cannot also specify ligandchain" ); } if ( tag->hasOption( "fixedchains" ) ) { diff --git a/source/src/protocols/antibody/AntibodyInfo.cc b/source/src/protocols/antibody/AntibodyInfo.cc index 21124a3b1b..5109d9cbb5 100644 --- a/source/src/protocols/antibody/AntibodyInfo.cc +++ b/source/src/protocols/antibody/AntibodyInfo.cc @@ -325,7 +325,7 @@ AntibodyInfo::get_landmark_resnum( utility::to_string(pdb_resnum) + " " + chain + " "+insertion_code + "\n"; if ( fail_on_missing_resnum ) { - throw utility::excn::EXCN_BadInput(msg + + throw CREATE_EXCEPTION(utility::excn::BadInput, msg + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n"+ "This could also mean missing density in pdb. Loop modeling applications can be used to fill missing residues\n"); } else { @@ -365,7 +365,7 @@ AntibodyInfo::get_landmark_resnum( if ( fail_on_missing_resnum ) { - throw utility::excn::EXCN_BadInput(msg + + throw CREATE_EXCEPTION(utility::excn::BadInput, msg + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n"+ "This could also mean missing density in the cdr loop. Loop modeling applications can be used to fill missing residues \n"); } else { @@ -429,14 +429,14 @@ void AntibodyInfo::identify_antibody(pose::Pose const & pose){ switch (pose.conformation().num_chains() ) { case 0 : - throw excn::EXCN_Msg_Exception("the number of chains in the input pose is '0' !!"); + throw CREATE_EXCEPTION(excn::Exception, "the number of chains in the input pose is '0' !!"); case 1 : //if pose has only "1" chain, it is a nanobody if ( H_found ) { is_camelid_ = true; has_antigen_=false; } else { - throw excn::EXCN_Msg_Exception(" A): the input pose has only 1 chain, if it is a nanobody, the chain ID is supposed to be 'H' !!"); + throw CREATE_EXCEPTION(excn::Exception, " A): the input pose has only 1 chain, if it is a nanobody, the chain ID is supposed to be 'H' !!"); } break; case 2 : @@ -450,7 +450,7 @@ void AntibodyInfo::identify_antibody(pose::Pose const & pose){ is_camelid_ = true; has_antigen_ = true; } else { - throw excn::EXCN_Msg_Exception(" B): the input pose has two chains, 1). if it is nanobody, the chain should be 'H'. 2). Light chain SCFv not implemented "); + throw CREATE_EXCEPTION(excn::Exception, " B): the input pose has two chains, 1). if it is nanobody, the chain should be 'H'. 2). Light chain SCFv not implemented "); } break; default : @@ -464,7 +464,7 @@ void AntibodyInfo::identify_antibody(pose::Pose const & pose){ is_camelid_ = true; has_antigen_ = true; } else { - throw excn::EXCN_Msg_Exception(" C). the input pose has more than two chains, but either 1) Light chain SCFv not implemented 2) Antibody is not renumbered "); + throw CREATE_EXCEPTION(excn::Exception, " C). the input pose has more than two chains, but either 1) Light chain SCFv not implemented 2) Antibody is not renumbered "); } break; } @@ -527,7 +527,7 @@ void AntibodyInfo::setup_CDRsInfo( pose::Pose const & pose ) { //Exception Handling if ( loop_start_in_pose ==0 || loop_stop_in_pose == 0 ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "\nAntibody does not contain the start or end residue of cdr loop " + get_CDR_name(cdr) + " start: " + utility::to_string(loop_start_in_pose) + " end: " + utility::to_string(loop_stop_in_pose) + "\n" + @@ -536,7 +536,7 @@ void AntibodyInfo::setup_CDRsInfo( pose::Pose const & pose ) { } if ( loop_start_in_pose > loop_stop_in_pose ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "\nBad antibody input: " + get_CDR_name(cdr) +" cdr_start resnum > cdr_stop "+ " start: " + utility::to_string(loop_start_in_pose) + " end: " + utility::to_string(loop_stop_in_pose) + "\n" + @@ -618,20 +618,20 @@ void AntibodyInfo::setup_FrameWorkInfo( pose::Pose const & pose ) { if ( L_begin_pos_num >= get_landmark_resnum(pose, Chothia_Scheme, 'L', 23, ' ', false) ) { - throw excn::EXCN_Msg_Exception( "L chain 1st residue starting after L 23, framework definition failed!!! " ); + throw CREATE_EXCEPTION(excn::Exception, "L chain 1st residue starting after L 23, framework definition failed!!! " ); } if ( L_end_pos_num <= get_landmark_resnum(pose, Chothia_Scheme, 'L', 97, ' ', false) ) { - throw excn::EXCN_Msg_Exception( "L chain last residue ending before L 97, framework definition failed!!! " ); + throw CREATE_EXCEPTION(excn::Exception, "L chain last residue ending before L 97, framework definition failed!!! " ); } } if ( H_begin_pos_num >= get_landmark_resnum(pose, Chothia_Scheme, 'H', 26, ' ', false ) ) { - throw excn::EXCN_Msg_Exception( "H chain 1st residue starting after H 26, framework definition failed!!! " ); + throw CREATE_EXCEPTION(excn::Exception, "H chain 1st residue starting after H 26, framework definition failed!!! " ); } if ( H_end_pos_num <= get_landmark_resnum(pose, Chothia_Scheme, 'H', 103, ' ', false) ) { - throw excn::EXCN_Msg_Exception( "H chain last residue ending before H 103, framework definition failed!!! " ); + throw CREATE_EXCEPTION(excn::Exception, "H chain last residue ending before H 103, framework definition failed!!! " ); } @@ -785,7 +785,7 @@ AntibodyInfo::check_cdr_quality(const pose::Pose& pose) const { msg = msg + "Please check peptide bond angles for large deviations. \n"+ "Use refinement techniques such as FastRelax with angle minimization to correct wonky peptide bonds "; } - throw utility::excn::EXCN_BadInput(msg); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg); } } @@ -1111,7 +1111,7 @@ AntibodyInfo::get_CDR_start(CDRNameEnum const cdr_name, pose::Pose const & pose) PDBLandmark landmark = *(numbering_info_.cdr_numbering[cdr_name][cdr_start]); core::Size resnum = pose.pdb_info()->pdb2pose(chains_for_cdrs_[cdr_name], landmark.resnum(), landmark.insertion_code()); if ( resnum == 0 ) { - throw utility::excn::EXCN_BadInput("\n" + get_CDR_name(cdr_name)+" start resnum not found in pose: " + + throw CREATE_EXCEPTION(utility::excn::BadInput, "\n" + get_CDR_name(cdr_name)+" start resnum not found in pose: " + utility::to_string(landmark.resnum())+" "+chains_for_cdrs_[cdr_name]+" "+landmark.insertion_code() + "\n" + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n"+ "This could also mean missing density in the cdr loop. Loop modeling applications can be used to fill missing residues \n"); @@ -1138,7 +1138,7 @@ AntibodyInfo::get_CDR_start(CDRNameEnum const cdr_name, pose::Pose const & pose PDBLandmark landmark = *(get_cdr_definition_transform(transform)[cdr_name][cdr_start]); resnum = pose.pdb_info()->pdb2pose(chains_for_cdrs_[cdr_name], landmark.resnum(), landmark.insertion_code()); if ( resnum == 0 ) { - throw utility::excn::EXCN_BadInput("\n"+get_CDR_name(cdr_name)+" start resnum for " + + throw CREATE_EXCEPTION(utility::excn::BadInput, "\n"+get_CDR_name(cdr_name)+" start resnum for " + enum_manager_->cdr_definition_enum_to_string(transform) + " definition not found in pose: " + utility::to_string(landmark.resnum())+" "+chains_for_cdrs_[cdr_name]+" "+landmark.insertion_code() + "\n" + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n"+ @@ -1166,7 +1166,7 @@ AntibodyInfo::get_CDR_end(CDRNameEnum const cdr_name, pose::Pose const & pose) c core::Size resnum = pose.pdb_info()->pdb2pose(chains_for_cdrs_[cdr_name], landmark.resnum(), landmark.insertion_code()); if ( resnum == 0 ) { - throw utility::excn::EXCN_BadInput("\n"+get_CDR_name(cdr_name)+" end resnum not found in pose: " + + throw CREATE_EXCEPTION(utility::excn::BadInput, "\n"+get_CDR_name(cdr_name)+" end resnum not found in pose: " + utility::to_string(landmark.resnum())+" "+chains_for_cdrs_[cdr_name]+" "+landmark.insertion_code() + "\n" + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n" + "This could also mean missing density in the cdr loop. Loop modeling applications can be used to fill missing residues \n"); @@ -1193,7 +1193,7 @@ AntibodyInfo::get_CDR_end(CDRNameEnum const cdr_name, pose::Pose const & pose, C PDBLandmark landmark = *(get_cdr_definition_transform(transform)[cdr_name][cdr_end]); resnum = pose.pdb_info()->pdb2pose(chains_for_cdrs_[cdr_name], landmark.resnum(), landmark.insertion_code()); if ( resnum == 0 ) { - throw utility::excn::EXCN_BadInput("\n"+get_CDR_name(cdr_name)+" end resnum not found in pose: " + + throw CREATE_EXCEPTION(utility::excn::BadInput, "\n"+get_CDR_name(cdr_name)+" end resnum not found in pose: " + enum_manager_->cdr_definition_enum_to_string(transform) + " definition not found in pose: " + utility::to_string(landmark.resnum())+" "+chains_for_cdrs_[cdr_name]+" "+landmark.insertion_code() + "\n" + "Please check pdb is renumbered properly and the passed -numbering_scheme option matches the PDB. \n" + @@ -1400,7 +1400,7 @@ AntibodyInfo::setup_CDR_cluster(const pose::Pose& pose, CDRNameEnum cdr, bool at // here! std::stringstream err; err << "CDRs not found for: " << pose.pdb_info()->name(); - throw utility::excn::EXCN_Msg_Exception(err.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str()); // old code results in NULL pointer when CDRs are not found by regex? //cdr_cluster_set_->set_cluster_data(cdr, NULL); } @@ -1618,12 +1618,12 @@ AntibodyInfo::get_FoldTree_LH_A( pose::Pose const & pose ) const { //TODO JAB - requiring PDB ordered LHA is not desired for ( Size i = 1; i <= nres; ++i ) { if ( pdb_info->chain(1) != 'L' ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); //break; } if ( (pdb_info->chain(i) == 'L') && (pdb_info->chain(i) != pdb_info->chain(i+1)) ) { if ( pdb_info->chain(i+1) != second_chain ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); // break; } } @@ -1695,12 +1695,12 @@ AntibodyInfo::get_FoldTree_L_HA( pose::Pose const & pose ) const { //TODO JAB - requiring PDB ordered LHA is not desired for ( Size i = 1; i <= nres; ++i ) { if ( pdb_info->chain(1) != 'L' ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); //break; } if ( (pdb_info->chain(i) == 'L') && (pdb_info->chain(i) != pdb_info->chain(i+1)) ) { if ( pdb_info->chain(i+1) != second_chain ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); // break; } } @@ -1764,12 +1764,12 @@ AntibodyInfo::get_FoldTree_LA_H( pose::Pose const & pose ) const { //TODO JAB - requiring PDB ordered LHA is not desired for ( Size i = 1; i <= nres; ++i ) { if ( pdb_info->chain(1) != 'L' ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); //break; } if ( (pdb_info->chain(i) == 'L') && (pdb_info->chain(i) != pdb_info->chain(i+1)) ) { if ( pdb_info->chain(i+1) != second_chain ) { - throw excn::EXCN_Msg_Exception("Chains are not named correctly or are not in the expected order"); + throw CREATE_EXCEPTION(excn::Exception, "Chains are not named correctly or are not in the expected order"); // break; } } diff --git a/source/src/protocols/antibody/clusters/CDRClusterFeatures.cc b/source/src/protocols/antibody/clusters/CDRClusterFeatures.cc index 25210fc7e7..2fbd45031b 100644 --- a/source/src/protocols/antibody/clusters/CDRClusterFeatures.cc +++ b/source/src/protocols/antibody/clusters/CDRClusterFeatures.cc @@ -134,7 +134,7 @@ CDRClusterFeatures::parse_my_tag(utility::tag::TagCOP tag, basic::datacache::Dat } if ( ! enum_manager->numbering_scheme_is_present(scheme) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Numbering scheme not recognized: "+ scheme); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Numbering scheme not recognized: "+ scheme); } set_numbering_scheme( enum_manager->numbering_scheme_string_to_enum(scheme) ); @@ -142,7 +142,7 @@ CDRClusterFeatures::parse_my_tag(utility::tag::TagCOP tag, basic::datacache::Dat vector1< std::string > cdrsSP = utility::string_split(cdrs, ','); for ( core::Size i = 1; i <= cdrsSP.size(); ++i ) { if ( ! enum_manager->cdr_name_is_present(cdrsSP[i]) ) { - throw utility::excn::EXCN_RosettaScriptsOption("CDR not recognized: " + cdrsSP[i]); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CDR not recognized: " + cdrsSP[i]); } else { cdrs_.push_back(enum_manager->cdr_name_string_to_enum(cdrsSP[i])); } diff --git a/source/src/protocols/antibody/constraints/CDRDihedralConstraintMover.cc b/source/src/protocols/antibody/constraints/CDRDihedralConstraintMover.cc index 072a105d7b..889c6ce31f 100644 --- a/source/src/protocols/antibody/constraints/CDRDihedralConstraintMover.cc +++ b/source/src/protocols/antibody/constraints/CDRDihedralConstraintMover.cc @@ -255,7 +255,7 @@ CDRDihedralConstraintMover::apply(core::pose::Pose& pose) { ab_info_ = AntibodyInfoOP(new AntibodyInfo(pose)); } - if ( ! cdr_is_set_ ) throw utility::excn::EXCN_Msg_Exception("CDR not set for CDRDihedralConstraintMover!"); + if ( ! cdr_is_set_ ) throw CREATE_EXCEPTION(utility::excn::Exception, "CDR not set for CDRDihedralConstraintMover!"); if ( use_cluster_csts_ && (cdr_ != h3 || use_cluster_for_H3_) && (cdr_ != l4 || cdr_ != h4) ) { @@ -302,7 +302,7 @@ CDRDihedralConstraintMover::add_harmonic_cluster_constraint(core::pose::Pose & p using namespace core::scoring::constraints; if ( ab_info_->get_current_AntibodyNumberingScheme() != "AHO_Scheme" ) { - throw utility::excn::EXCN_Msg_Exception("CDRDihedralConstraintMover with cluster-based constraints " + throw CREATE_EXCEPTION(utility::excn::Exception, "CDRDihedralConstraintMover with cluster-based constraints " "only works with antibodies using the AHO_Scheme for numbering\n" "Please use a properly renumbered antibody or set the option set_use_cluster_csts(false) in the class"); } @@ -316,14 +316,13 @@ CDRDihedralConstraintMover::add_harmonic_cluster_constraint(core::pose::Pose & p pose.add_constraints(cst->get_all_constraints()); return true; } -catch(utility::excn::EXCN_Exception &excn){ - TR<< "Problem adding dihedral constraints for CDR cluster." < chain_sequence.size() ) throw _AE_invalid_cdr_region_(); + if( i > chain_sequence.size() ) throw CREATE_EXCEPTION(_AE_invalid_cdr_region_, ""); } fr1 = chain_sequence.substr(fr1_begin, fr1_end-fr1_begin); @@ -82,10 +82,10 @@ void AntibodyFramework::update_sequences(std::string chain_sequence) */ string cdr_sequence(string const & sequence, CDR_Bounds const &cdr) { - if( !cdr.defined() ) throw _AE_cdr_undefined_(); + if( !cdr.defined() ) throw CREATE_EXCEPTION(_AE_cdr_undefined_, ""); else { if( cdr.valid(sequence) ) return sequence.substr(cdr.begin, cdr.end-cdr.begin); - else throw _AE_invalid_cdr_region_(); + else throw CREATE_EXCEPTION(_AE_invalid_cdr_region_, ""); } } diff --git a/source/src/protocols/antibody/grafting/chothia_numberer.cc b/source/src/protocols/antibody/grafting/chothia_numberer.cc index 10c98049e9..b8144dff94 100644 --- a/source/src/protocols/antibody/grafting/chothia_numberer.cc +++ b/source/src/protocols/antibody/grafting/chothia_numberer.cc @@ -36,7 +36,7 @@ _AE_unexpected_region_length_ unexpected_region_length_error(string const& regio { std::stringstream s; s << "ERROR: Unxpected length of " << region << " [length=" << length << "] " << msg; - return _AE_unexpected_region_length_( s.str() ); + return CREATE_EXCEPTION(_AE_unexpected_region_length_, s.str() ); } @@ -44,7 +44,7 @@ _AE_unexpected_region_length_ numbering_region_lengths_error(string const& regio { std::stringstream s; s << "ERROR: Length of numbering array for region " << region << " does not match does not match length of same region in AntibodyChain/AntibodyFramework! [" << length1 << "!=" << length2 <<"]"; - return _AE_unexpected_region_length_( s.str() ); + return CREATE_EXCEPTION(_AE_unexpected_region_length_, s.str() ); } @@ -149,7 +149,7 @@ AntibodyChainNumbering::NumberingVector number_region(string const& name, uint l std::stringstream s; s << "ERROR: Unxpected length of " << name << " [length=" << length << "], length expected to be: " << possible_lengths << '!'; - throw _AE_unexpected_region_length_( s.str() ); + throw CREATE_EXCEPTION(_AE_unexpected_region_length_, s.str() ); } @@ -291,7 +291,7 @@ AntibodyChainNumbering Chothia_Numberer::number_light_chain(AntibodySequence con //"0,0A,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23", // Note: this is different from Python implementaion (it was adjusteed L1 on the fly, deleting the first residue) }); } else { - throw _AE_unexpected_region_length_("ERROR: Current code could not assign Chothia numbering of FR_L1 in the query sequence!"); + throw CREATE_EXCEPTION(_AE_unexpected_region_length_, "ERROR: Current code could not assign Chothia numbering of FR_L1 in the query sequence!"); } n.fr2 = number_region("light-fr2", f.fr2.size(), {"35,36,37,38,39,40,41,42,43,44,45,46,47,48,49"}); diff --git a/source/src/protocols/antibody/grafting/exception.hh b/source/src/protocols/antibody/grafting/exception.hh index 2b4f450ff1..a48ccfb531 100644 --- a/source/src/protocols/antibody/grafting/exception.hh +++ b/source/src/protocols/antibody/grafting/exception.hh @@ -23,19 +23,17 @@ namespace antibody { namespace grafting { -class Grafting_Base_Exception : public utility::excn::EXCN_Msg_Exception +class Grafting_Base_Exception : public utility::excn::Exception { public: - Grafting_Base_Exception() {}; - Grafting_Base_Exception(std::string const& msg ) : EXCN_Msg_Exception(msg) {}; + using utility::excn::Exception::Exception; }; class _AE_grafting_failed_ : public Grafting_Base_Exception { public: - _AE_grafting_failed_() {}; - _AE_grafting_failed_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; @@ -43,24 +41,21 @@ public: class _AE_cdr_detection_failed_ : public Grafting_Base_Exception { public: - _AE_cdr_detection_failed_() {}; - _AE_cdr_detection_failed_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; class _AE_cdr_undefined_ : public Grafting_Base_Exception { public: - _AE_cdr_undefined_() {}; - _AE_cdr_undefined_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; class _AE_invalid_cdr_region_ : public Grafting_Base_Exception { public: - _AE_invalid_cdr_region_() {}; - _AE_invalid_cdr_region_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; @@ -68,25 +63,20 @@ public: class _AE_numbering_failed_ : public Grafting_Base_Exception { public: - _AE_numbering_failed_() {}; - _AE_numbering_failed_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; class _AE_unexpected_region_length_ : public _AE_numbering_failed_ { public: - _AE_unexpected_region_length_() {}; - _AE_unexpected_region_length_(std::string const& msg ) : _AE_numbering_failed_(msg) {}; + using _AE_numbering_failed_::_AE_numbering_failed_; }; - - class _AE_scs_failed_ : public Grafting_Base_Exception { public: - _AE_scs_failed_() {}; - _AE_scs_failed_(std::string const& msg ) : Grafting_Base_Exception(msg) {}; + using Grafting_Base_Exception::Grafting_Base_Exception; }; diff --git a/source/src/protocols/antibody/grafting/grafter.cc b/source/src/protocols/antibody/grafting/grafter.cc index 7dd0bd8ff5..4afa491ffe 100644 --- a/source/src/protocols/antibody/grafting/grafter.cc +++ b/source/src/protocols/antibody/grafting/grafter.cc @@ -64,7 +64,7 @@ int find_chain(Pose const &pose, char pdb_chain_letter, string const &template_n } if( chain >= 0 ) return chain; - else throw _AE_grafting_failed_( string("Could not find chain: ") + pdb_chain_letter + " in template " + template_name ); + else throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could not find chain: ") + pdb_chain_letter + " in template " + template_name ); } @@ -206,7 +206,7 @@ core::pose::PoseOP construct_antibody(AntibodySequence const &A, SCS_ResultSet c /// @brief graft cdr-loops using best scs-results and write results into specified output_prefix core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet const &scs, string const & prefix, string const & suffix, string const & database, bool optimal_graft /* false */, bool optimize_cdrs /* false */) { - if ( !(scs.h1 and scs.h2 and scs.h3 and scs.l1 and scs.l2 and scs.l2 and scs.l3 and scs.frh and scs.frl and scs.orientation) ) throw _AE_grafting_failed_("SimpleGrafter::graft: not all nessesary SCS results is specified!"); + if ( !(scs.h1 and scs.h2 and scs.h3 and scs.l1 and scs.l2 and scs.l2 and scs.l3 and scs.frh and scs.frl and scs.orientation) ) throw CREATE_EXCEPTION(_AE_grafting_failed_, "SimpleGrafter::graft: not all nessesary SCS results is specified!"); PoseOP result = construct_antibody(A, scs, prefix, suffix, database); @@ -241,7 +241,7 @@ core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet cons string pdb_name = database + "/antibody_database/pdb" + g.pdb + "_chothia.pdb"; //These are FULL antibody structures... core::pose::PoseOP cdr = core::import_pose::pose_from_file(pdb_name, core::import_pose::PDB_file); - if( !g.cdr_numbering.size() ) throw _AE_grafting_failed_( string("Empty template:") + g.pdb +" supplied as cdr for region:" + g.name ); + if( !g.cdr_numbering.size() ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Empty template:") + g.pdb +" supplied as cdr for region:" + g.name ); PDB_N pdb_n_cdr_first( g.cdr_numbering.front() ); PDB_N pdb_n_cdr_last( g.cdr_numbering.back() ); @@ -249,8 +249,8 @@ core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet cons Size pose_n_cdr_first = cdr->pdb_info()->pdb2pose(g.chain, pdb_n_cdr_first.n, pdb_n_cdr_first.icode); Size pose_n_cdr_last = cdr->pdb_info()->pdb2pose(g.chain, pdb_n_cdr_last .n, pdb_n_cdr_last .icode); - if( !pose_n_cdr_first ) throw _AE_grafting_failed_( string("Could not find residue:") + g.cdr_numbering.front() + " in template:" + g.pdb + " region:"+ g.name); - if( !pose_n_cdr_last ) throw _AE_grafting_failed_( string("Could not find residue:") + g.cdr_numbering.back() + " in template:" + g.pdb + " region:"+ g.name); + if( !pose_n_cdr_first ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could not find residue:") + g.cdr_numbering.front() + " in template:" + g.pdb + " region:"+ g.name); + if( !pose_n_cdr_last ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could not find residue:") + g.cdr_numbering.back() + " in template:" + g.pdb + " region:"+ g.name); if (optimal_graft){ @@ -287,7 +287,7 @@ core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet cons pose_n_cdr_first -= overlap; pose_n_cdr_last += overlap; - if( pose_n_cdr_first < 1 or pose_n_cdr_last > cdr->total_residue() ) throw _AE_grafting_failed_( string("There is not enough overlap residue at:")+ g.pdb + " in template:" + g.pdb + " region:" + g.name); + if( pose_n_cdr_first < 1 or pose_n_cdr_last > cdr->total_residue() ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("There is not enough overlap residue at:")+ g.pdb + " in template:" + g.pdb + " region:" + g.name); //TR << "Deleting residues: " << pose_n_cdr_last+1 << ":" << cdr->total_residue() << " from cdr template... [template size: " << cdr->total_residue() << "]" << std::endl; if( cdr->total_residue() > pose_n_cdr_last ) cdr->delete_residue_range_slow(pose_n_cdr_last+1, cdr->total_residue()); @@ -299,14 +299,14 @@ core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet cons Size result_pose_cdr_first = result->pdb_info()->pdb2pose(g.chain, pdb_n_cdr_first.n, pdb_n_cdr_first.icode); Size result_pose_cdr_last = result->pdb_info()->pdb2pose(g.chain, pdb_n_cdr_last .n, pdb_n_cdr_last .icode); - if( !result_pose_cdr_first ) throw _AE_grafting_failed_( string("Could not find residue:") + g.cdr_numbering.front() + " in superimposed pdb. Region:" + g.name); - if( !result_pose_cdr_last ) throw _AE_grafting_failed_( string("Could not find residue:") + g.cdr_numbering.back() + " in superimposed pdb. Region:" + g.name); + if( !result_pose_cdr_first ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could not find residue:") + g.cdr_numbering.front() + " in superimposed pdb. Region:" + g.name); + if( !result_pose_cdr_last ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could not find residue:") + g.cdr_numbering.back() + " in superimposed pdb. Region:" + g.name); result_pose_cdr_first -= overlap; result_pose_cdr_last += overlap; - if( result_pose_cdr_first < 1 or result_pose_cdr_last > result->total_residue() ) throw _AE_grafting_failed_( string("There is not enough overlap residue in superimposed template! region:") + g.name); + if( result_pose_cdr_first < 1 or result_pose_cdr_last > result->total_residue() ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("There is not enough overlap residue in superimposed template! region:") + g.name); TR << "Grafting..." << std::endl; @@ -354,7 +354,7 @@ core::pose::PoseOP graft_cdr_loops(AntibodySequence const &A, SCS_ResultSet cons for (auto &h : H) { // check for matching lengths of cdr and cdr sequence // everything should be kosher since we're using the chothia definition throughout (AFAIK) - if ( h.cdr_seq.size() != h.cdr_end - h.cdr_start + 1 ) throw _AE_grafting_failed_( string("Could revert sequence to query after grafting cdr ") + h.cdr_name + ". Length mismatch between CDR in grafted model (" + utility::to_string(h.cdr_end - h.cdr_start + 1) + ") and query sequence (" + utility::to_string(h.cdr_seq.size()) + ")."); + if ( h.cdr_seq.size() != h.cdr_end - h.cdr_start + 1 ) throw CREATE_EXCEPTION(_AE_grafting_failed_, string("Could revert sequence to query after grafting cdr ") + h.cdr_name + ". Length mismatch between CDR in grafted model (" + utility::to_string(h.cdr_end - h.cdr_start + 1) + ") and query sequence (" + utility::to_string(h.cdr_seq.size()) + ")."); for(Size i = h.cdr_start; i < h.cdr_end + 1; ++i) { diff --git a/source/src/protocols/antibody/grafting/regex_based_cdr_detection.cc b/source/src/protocols/antibody/grafting/regex_based_cdr_detection.cc index 0a788930ab..856db2002a 100644 --- a/source/src/protocols/antibody/grafting/regex_based_cdr_detection.cc +++ b/source/src/protocols/antibody/grafting/regex_based_cdr_detection.cc @@ -104,7 +104,7 @@ void RegEx_based_CDR_Detector::detect_heavy_chain(AntibodySequence &A) } else { std::cerr << "H1 detection: failed" << std::endl; - throw _AE_cdr_detection_failed_("H1 detection: failed. Pattern:"+ H1_pattern + " query:" + heavy_chain_sequence); + throw CREATE_EXCEPTION(_AE_cdr_detection_failed_, "H1 detection: failed. Pattern:"+ H1_pattern + " query:" + heavy_chain_sequence); } } string heavy_second = ( heavy_chain_sequence.size() > 140 ) ? heavy_chain_sequence.substr(H1_end+33+15-1, 95+fr1_begin-1) : heavy_chain_sequence.substr(H1_end+33+15-1); @@ -125,7 +125,7 @@ void RegEx_based_CDR_Detector::detect_heavy_chain(AntibodySequence &A) } else { std::cerr << "H3 detection: failed" << std::endl; - throw _AE_cdr_detection_failed_("H3 detection: failed. Pattern:"+ H3_pattern + " query:" + heavy_chain_sequence); + throw CREATE_EXCEPTION(_AE_cdr_detection_failed_, "H3 detection: failed. Pattern:"+ H3_pattern + " query:" + heavy_chain_sequence); } } @@ -139,7 +139,7 @@ void RegEx_based_CDR_Detector::detect_heavy_chain(AntibodySequence &A) } else { std::cerr << "H2 detection: failed" << std::endl; - throw _AE_cdr_detection_failed_("H2 detection is based on the detection and position of H1 and H3!"); + throw CREATE_EXCEPTION(_AE_cdr_detection_failed_, "H2 detection is based on the detection and position of H1 and H3!"); } } @@ -181,7 +181,7 @@ void RegEx_based_CDR_Detector::detect_light_chain(AntibodySequence &A) } else { std::cerr << "L1 detected: false" << std::endl; - throw _AE_cdr_detection_failed_("L1 detection: failed. Pattern:" + L1_pattern + " query:" + light_chain_sequence); + throw CREATE_EXCEPTION(_AE_cdr_detection_failed_, "L1 detection: failed. Pattern:" + L1_pattern + " query:" + light_chain_sequence); } } @@ -205,7 +205,7 @@ void RegEx_based_CDR_Detector::detect_light_chain(AntibodySequence &A) } else { std::cerr << "L3 detected: false" << std::endl; - throw _AE_cdr_detection_failed_("L3 detection: failed. Pattern:"+ L3_pattern + " query:" + light_chain_sequence); + throw CREATE_EXCEPTION(_AE_cdr_detection_failed_, "L3 detection: failed. Pattern:"+ L3_pattern + " query:" + light_chain_sequence); } } diff --git a/source/src/protocols/antibody/grafting/scs_blast.cc b/source/src/protocols/antibody/grafting/scs_blast.cc index 725cf3041d..9e78f519d3 100644 --- a/source/src/protocols/antibody/grafting/scs_blast.cc +++ b/source/src/protocols/antibody/grafting/scs_blast.cc @@ -237,7 +237,7 @@ SCS_ResultVector parse_blastp_output(string const & file_name, string const & qu } else if ( fields.find("subject-acc.ver") != fields.end() ) { subject_header = "subject-acc.ver"; } else { - throw _AE_scs_failed_("Could not identify BLAST field (either subject id or subject acc.ver)."); + throw CREATE_EXCEPTION(_AE_scs_failed_, "Could not identify BLAST field (either subject id or subject acc.ver)."); } r->pdb = fields[subject_header].substr(3,4); // pdb2adf_chothia.pdb → 2adf diff --git a/source/src/protocols/antibody/grafting/scs_functor.cc b/source/src/protocols/antibody/grafting/scs_functor.cc index 88b126c03e..42d2f10607 100644 --- a/source/src/protocols/antibody/grafting/scs_functor.cc +++ b/source/src/protocols/antibody/grafting/scs_functor.cc @@ -66,7 +66,7 @@ void SCS_Comparator::apply(AntibodySequence const &antibody_sequence, SCS_Result // SCS_BlastResult const *aa = dynamic_cast< SCS_BlastResult const *>( a.get() ); // SCS_BlastResult const *bb = dynamic_cast< SCS_BlastResult const *>( b.get() ); // if( aa and bb ) return compare(*aa, *bb); - // else throw _AE_scs_failed_("SCS_BlastComparator::compare: Error! Could not cast SCS_Results to SCS_BlastResult!"); + // else throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastComparator::compare: Error! Could not cast SCS_Results to SCS_BlastResult!"); // }; std::sort(j.result.begin(), j.result.end(), [this, &antibody_sequence](SCS_ResultOP const &a, SCS_ResultOP const &b) { return compare(antibody_sequence, *a, *b); } ); @@ -79,7 +79,7 @@ bool SCS_BlastComparator::compare(AntibodySequence const &antibody_sequence, SCS SCS_BlastResult const *aa = dynamic_cast< SCS_BlastResult const *>( &a ); SCS_BlastResult const *bb = dynamic_cast< SCS_BlastResult const *>( &b ); if( aa and bb ) return compare(antibody_sequence, *aa, *bb); - else throw _AE_scs_failed_("SCS_BlastComparator::compare: Error! Could not cast SCS_Results to SCS_BlastResult!"); + else throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastComparator::compare: Error! Could not cast SCS_Results to SCS_BlastResult!"); } @@ -144,7 +144,7 @@ void SCS_BlastFilter_by_sequence_length::apply(AntibodySequence const &A, SCS_Re for(auto ®ion : h1_h2_h3_l1_l2_l3) { for(auto p = region.r.rbegin(); p != region.r.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); if( region.query_sequence.size() != (br->*region.result_sequence).size() ) { TR.Trace << CSI_Red() << "SCS_BlastFilter_by_sequence_length: Filtering " << br->pdb << ": " << region.query_sequence.size() << "!=" << (br->*region.result_sequence).size() << "..." << CSI_Reset() << std::endl; @@ -159,7 +159,7 @@ void SCS_BlastFilter_by_sequence_length::apply(AntibodySequence const &A, SCS_Re for(auto p = results->frh.rbegin(); p != results->frh.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); uint template_length = (br->pdb == "2x7l") ? 61 : 63; @@ -172,7 +172,7 @@ void SCS_BlastFilter_by_sequence_length::apply(AntibodySequence const &A, SCS_Re for(auto p = results->frl.rbegin(); p != results->frl.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); uint template_length = (br->pdb == "3h0t") ? 60 : 58; @@ -218,7 +218,7 @@ void SCS_BlastFilter_by_alignment_length::apply(AntibodySequence const &/*antibo for(auto ®ion : R) { for(auto p = region.r.rbegin(); p != region.r.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_alignment_length::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); //TR << "alignment_length: " << br->alignment_length << " " << region.v * (br->*region.sequence).size() << std::endl; @@ -270,7 +270,7 @@ void SCS_BlastFilter_by_template_resolution::apply(AntibodySequence const &/*ant for(auto ®ion : R) { // loop over all members of array of structs, R? for(auto p = region.r.rbegin(); p != region.r.rend(); ) { // for each region, h1-l3, loop over all alignments SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); // use iterator to "get" alignment result and cast from Result to BlastResult - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_template_resolution::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_template_resolution::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); //TR << "resolution: " << br->resolution << " " << region.v * (br->*region.sequence).size() << std::endl; @@ -285,7 +285,7 @@ void SCS_BlastFilter_by_template_resolution::apply(AntibodySequence const &/*ant // Filter heavy framework region by resolution for(auto p = results->frh.rbegin(); p != results->frh.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); if( br->resolution > get_resolution_cutoff() ) { TR.Trace << CSI_Red() << "SCS_BlastFilter_by_template_resolution: Filtering " << br->pdb << "..." << CSI_Reset() << std::endl; @@ -297,7 +297,7 @@ void SCS_BlastFilter_by_template_resolution::apply(AntibodySequence const &/*ant // Filter light framework region by resolution for(auto p = results->frl.rbegin(); p != results->frl.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); if( br->resolution > get_resolution_cutoff() ) { TR.Trace << CSI_Red() << "SCS_BlastFilter_by_template_resolution: Filtering " << br->pdb << "..," << CSI_Reset() << std::endl; @@ -309,7 +309,7 @@ void SCS_BlastFilter_by_template_resolution::apply(AntibodySequence const &/*ant // Filter orientation by resolution for(auto p = results->orientation.rbegin(); p != results->orientation.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); if( br->resolution > get_resolution_cutoff() ) { TR.Trace << CSI_Red() << "SCS_BlastFilter_by_template_resolution: Filtering " << br->pdb << "..," << CSI_Reset() << std::endl; @@ -424,7 +424,7 @@ void SCS_BlastFilter_by_sequence_identity::apply(AntibodySequence const& A, for(auto ®ion : h1_h2_h3_l1_l2_l3) { for(auto p = region.r.rbegin(); p != region.r.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); sid_ratio = sid_checker( region.query_sequence, br->*region.result_sequence ); if( sid_ratio > get_sid_cutoff_cdr() ) { @@ -453,7 +453,7 @@ void SCS_BlastFilter_by_sequence_identity::apply(AntibodySequence const& A, // Filter heavy framework region by sequence identity for(auto p = results->frh.rbegin(); p != results->frh.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identity::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); sid_ratio = sid_checker( query_frh, br->frh); if( sid_ratio > get_sid_cutoff_fr() ) { @@ -466,7 +466,7 @@ void SCS_BlastFilter_by_sequence_identity::apply(AntibodySequence const& A, // Filter light framework region by sequence identity for(auto p = results->frl.rbegin(); p != results->frl.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_sequence_identiy::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); sid_ratio = sid_checker( query_frl, br->frl); if( sid_ratio > get_sid_cutoff_fr() ) { @@ -530,7 +530,7 @@ void SCS_BlastFilter_by_outlier::apply(AntibodySequence const& /* A */, for(auto ®ion : frh_h1_h2_frl_l1_l2_l3) { for(auto p = region.r.rbegin(); p != region.r.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_outlier::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_outlier::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); // check if pdb is contained in outlier list... somewhat worrying that list doesn't contain all pdbs if( outlier_map.find(br->pdb) == outlier_map.end() ) { @@ -592,7 +592,7 @@ void SCS_BlastFilter_by_template_bfactor::apply(AntibodySequence const& /* A */, for(auto ®ion : h1_h2_h3_l1_l2_l3) { for(auto p = region.r.rbegin(); p != region.r.rend(); ) { SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_template_bfactor::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_template_bfactor::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); // check if pdb is contained in bfactor list... somewhat worrying that list doesn't contain all pdbs if( bfactor_map.find(br->pdb) == bfactor_map.end() ) { @@ -694,13 +694,13 @@ void SCS_BlastFilter_by_OCD::apply(AntibodySequence const& /* A */, auto p = r.begin()+j; //get best aligned model, then second best, then third best, then ... SCS_BlastResult const *top_br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !top_br ) throw _AE_scs_failed_("SCS_BlastFilter_by_OCD::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !top_br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_OCD::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); for ( core::Size i=j+1; i < r.size(); ++i ) { // loop over result vector, but update size each iteration as we delete things? auto p = r.begin()+i; SCS_BlastResult const *br = dynamic_cast< SCS_BlastResult const *>( p->get() ); - if( !br ) throw _AE_scs_failed_("SCS_BlastFilter_by_OCD::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); + if( !br ) throw CREATE_EXCEPTION(_AE_scs_failed_, "SCS_BlastFilter_by_OCD::apply: Error! Could not cast SCS_Results to SCS_BlastResult!"); if ( ocd_map.at(top_br->pdb).at(br->pdb) < get_ocd_cutoff() ) { TR.Trace << CSI_Red() << "SCS_BlastFilter_by_OCD: Filtering " << br->pdb << " with OCD: " << ocd_map.at(top_br->pdb).at(br->pdb) << CSI_Reset() << std::endl; diff --git a/source/src/protocols/antibody/grafting/util.cc b/source/src/protocols/antibody/grafting/util.cc index 88d1e6bd91..11ed56c2ed 100644 --- a/source/src/protocols/antibody/grafting/util.cc +++ b/source/src/protocols/antibody/grafting/util.cc @@ -98,7 +98,7 @@ parse_plain_text_with_columns( } else { if( utility::startswith(line, data_prefix) ) { - if( !legend.size() ) throw _AE_scs_failed_("File: " + file_name + " is missing legend!"); + if( !legend.size() ) throw CREATE_EXCEPTION(_AE_scs_failed_, "File: " + file_name + " is missing legend!"); else { //TR.Trace << "Got line:" << line << std::endl; @@ -114,7 +114,7 @@ parse_plain_text_with_columns( std::map fields; int i=0; for(auto e : parts) fields[ legend[i++] ] = e; result.push_back(fields); - } else throw _AE_scs_failed_("Number of fileds does not match legend!\nFile: "+file_name+"\nLine: "+line); + } else throw CREATE_EXCEPTION(_AE_scs_failed_, "Number of fileds does not match legend!\nFile: "+file_name+"\nLine: "+line); } } } diff --git a/source/src/protocols/antibody/snugdock/SnugDockProtocol.cc b/source/src/protocols/antibody/snugdock/SnugDockProtocol.cc index f26d422adc..df16d2b39f 100644 --- a/source/src/protocols/antibody/snugdock/SnugDockProtocol.cc +++ b/source/src/protocols/antibody/snugdock/SnugDockProtocol.cc @@ -212,8 +212,8 @@ void SnugDockProtocol::setup_loop_refinement_movers() { using core::scoring::ScoreFunctionOP; if ( ! antibody_info_ ) { - using utility::excn::EXCN_Msg_Exception; - throw EXCN_Msg_Exception( "A valid AntibodyInfo instance is required to setup " + get_name() + "'s centroid loop " + using utility::excn::Exception; + throw CREATE_EXCEPTION(Exception, "A valid AntibodyInfo instance is required to setup " + get_name() + "'s centroid loop " + "refinement movers." ); } diff --git a/source/src/protocols/antibody/util.cc b/source/src/protocols/antibody/util.cc index 611947b501..a5ffad58ad 100644 --- a/source/src/protocols/antibody/util.cc +++ b/source/src/protocols/antibody/util.cc @@ -292,7 +292,7 @@ Real cutpoint_separation(pose::Pose & pose_in, Size cutpoint) { Real global_loop_rmsd (const pose::Pose & pose_in, const pose::Pose & native_pose,loops::LoopsOP current_loop ) { if ( pose_in.size() != native_pose.size() ) { - throw utility::excn::EXCN_BadInput("The pose sequence length does not match that of native_pose"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "The pose sequence length does not match that of native_pose"); } using namespace scoring; @@ -320,7 +320,7 @@ void align_to_native( core::pose::Pose & pose, std::string pose_seq = pose.sequence(); std::string native_pose_seq = native_pose.sequence(); if ( pose_seq != native_pose_seq ) { - throw utility::excn::EXCN_BadInput(" the pose sequence does not match native_pose sequence "); + throw CREATE_EXCEPTION(utility::excn::BadInput, " the pose sequence does not match native_pose sequence "); } diff --git a/source/src/protocols/backrub/BackrubSidechainMover.cc b/source/src/protocols/backrub/BackrubSidechainMover.cc index 0c596fa0f6..8e0aeeabb5 100644 --- a/source/src/protocols/backrub/BackrubSidechainMover.cc +++ b/source/src/protocols/backrub/BackrubSidechainMover.cc @@ -141,7 +141,7 @@ BackrubSidechainMover::parse_my_tag( if ( data.has( "task_operations", t_o_key ) ) { new_task_factory->push_back( data.get_ptr< core::pack::task::operation::TaskOperation >( "task_operations", t_o_key ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + t_o_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + t_o_key + " not found in basic::datacache::DataMap."); } } diff --git a/source/src/protocols/canonical_sampling/HamiltonianExchange.cc b/source/src/protocols/canonical_sampling/HamiltonianExchange.cc index aed84c8548..b4e54b0516 100644 --- a/source/src/protocols/canonical_sampling/HamiltonianExchange.cc +++ b/source/src/protocols/canonical_sampling/HamiltonianExchange.cc @@ -175,7 +175,7 @@ HamiltonianExchange::parse_my_tag( Parent::parse_my_tag( tag, data, filters, movers, pose ); if ( !successfully_initialized_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Initialization of HamiltonianExchange Module failed! " ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Initialization of HamiltonianExchange Module failed! " ); } } diff --git a/source/src/protocols/canonical_sampling/MetropolisHastingsMover.cc b/source/src/protocols/canonical_sampling/MetropolisHastingsMover.cc index 74403fac38..78a068347e 100644 --- a/source/src/protocols/canonical_sampling/MetropolisHastingsMover.cc +++ b/source/src/protocols/canonical_sampling/MetropolisHastingsMover.cc @@ -491,13 +491,13 @@ MetropolisHastingsMover::parse_my_tag( auto mover_iter( movers.find( mover_name ) ); if ( mover_iter == movers.end() ) { tr.Error<< "Mover not found for XML tag:\n" << subtag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } mover = mover_iter->second; } else if ( subtag->getName() == "AddNew" ) { //generate new mover utility::vector0< utility::tag::TagCOP > sub_subtags = subtag->getTags(); if ( sub_subtags.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected a single subelement of the \"AddNew\" tag while parsing the MetropolisHastings mover" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected a single subelement of the \"AddNew\" tag while parsing the MetropolisHastings mover" ); } tag_containing_mover = sub_subtags[0]; protocols::moves::MoverFactory * mover_factory(protocols::moves::MoverFactory::get_instance()); @@ -506,11 +506,11 @@ MetropolisHastingsMover::parse_my_tag( // Error case protocols::moves::MoverFactory * mover_factory(protocols::moves::MoverFactory::get_instance()); if ( mover_factory->mover_creator_map().count( subtag->getName() ) ) { - throw utility::excn::EXCN_Msg_Exception( "The MetropolisHastings mover no longer accepts Mover subtags as direct descendents;" + throw CREATE_EXCEPTION(utility::excn::Exception, "The MetropolisHastings mover no longer accepts Mover subtags as direct descendents;" " you must use an intermediate tag named \"AddNew\" in which you may nest the new mover you wish to declare.\nError encountered" " while parsing MetropolisHasings mover when the Mover \"" + subtag->getName() + "\" was encountered." ); } else { - throw utility::excn::EXCN_Msg_Exception( "The MetropolisHasings mover expects subtags named either \"Add\" or \"AddNew\"" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "The MetropolisHasings mover expects subtags named either \"Add\" or \"AddNew\"" ); } } @@ -526,7 +526,7 @@ MetropolisHastingsMover::parse_my_tag( //it might also be a tempering module... if ( temp_controller ) { // it is a temperature controller if ( tempering_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "cannot define two TemperatureControllers" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "cannot define two TemperatureControllers" ); } set_tempering( temp_controller ); } else { //no just an plain old observer @@ -534,7 +534,7 @@ MetropolisHastingsMover::parse_my_tag( } } else { //its something different tr.Error << "Mover is not a ThermodynamicMover or ThermodynamicObserver for XML tag:\n" << tag_containing_mover << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } } } diff --git a/source/src/protocols/canonical_sampling/mc_convergence_checks/Heat_ConvergenceCheck.hh b/source/src/protocols/canonical_sampling/mc_convergence_checks/Heat_ConvergenceCheck.hh index 51a4cf336f..bd76da4842 100644 --- a/source/src/protocols/canonical_sampling/mc_convergence_checks/Heat_ConvergenceCheck.hh +++ b/source/src/protocols/canonical_sampling/mc_convergence_checks/Heat_ConvergenceCheck.hh @@ -38,12 +38,16 @@ namespace protocols { namespace canonical_sampling { namespace mc_convergence_checks { -class EXCN_Heat_Converged : public moves::EXCN_Converged {}; +class EXCN_Heat_Converged : public moves::EXCN_Converged +{ +public: + using moves::EXCN_Converged::EXCN_Converged; +}; class Heat_ConvergenceCheck : public moves::MonteCarloExceptionConverge { virtual bool operator() ( const core::pose::Pose&, moves::MonteCarlo const& mc, bool /*reject*/ ) { if ( mc.last_accept() >= mc.heat_after_cycles() - mc.check_frequency() ) { - throw canonical_sampling::mc_convergence_checks::EXCN_Heat_Converged(); + throw CREATE_EXCEPTION(canonical_sampling::mc_convergence_checks::EXCN_Heat_Converged, ""); } return true; } diff --git a/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.cc b/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.cc index ba34eb5af2..9afd27a5c2 100644 --- a/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.cc +++ b/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.cc @@ -111,7 +111,7 @@ void Pool_RMSD::fill_pool( std::string const& silent_file ) { io::silent::SilentFileData sfd( opts ); try { sfd.read_file( silent_file ); - } catch( utility::excn::EXCN_BadInput const& excn ) { + } catch( utility::excn::BadInput const& excn ) { excn.show( tr.Warning ); tr.Warning << "Pool_RMSD did not find any structures, will output n/a 10000 for converged_tag and converged_rmsd" << std::endl; return; @@ -274,7 +274,7 @@ bool Pool_ConvergenceCheck::operator() ( core::pose::Pose const & fit_pose, move //store in Job-Object: protocols::jd2::add_string_string_pair_to_current_job( "pool_converged_tag", best_decoy ); protocols::jd2::add_string_real_pair_to_current_job( "pool_converged_rmsd", best_rmsd ); - if ( best_rmsd <= threshold_ ) throw EXCN_Pool_Converged(); + if ( best_rmsd <= threshold_ ) throw CREATE_EXCEPTION(EXCN_Pool_Converged, ""); return best_rmsd >= threshold_; } diff --git a/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh b/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh index b8768d3041..c4e92edc4f 100644 --- a/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh +++ b/source/src/protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh @@ -49,7 +49,10 @@ namespace mc_convergence_checks { class EXCN_Pool_Converged : public moves::EXCN_Converged -{}; +{ +public: + EXCN_Pool_Converged(char const *file, int line, std::string const & m) : moves::EXCN_Converged(file, line, m) {} +}; class Pool_RMSD; diff --git a/source/src/protocols/canonical_sampling/mc_convergence_checks/util.cc b/source/src/protocols/canonical_sampling/mc_convergence_checks/util.cc index fae10d07f7..fb9ee465da 100644 --- a/source/src/protocols/canonical_sampling/mc_convergence_checks/util.cc +++ b/source/src/protocols/canonical_sampling/mc_convergence_checks/util.cc @@ -44,7 +44,7 @@ void setup_convergence_checks_from_cmdline( moves::MonteCarlo& mc ) { utility::sys_sleep( 1 ); testin.open( option[ OptionKeys::mc::known_structures ]() ); } while ( !testin.good() && trial-- > 0 ); - // if ( trial == 0 ) throw EXCN_BadInput( "can't open "+option[ OptionKeys::mc::known_structures ]() ); + // if ( trial == 0 ) throw CREATE_EXCEPTION(BadInput, "can't open "+option[ OptionKeys::mc::known_structures ]() ); /* okay file is now good, or will never be... */ Pool_RMSD_OP pool_ptr( new Pool_RMSD( option[ OptionKeys::mc::known_structures ]() diff --git a/source/src/protocols/comparative_modeling/IgnoreSubsetConstraintSet.cc b/source/src/protocols/comparative_modeling/IgnoreSubsetConstraintSet.cc index 0016524bd3..efb7e1373c 100644 --- a/source/src/protocols/comparative_modeling/IgnoreSubsetConstraintSet.cc +++ b/source/src/protocols/comparative_modeling/IgnoreSubsetConstraintSet.cc @@ -81,7 +81,7 @@ IgnoreSubsetConstraintSet::operator = ( ConstraintSet const & rhs ) if ( this != & rhs ) { IgnoreSubsetConstraintSet const * iscs_rhs = dynamic_cast< IgnoreSubsetConstraintSet const * > ( & rhs ); if ( ! iscs_rhs ) { - throw utility::excn::EXCN_Msg_Exception( "IgnoreSubsetConstraintSet handed a non IgnoreSubsetConstraintSet in operator =" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "IgnoreSubsetConstraintSet handed a non IgnoreSubsetConstraintSet in operator =" ); } ConstraintSet::operator = ( rhs ); ignore_list_ = iscs_rhs->ignore_list_; @@ -97,7 +97,7 @@ IgnoreSubsetConstraintSet::clone() const { void IgnoreSubsetConstraintSet::detached_copy( ConstraintSet const & src ) { IgnoreSubsetConstraintSet const * iscs_src = dynamic_cast< IgnoreSubsetConstraintSet const * > ( & src ); if ( ! iscs_src ) { - throw utility::excn::EXCN_Msg_Exception( "IgnoreSubsetConstraintSet handed a non IgnoreSubsetConstraintSet in detatched_copy" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "IgnoreSubsetConstraintSet handed a non IgnoreSubsetConstraintSet in detatched_copy" ); } deep_copy( src ); ignore_list_ = iscs_src->ignore_list_; diff --git a/source/src/protocols/comparative_modeling/LoopRelaxMover.cc b/source/src/protocols/comparative_modeling/LoopRelaxMover.cc index c9957a4d24..d0ae0c10ed 100644 --- a/source/src/protocols/comparative_modeling/LoopRelaxMover.cc +++ b/source/src/protocols/comparative_modeling/LoopRelaxMover.cc @@ -585,7 +585,7 @@ void LoopRelaxMover::apply( core::pose::Pose & pose ) { (remodel() == "perturb_kic_with_fragments"); if ( kic_with_fragments && frag_libs().empty() ) { - throw utility::excn::EXCN_BadInput(": No fragment libraries loaded."); + throw CREATE_EXCEPTION(utility::excn::BadInput, ": No fragment libraries loaded."); } Size sfxn_cycles = option[ OptionKeys::loops::perturb_outer_cycles ](); @@ -1169,7 +1169,7 @@ void LoopRelaxMover::apply( core::pose::Pose & pose ) { (refine() == "refine_kic_with_fragments"); if ( kic_with_fragments && frag_libs().empty() ) { - throw utility::excn::EXCN_BadInput(": No fragment libraries loaded."); + throw CREATE_EXCEPTION(utility::excn::BadInput, ": No fragment libraries loaded."); } Size sfxn_cycles = option[ OptionKeys::loops::refine_outer_cycles ](); diff --git a/source/src/protocols/constraint_generator/AddConstraints.cc b/source/src/protocols/constraint_generator/AddConstraints.cc index 62335a4030..be6b777163 100644 --- a/source/src/protocols/constraint_generator/AddConstraints.cc +++ b/source/src/protocols/constraint_generator/AddConstraints.cc @@ -70,7 +70,7 @@ AddConstraints::parse_my_tag( TR << "Added constraint generator " << new_cg->id() << "." << std::endl; //No need to add generator to data map } else { - throw utility::excn::EXCN_RosettaScriptsOption("ConstraintGenerator " + gen + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ConstraintGenerator " + gen + " not found in basic::datacache::DataMap."); } } } diff --git a/source/src/protocols/constraint_generator/AtomPairConstraintGenerator.cc b/source/src/protocols/constraint_generator/AtomPairConstraintGenerator.cc index 260adfbe1d..c2817c9c92 100644 --- a/source/src/protocols/constraint_generator/AtomPairConstraintGenerator.cc +++ b/source/src/protocols/constraint_generator/AtomPairConstraintGenerator.cc @@ -83,7 +83,7 @@ AtomPairConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::datacac if ( use_native ) { set_reference_pose( get_native_pose() ); if ( ! reference_pose_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'native' option for AtomPairConstraintGenerator specified, but no native pose is availible." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'native' option for AtomPairConstraintGenerator specified, but no native pose is availible." ); } } @@ -102,7 +102,7 @@ AtomPairConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::datacac set_unweighted_function( tag->getOption< bool >( "unweighted", unweighted_ ) ); if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "AtomPairConstraintGenerator requires a residue selector, but one is not set.\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "AtomPairConstraintGenerator requires a residue selector, but one is not set.\n" ); } } diff --git a/source/src/protocols/constraint_generator/ConstraintGenerator.hh b/source/src/protocols/constraint_generator/ConstraintGenerator.hh index 511fe0f015..c90a778bb4 100644 --- a/source/src/protocols/constraint_generator/ConstraintGenerator.hh +++ b/source/src/protocols/constraint_generator/ConstraintGenerator.hh @@ -30,7 +30,7 @@ // Basic/Utility headers #include -#include +#include #include #include diff --git a/source/src/protocols/constraint_generator/ConstraintGeneratorFactory.cc b/source/src/protocols/constraint_generator/ConstraintGeneratorFactory.cc index b01dd761f6..d1e3ba02e0 100644 --- a/source/src/protocols/constraint_generator/ConstraintGeneratorFactory.cc +++ b/source/src/protocols/constraint_generator/ConstraintGeneratorFactory.cc @@ -56,7 +56,7 @@ ConstraintGeneratorFactory::new_constraint_generator( { if ( ! has_type( constraint_generator_name ) ) { std::string err_msg = "No ConstraintGeneratorCreator with the name '" + constraint_generator_name + "' has been registered with the ConstraintGeneratorFactory"; - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } auto iter = creator_map_.find( constraint_generator_name ); ConstraintGeneratorOP new_constraint_generator = iter->second->create_constraint_generator(); @@ -74,8 +74,8 @@ ConstraintGeneratorFactory::define_constraint_generator_xml_schema_group( utilit constraint_generator_xml_schema_group_name(), & complex_type_name_for_constraint_generator, xsd ); - } catch( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for Constraints from ConstraintFactory; offending class" + } catch( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for Constraints from ConstraintFactory; offending class" " must call protocols::constraint_generator::complex_type_name_for_constraint when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/constraint_generator/CoordinateConstraintGenerator.cc b/source/src/protocols/constraint_generator/CoordinateConstraintGenerator.cc index 229287e651..2d742a0eb0 100644 --- a/source/src/protocols/constraint_generator/CoordinateConstraintGenerator.cc +++ b/source/src/protocols/constraint_generator/CoordinateConstraintGenerator.cc @@ -84,7 +84,7 @@ CoordinateConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::datac if ( use_native ) { set_reference_pose( get_native_pose() ); if ( ! refpose_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'native' option for CoordinateConstraintGenerator specified, but no native pose is availible." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'native' option for CoordinateConstraintGenerator specified, but no native pose is availible." ); } } @@ -101,7 +101,7 @@ CoordinateConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::datac if ( selector ) set_residue_selector( selector ); if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "CoordinateConstraintGenerator::parse_tag(): Error obtaining ResidueSelector from tag\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CoordinateConstraintGenerator::parse_tag(): Error obtaining ResidueSelector from tag\n" ); } } diff --git a/source/src/protocols/constraint_generator/HydrogenBondConstraintGenerator.cc b/source/src/protocols/constraint_generator/HydrogenBondConstraintGenerator.cc index 02024b001c..953c72457f 100644 --- a/source/src/protocols/constraint_generator/HydrogenBondConstraintGenerator.cc +++ b/source/src/protocols/constraint_generator/HydrogenBondConstraintGenerator.cc @@ -94,7 +94,7 @@ HydrogenBondConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::dat if ( !selector1_name.empty() ) { core::select::residue_selector::ResidueSelectorCOP selector = core::select::residue_selector::get_residue_selector( selector1_name, data ); if ( !selector ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'residue_selector1' residue selector was not found in the data map!\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'residue_selector1' residue selector was not found in the data map!\n" ); } set_residue_selector1( selector ); } @@ -103,7 +103,7 @@ HydrogenBondConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::dat if ( !selector2_name.empty() ) { core::select::residue_selector::ResidueSelectorCOP selector = core::select::residue_selector::get_residue_selector( selector2_name, data ); if ( !selector ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'residue_selector2' residue selector was not found in the data map!\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'residue_selector2' residue selector was not found in the data map!\n" ); } set_residue_selector2( selector ); } @@ -252,11 +252,11 @@ core::scoring::constraints::ConstraintCOPs HydrogenBondConstraintGenerator::apply( core::pose::Pose const & pose ) const { if ( !selector1_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "\"residue_selector1\" must be specified to HydrogenBondConstraintGenerator!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "\"residue_selector1\" must be specified to HydrogenBondConstraintGenerator!" ); } if ( !selector2_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "\"residue_selector2\" must be specified to HydrogenBondConstraintGenerator!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "\"residue_selector2\" must be specified to HydrogenBondConstraintGenerator!" ); } debug_assert( selector1_ ); diff --git a/source/src/protocols/constraint_generator/MetalContactsConstraintGenerator.cc b/source/src/protocols/constraint_generator/MetalContactsConstraintGenerator.cc index 98d744ba6e..3655f9c609 100644 --- a/source/src/protocols/constraint_generator/MetalContactsConstraintGenerator.cc +++ b/source/src/protocols/constraint_generator/MetalContactsConstraintGenerator.cc @@ -897,7 +897,7 @@ MetalContactsConstraintGenerator::get_contact_resnums( core::pose::Pose const & if ( num > pose.total_residue() || num == 0 ) { std::stringstream err_msg; err_msg << "Residue " << num << " not found in pose!\n"; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } } diff --git a/source/src/protocols/constraint_generator/RemoveConstraints.cc b/source/src/protocols/constraint_generator/RemoveConstraints.cc index 81d7dcd51e..026307426b 100644 --- a/source/src/protocols/constraint_generator/RemoveConstraints.cc +++ b/source/src/protocols/constraint_generator/RemoveConstraints.cc @@ -68,7 +68,7 @@ RemoveConstraints::parse_my_tag( if ( generators.empty() ) { std::stringstream msg; msg << "RemoveConstraints: You must specify 'constraint_generators' -- a comma-separated list of names of constraint generators defined in an AddConstraints mover." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } @@ -105,7 +105,7 @@ RemoveConstraints::apply( core::pose::Pose & pose ) if ( ! pose.remove_constraints( csts, false ) ) { if ( ! pose.remove_constraints( csts, true ) ) { if ( exception_on_failure_ ) { - throw EXCN_RemoveCstsFailed(); + throw CREATE_EXCEPTION(EXCN_RemoveCstsFailed, ""); } } } @@ -168,5 +168,3 @@ void RemoveConstraintsCreator::provide_xml_schema( utility::tag::XMLSchemaDefini } //protocols } //constraint_generator - - diff --git a/source/src/protocols/constraint_generator/RemoveConstraints.hh b/source/src/protocols/constraint_generator/RemoveConstraints.hh index 6d3f5c77a4..495ac97128 100644 --- a/source/src/protocols/constraint_generator/RemoveConstraints.hh +++ b/source/src/protocols/constraint_generator/RemoveConstraints.hh @@ -27,7 +27,7 @@ // Basic/Utility headers #include -#include +#include namespace protocols { namespace constraint_generator { @@ -88,12 +88,13 @@ private: }; -class EXCN_RemoveCstsFailed : public utility::excn::EXCN_Base { +class EXCN_RemoveCstsFailed : public utility::excn::Exception { public: - EXCN_RemoveCstsFailed(): - utility::excn::EXCN_Base() - {} - void show( std::ostream & os ) const override { os << "Remodel constraints somehow got lost along the way" << std::endl; } + EXCN_RemoveCstsFailed(char const *file, int line, std::string const &m): + utility::excn::Exception(file, line, "Remodel constraints somehow got lost along the way\n") + { + add_msg(m); + } }; } //protocols diff --git a/source/src/protocols/constraint_generator/ResidueTypeConstraintGenerator.cc b/source/src/protocols/constraint_generator/ResidueTypeConstraintGenerator.cc index 210c4cec5c..fdf3bff38a 100644 --- a/source/src/protocols/constraint_generator/ResidueTypeConstraintGenerator.cc +++ b/source/src/protocols/constraint_generator/ResidueTypeConstraintGenerator.cc @@ -78,7 +78,7 @@ ResidueTypeConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic::data if ( use_native ) { set_reference_pose( get_native_pose() ); if ( ! ref_pose_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'native' option for ResidueTypeConstraintGenerator specified, but no native pose is availible." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'native' option for ResidueTypeConstraintGenerator specified, but no native pose is availible." ); } //Any other source of reference poses? } diff --git a/source/src/protocols/constraint_generator/util.cc b/source/src/protocols/constraint_generator/util.cc index 0af528a147..22f4691de3 100644 --- a/source/src/protocols/constraint_generator/util.cc +++ b/source/src/protocols/constraint_generator/util.cc @@ -128,7 +128,7 @@ parse_constraint_generators( utility::tag::TagCOP tag, basic::datacache::DataMap std::stringstream msg; msg << "RemoveConstraints: Could not find a constraint generator named " << generator_str << " in the datamap. Make sure it is defined in an AddConstraints mover before RemoveConstraints is defined." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } cgs.push_back( new_cg ); } diff --git a/source/src/protocols/constraints_additional/MaxSeqSepConstraintSet.cc b/source/src/protocols/constraints_additional/MaxSeqSepConstraintSet.cc index 2689341025..18e5755771 100644 --- a/source/src/protocols/constraints_additional/MaxSeqSepConstraintSet.cc +++ b/source/src/protocols/constraints_additional/MaxSeqSepConstraintSet.cc @@ -108,7 +108,7 @@ MaxSeqSepConstraintSet::operator = ( ConstraintSet const & rhs ) if ( this != &rhs ) { MaxSeqSepConstraintSet const * msscs_rhs = dynamic_cast< MaxSeqSepConstraintSet const * > ( & rhs ); if ( ! msscs_rhs ) { - throw utility::excn::EXCN_Msg_Exception( "MaxSeqSepConstraintSet handed a non MaxSeqSepConstraintSet in operator =" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "MaxSeqSepConstraintSet handed a non MaxSeqSepConstraintSet in operator =" ); } ConstraintSet::operator = ( rhs ); @@ -134,7 +134,7 @@ MaxSeqSepConstraintSet::clone() const { void MaxSeqSepConstraintSet::detached_copy( ConstraintSet const & src ) { MaxSeqSepConstraintSet const * msscs_src = dynamic_cast< MaxSeqSepConstraintSet const * > ( & src ); if ( ! msscs_src ) { - throw utility::excn::EXCN_Msg_Exception( "MaxSeqSepConstraintSet handed a non MaxSeqSepConstraintSet in detatched_copy" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "MaxSeqSepConstraintSet handed a non MaxSeqSepConstraintSet in detatched_copy" ); } deep_copy( src ); max_seq_sep_ = msscs_src->max_seq_sep_; diff --git a/source/src/protocols/cyclic_peptide/TryDisulfPermutations.cc b/source/src/protocols/cyclic_peptide/TryDisulfPermutations.cc index b977a79d91..e08e530592 100644 --- a/source/src/protocols/cyclic_peptide/TryDisulfPermutations.cc +++ b/source/src/protocols/cyclic_peptide/TryDisulfPermutations.cc @@ -224,7 +224,7 @@ TryDisulfPermutations::parse_my_tag( ) { if ( tag->getName() != "TryDisulfPermutations" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible -- the tag name does not match the mover name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible -- the tag name does not match the mover name."); } if ( TR.visible() ) TR << "Parsing options for TryDisulfPermutations (\"" << tag->getOption("name" ,"") << "\") mover." << std::endl; @@ -248,9 +248,9 @@ TryDisulfPermutations::parse_my_tag( std::string const selector_name ( tag->getOption< std::string >( "selector" ) ); try { set_selector( datamap.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from ReadResfile::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } if ( TR.visible() ) TR << "Added ResidueSelector \"" << selector_name << "\"." << std::endl; } diff --git a/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication.cc b/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication.cc index b12aa526f3..4f196504d7 100644 --- a/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication.cc +++ b/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication.cc @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication_MPI.cc b/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication_MPI.cc index a1a5107a12..cc64b73017 100644 --- a/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication_MPI.cc +++ b/source/src/protocols/cyclic_peptide_predict/SimpleCycpepPredictApplication_MPI.cc @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -1648,7 +1648,7 @@ SimpleCycpepPredictApplication_MPI::slave_carry_out_njobs( predict_app->run(); slave_job_count_ += njobs_from_above; - } catch ( utility::excn::EXCN_Base &excn ) { + } catch ( utility::excn::Exception &excn ) { TR.Error << "Exception in SimpleCycpepPredictApplication caught:" << std::endl; excn.show( TR.Error ); TR.Error << "\nRecovering from error and continuing to next job." << std::endl; @@ -1730,7 +1730,7 @@ SimpleCycpepPredictApplication_MPI::slave_carry_out_njobs_in_thread( std::lock_guard< std::mutex > lock( joblist_mutex_ ); //Lock the mutex to access slave_job_count_. slave_job_count_ += 1; } //Unlock here - } catch ( utility::excn::EXCN_Base &excn ) { + } catch ( utility::excn::Exception &excn ) { TR.Error << "Exception in SimpleCycpepPredictApplication caught:" << std::endl; excn.show( TR.Error ); TR.Error << "\nRecovering from error and continuing to next job." << std::endl; diff --git a/source/src/protocols/denovo_design/architects/BetaSheetArchitect.cc b/source/src/protocols/denovo_design/architects/BetaSheetArchitect.cc index c39ddc6194..d602a05b2f 100644 --- a/source/src/protocols/denovo_design/architects/BetaSheetArchitect.cc +++ b/source/src/protocols/denovo_design/architects/BetaSheetArchitect.cc @@ -436,7 +436,7 @@ BetaSheetArchitect::modify_and_add_permutation( components::StructureData const if ( (*s)->size() != total_size ) { std::stringstream msg; msg << "Sheet from DB with length " << (*s)->size() << " and lengths=" << retrieve_lengths( perm ) << " does not match SD: " << perm << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } // add template pose for all strands @@ -625,7 +625,7 @@ BetaSheetArchitect::check_permutation( components::StructureData const & perm_no msg << "Returning false: strand " << strand->id() << ": segment " << segment.pose_to_segment( resid ) << ": pose " << resid << std::endl; - throw EXCN_PreFilterFailed( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PreFilterFailed, msg.str() ); } } @@ -637,7 +637,7 @@ BetaSheetArchitect::check_permutation( components::StructureData const & perm_no std::stringstream msg; msg << "No sheets were found in the database for lengths=" << lengths_t << " orientations=" << orientations_t << " shifts=" << shifts_t << std::endl; - throw EXCN_PreFilterFailed( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PreFilterFailed, msg.str() ); } TR.Debug << "Passing check_permutation" << std::endl; } diff --git a/source/src/protocols/denovo_design/architects/BetaSheetArchitect.hh b/source/src/protocols/denovo_design/architects/BetaSheetArchitect.hh index a7b4bdb800..6c9055e8b8 100644 --- a/source/src/protocols/denovo_design/architects/BetaSheetArchitect.hh +++ b/source/src/protocols/denovo_design/architects/BetaSheetArchitect.hh @@ -29,7 +29,7 @@ #include // Utility headers -#include +#include #include #include @@ -161,17 +161,9 @@ private: bool updated_; }; -class EXCN_PreFilterFailed : public utility::excn::EXCN_Base { +class EXCN_PreFilterFailed : public utility::excn::Exception { public: - EXCN_PreFilterFailed( std::string const & msg ) : - utility::excn::EXCN_Base(), msg_( msg ) - {} - - virtual void - show( std::ostream & os ) const { os << msg_ << std::endl; } - -private: - std::string const msg_; + using utility::excn::Exception::Exception; }; } //protocols @@ -179,4 +171,3 @@ private: } //architects #endif //INCLUDED_protocols_denovo_design_architects_BetaSheetArchitect_hh - diff --git a/source/src/protocols/denovo_design/architects/BlueprintArchitect.cc b/source/src/protocols/denovo_design/architects/BlueprintArchitect.cc index 43b240efb6..bc3c7cf456 100644 --- a/source/src/protocols/denovo_design/architects/BlueprintArchitect.cc +++ b/source/src/protocols/denovo_design/architects/BlueprintArchitect.cc @@ -63,7 +63,7 @@ BlueprintArchitect::parse_tag( utility::tag::TagCOP tag, basic::datacache::DataM std::stringstream msg; msg << "BlueprintArchitect: No blueprint file specified! " << "You must specify a blueprint file using the \"blueprint\" option" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } protocols::parser::BluePrint bp( bp_file ); set_blueprint( bp ); diff --git a/source/src/protocols/denovo_design/architects/CompoundArchitect.cc b/source/src/protocols/denovo_design/architects/CompoundArchitect.cc index c112280a8f..e9373f5991 100644 --- a/source/src/protocols/denovo_design/architects/CompoundArchitect.cc +++ b/source/src/protocols/denovo_design/architects/CompoundArchitect.cc @@ -162,7 +162,7 @@ CompoundArchitect::parse_tag( utility::tag::TagCOP tag, basic::datacache::DataMa msg << type() << "::parse_tag(): The provided subtag name (" << (*t)->getName() << ") is not valid. Valid subtag names for " << type() << " are: " << "Architects, Connections, Pairing." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } } @@ -268,7 +268,7 @@ CompoundArchitect::parse_connection_tag( utility::tag::TagCOP tag, basic::dataca } else { std::stringstream msg; msg << "Bad connection architect type in tag: " << *tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } architect->parse_my_tag( tag, data ); if ( ! architect->id().empty() ) connection::store_connection_architect( architect, data ); diff --git a/source/src/protocols/denovo_design/architects/DeNovoArchitectFactory.cc b/source/src/protocols/denovo_design/architects/DeNovoArchitectFactory.cc index 9fa7f5f85a..13c38ecec2 100644 --- a/source/src/protocols/denovo_design/architects/DeNovoArchitectFactory.cc +++ b/source/src/protocols/denovo_design/architects/DeNovoArchitectFactory.cc @@ -122,8 +122,8 @@ DeNovoArchitectFactory::define_architect_group( utility::tag::XMLSchemaDefinitio architect_group_name(), & DeNovoArchitectFactory::complex_type_name_for_architect, xsd ); - } catch( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for Architects from DeNovoArchitectFactory; offending class" + } catch( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for Architects from DeNovoArchitectFactory; offending class" " must call protocols::denovo_design::architects::complex_type_name_for_architect when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/denovo_design/components/PoseFolder.hh b/source/src/protocols/denovo_design/components/PoseFolder.hh index 178ad620e2..04aa8252c0 100644 --- a/source/src/protocols/denovo_design/components/PoseFolder.hh +++ b/source/src/protocols/denovo_design/components/PoseFolder.hh @@ -29,7 +29,7 @@ // Basic/Utility headers #include -#include +#include #include #include @@ -38,17 +38,9 @@ namespace denovo_design { namespace components { /// @brief Exception thrown by PoseFolder::apply to indicate folding was not successful -class EXCN_Fold : public utility::excn::EXCN_Base { +class EXCN_Fold : public utility::excn::Exception { public: - EXCN_Fold( std::string const & msg ): - EXCN_Base(), msg_( msg ) {} - - virtual void - show( std::ostream & os ) const { os << msg_; } - - std::string msg_; -private: - EXCN_Fold(); + using utility::excn::Exception::Exception; }; /// @brief Given a pose with all residues, and a StructureData object, diff --git a/source/src/protocols/denovo_design/components/RemodelLoopMoverPoseFolder.cc b/source/src/protocols/denovo_design/components/RemodelLoopMoverPoseFolder.cc index f8101cd4d9..2a3a577ea3 100644 --- a/source/src/protocols/denovo_design/components/RemodelLoopMoverPoseFolder.cc +++ b/source/src/protocols/denovo_design/components/RemodelLoopMoverPoseFolder.cc @@ -88,7 +88,7 @@ RemodelLoopMoverPoseFolder::apply( components::StructureData sd = StructureDataFactory::get_instance()->get_from_pose( pose ); protocols::moves::MoverOP loop_mover = create_remodel_loop_mover( pose, sd, movable, loops ); if ( !loop_mover ) { - throw EXCN_Fold( type() + "::apply(): mover to remodel loops could not be constructed. Fail." ); + throw CREATE_EXCEPTION(EXCN_Fold, type() + "::apply(): mover to remodel loops could not be constructed. Fail." ); } // run remodel loop mover @@ -97,7 +97,7 @@ RemodelLoopMoverPoseFolder::apply( // check status if ( loop_mover->get_last_move_status() != protocols::moves::MS_SUCCESS ) { - throw EXCN_Fold( type() + "::apply(): RemodelLoopMover failed" ); + throw CREATE_EXCEPTION(EXCN_Fold, type() + "::apply(): RemodelLoopMover failed" ); } // save modified SD diff --git a/source/src/protocols/denovo_design/components/Segment.cc b/source/src/protocols/denovo_design/components/Segment.cc index 7840f6aaf4..95c71e9538 100644 --- a/source/src/protocols/denovo_design/components/Segment.cc +++ b/source/src/protocols/denovo_design/components/Segment.cc @@ -259,17 +259,17 @@ Segment::parse_tag( utility::tag::TagCOP tag ) if ( !tag->hasOption( "start" ) ) { TR << "start must be specified as an option to ResidueRange xml tag!!" << *tag << std::endl; debug_assert( tag->hasOption( "start" ) ); - throw utility::excn::EXCN_RosettaScriptsOption( "start must be specified as an option to ResidueRange xml tag!!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "start must be specified as an option to ResidueRange xml tag!!" ); } if ( !tag->hasOption( "ss" ) ) { TR << "ss must be specified as an option to ResidueRange xml tag!!" << *tag << std::endl; debug_assert( tag->hasOption( "ss" ) ); - throw utility::excn::EXCN_RosettaScriptsOption( "ss must be specified as an option to ResidueRange xml tag!!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ss must be specified as an option to ResidueRange xml tag!!" ); } if ( !tag->hasOption( "abego" ) ) { TR << "abego must be specified as an option to ResidueRange xml tag!!" << *tag << std::endl; debug_assert( tag->hasOption( "abego" ) ); - throw utility::excn::EXCN_RosettaScriptsOption( "abego must be specified as an option to ResidueRange xml tag!!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "abego must be specified as an option to ResidueRange xml tag!!" ); } // sort out termini first @@ -289,7 +289,7 @@ Segment::parse_tag( utility::tag::TagCOP tag ) << abego_.size() << ") vs secondary structure length (" << length() << ") when parsing " << *tag << std::endl; msg << "The abego length must match the secondary strcuture length." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } set_safe( tag->getOption< core::Size >( "safe", saferes_ ) ); @@ -298,7 +298,7 @@ Segment::parse_tag( utility::tag::TagCOP tag ) msg << "Segment::parse_tag(): Safe res (" << saferes_ << ") is larger than the length of the element (" << elem_length() << ") encountered while parsing " << *tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } set_cutpoint( tag->getOption< core::Size >( "cutpoint", cutpoint_ ) ); @@ -307,7 +307,7 @@ Segment::parse_tag( utility::tag::TagCOP tag ) msg << "Segment::parse_tag(): Cutpoint res (" << saferes_ << ") is larger than the length of the element (" << elem_length() << ") encountered while parsing " << *tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } set_lower_segment( tag->getOption< std::string >( "lower_segment", "" ) ); diff --git a/source/src/protocols/denovo_design/components/SegmentPairing.cc b/source/src/protocols/denovo_design/components/SegmentPairing.cc index 19608d840d..9a782cfa6d 100644 --- a/source/src/protocols/denovo_design/components/SegmentPairing.cc +++ b/source/src/protocols/denovo_design/components/SegmentPairing.cc @@ -329,7 +329,7 @@ HelixPairing::parse_tag( utility::tag::Tag const & tag ) std::stringstream msg; msg << "You must specify at least two segments to HelixPairing. Specified segments = " << segments() << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } parallel_ = tag.getOption< bool >( "parallel" ); } diff --git a/source/src/protocols/denovo_design/components/StructureData.cc b/source/src/protocols/denovo_design/components/StructureData.cc index f91deabcda..15ad6893df 100644 --- a/source/src/protocols/denovo_design/components/StructureData.cc +++ b/source/src/protocols/denovo_design/components/StructureData.cc @@ -158,7 +158,7 @@ StructureData::parse_tag( utility::tag::TagCOP tag ) << ") does not match length computed from Segment lengths (" << pose_length_ << ")" << std::endl; msg << *this << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } core::Size const elem_length_check = tag->getOption< core::Size >( "length", 0 ); @@ -168,7 +168,7 @@ StructureData::parse_tag( utility::tag::TagCOP tag ) << ") does not match length computed from Segment lengths (" << length_ << ")" << std::endl; msg << *this << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } @@ -222,7 +222,7 @@ StructureData::parse_subtag( utility::tag::TagCOP tag ) add_pairing( *newpairing ); } else { tag->write( TR.Error ); - throw utility::excn::EXCN_RosettaScriptsOption( "Unknown tag in permutation: " + tag->getName() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unknown tag in permutation: " + tag->getName() ); } } @@ -511,7 +511,7 @@ StructureData::substitute_variables( std::istream & input ) const while ( next_sub != std::string::npos ) { core::Size second_sub = line.find("%%", next_sub+1); if ( second_sub == std::string::npos ) { - throw utility::excn::EXCN_BadInput( "Malformed line in constraint file : " + line ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Malformed line in constraint file : " + line ); } debug_assert( second_sub - next_sub >= 5 ); std::string const variable = line.substr( next_sub+2, second_sub-next_sub-2 ); @@ -934,7 +934,7 @@ StructureData::pose_residue( std::string const & segment_name, core::Size const std::stringstream err; err << "Can't resolve the segment name " << segment_name << "into a valid segment in the permutation. Valid segments are: " << segments_ << std::endl; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } return r->second.segment_to_pose(local_res); } @@ -1016,7 +1016,7 @@ StructureData::add_segment( SegmentMap::iterator s = segments_.find( id_val ); if ( s == segments_.end() ) { if ( !segments_.insert( std::make_pair( id_val, resis ) ).second ) { - throw utility::excn::EXCN_Msg_Exception( "failed to insert segment " + id_val ); + throw CREATE_EXCEPTION(utility::excn::Exception, "failed to insert segment " + id_val ); } segment_order_.insert( insert_pos, id_val ); debug_assert( segments_.size() == segment_order_.size() ); @@ -1092,7 +1092,7 @@ StructureData::set_alias( ss << "Segment named " << segment_name << " does not exist in the permutation as an alias or residue segment. Perm=" << *this << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } changed(); } @@ -1597,13 +1597,13 @@ StructureData::check_pose( core::pose::Pose const & pose ) const msg << id() << ": pose length does not match StructureData. Pose length = " << total_residue << " SD length = " << pose_length() << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } if ( total_residue != ss().size() ) { std::stringstream msg; msg << id() << ": pose length does not match StructureData secstruct length. Pose length = " << total_residue << " SS length = " << ss().size() << " SD: " << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } @@ -1633,7 +1633,7 @@ StructureData::segment_nonconst( std::string const & id_val ) std::stringstream err; err << id() << ": Segment not found in residue lists! "; err << "Search term is: " << id_val << "; Segment map is: " << segments_ << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return it->second; } @@ -1650,7 +1650,7 @@ StructureData::segment( std::string const & id_val ) const std::stringstream err; err << id() << ": Segment not found in residue lists! "; err << "Search term is: " << id_val << "; Segment map is: " << segments_ << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return it->second; } @@ -1753,7 +1753,7 @@ StructureData::get_data_int( std::string const & data_name ) const for ( it = data_int_.begin(); it != data_int_.end(); ++it ) { err << it->first << " : " << it->second << std::endl; } - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return it->second; } @@ -1776,7 +1776,7 @@ StructureData::get_data_real( std::string const & data_name ) const for ( it = data_real_.begin(); it != data_real_.end(); ++it ) { err << it->first << " : " << it->second << std::endl; } - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return it->second; } @@ -1799,7 +1799,7 @@ StructureData::get_data_str( std::string const & data_name ) const for ( it = data_str_.begin(); it != data_str_.end(); ++it ) { err << it->first << " : " << it->second << std::endl; } - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return it->second; } @@ -1876,7 +1876,7 @@ StructureData::segment_name( core::Size const res ) const } std::stringstream err; err << " Residue " << res << " was not found in the residues map!" << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } /// @brief updates numbering based on the saved order of Segment objects @@ -1908,7 +1908,7 @@ StructureData::update_numbering() err << id() << ": StructureData pose size doesn't match secondary structure string size. this is probably an internal bug that needs to be fixed." << std::endl; err << *this << std::endl; err << "new ss= " << new_ss << std::endl; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } debug_assert( new_ss.size() == pose_length_ ); ss_ = new_ss; @@ -2043,7 +2043,7 @@ StructureData::check_residues() const if ( r->second.upper() > pose_length() ) { msg << r->second << " has a upper terminal residue (" << r->second.upper() << ") that is large than the pose length." << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } for ( core::Size i=r->second.lower(); i<=r->second.upper(); ++i ) { @@ -2051,21 +2051,21 @@ StructureData::check_residues() const accounted_for[i] = true; } else { msg << r->second << " overlaps with something else at position " << i << std::endl << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } if ( r->second.lower_segment() != "" ) { SegmentMap::const_iterator r2 = segments_.find( r->second.lower_segment() ); if ( r2 == segments_.end() ) { msg << "Lower segment of " << r->second << " does not exist. SD=" << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } if ( r->second.upper_segment() != "" ) { SegmentMap::const_iterator r2 = segments_.find( r->second.upper_segment() ); if ( r2 == segments_.end() ) { msg << "Upper segment of " << r->second << " does not exist. SD=" << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } @@ -2073,7 +2073,7 @@ StructureData::check_residues() const for ( core::Size i=1; i<=pose_length(); ++i ) { if ( !accounted_for[i] ) { msg << " Residue " << i << " is not accounted for by the permutation. " << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } } @@ -2087,7 +2087,7 @@ StructureData::check_improper_termini( core::pose::Pose const & pose ) const if ( pose.residue(i).is_terminus() ) { std::stringstream msg; msg << " Residue " << i << " has a terminal variant but is inside segment " << r->second << "." << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } } @@ -2169,7 +2169,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << segment( *s ).cutpoint() << ", but no cutpoint was found in the Pose. Pose cutpoints: " << cutpoints << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } // 2. Lower termini count as chain beginnings @@ -2185,7 +2185,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << segment( *s ).lower() << ", but that residue is a chain beginning in the pose. Pose chain beginnings: " << chain_beginnings << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } @@ -2202,7 +2202,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << segment( *s ).upper() << ", but that residue is a chain ending in the pose. Pose chain endings: " << chain_endings << " current ending: " << *cur_ending << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } } @@ -2217,7 +2217,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << *cur_cutpoint << ", but no cutpoint was set in the StructureData. Pose cutpoints: " << cutpoints << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } if ( cur_beginning != chain_beginnings.end() ) { @@ -2226,7 +2226,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << *cur_beginning << ", but that residue is not a chain beginning in the StructureData. Pose chain beginnings: " << chain_beginnings << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } if ( cur_ending != chain_endings.end() ) { @@ -2235,7 +2235,7 @@ StructureData::check_chains( core::pose::Pose const & pose ) const << *cur_ending << ", but that residue is not a chain ending in the StructureData. Pose chain endings: " << chain_endings << std::endl; msg << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } TR.Debug << "Done checking chain endings " << std::endl; @@ -2250,7 +2250,7 @@ StructureData::check_movable_groups() const if ( *g <= 0 ) { std::stringstream msg; msg << " StructureData has a movable group <= 0 : " << *this << std::endl; - throw EXCN_PoseInconsistent( msg.str() ); + throw CREATE_EXCEPTION(EXCN_PoseInconsistent, msg.str() ); } } } @@ -2290,7 +2290,7 @@ StructureData::set_movable_group( std::string const & segid, core::Size const mg std::stringstream err; err << "Error in StructureData::set_movable_group( " << segid << ", " << mg << "):" << "segment not found! perm=" << *this << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } s->second.set_movable_group( mg ); changed(); diff --git a/source/src/protocols/denovo_design/components/StructureData.hh b/source/src/protocols/denovo_design/components/StructureData.hh index 9084522320..3713b86611 100644 --- a/source/src/protocols/denovo_design/components/StructureData.hh +++ b/source/src/protocols/denovo_design/components/StructureData.hh @@ -727,16 +727,9 @@ public: }; -class EXCN_PoseInconsistent : public utility::excn::EXCN_Base { +class EXCN_PoseInconsistent : public utility::excn::Exception { public: - EXCN_PoseInconsistent( std::string const & your_msg ): - utility::excn::EXCN_Base(), msg_( your_msg ) {} - - virtual void - show( std::ostream & os ) const { os << msg_; } - std::string msg_; -private: - EXCN_PoseInconsistent(); + using utility::excn::Exception::Exception; }; } // components diff --git a/source/src/protocols/denovo_design/components/StructureDataFactory.cc b/source/src/protocols/denovo_design/components/StructureDataFactory.cc index 7828341f1b..0940a9b296 100644 --- a/source/src/protocols/denovo_design/components/StructureDataFactory.cc +++ b/source/src/protocols/denovo_design/components/StructureDataFactory.cc @@ -496,7 +496,7 @@ StructureDataFactory::create_from_remarks( core::io::Remarks const & rem ) const } if ( lines.empty() ) { - throw EXCN_RemarksNotPresent( "No StructureData remark lines found" ); + throw CREATE_EXCEPTION(EXCN_RemarksNotPresent, "No StructureData remark lines found" ); } // piece together full xml tag diff --git a/source/src/protocols/denovo_design/components/StructureDataFactory.hh b/source/src/protocols/denovo_design/components/StructureDataFactory.hh index 70bc839bfc..1183a6df1f 100644 --- a/source/src/protocols/denovo_design/components/StructureDataFactory.hh +++ b/source/src/protocols/denovo_design/components/StructureDataFactory.hh @@ -29,7 +29,7 @@ // Utility headers #include #include -#include +#include // C++ headers #include @@ -198,17 +198,9 @@ clean_from_storage( std::string & st ); void clean_for_storage( std::string & ss ); -class EXCN_RemarksNotPresent : public utility::excn::EXCN_Base { +class EXCN_RemarksNotPresent : public utility::excn::Exception { public: - EXCN_RemarksNotPresent( std::string const & msg ): - utility::excn::EXCN_Base(), - msg_( msg ) {} - - virtual void - show( std::ostream & os ) const { os << msg_; } - -private: - std::string msg_; + using utility::excn::Exception::Exception; }; class SegmentCounts { @@ -256,4 +248,3 @@ add_segments_for_chain( } //components #endif //INCLUDED_protocols_denovo_design_components_StructureDataFactory_hh - diff --git a/source/src/protocols/denovo_design/components/StructureDataPerturber.cc b/source/src/protocols/denovo_design/components/StructureDataPerturber.cc index cfc82afacc..45e2896a4d 100644 --- a/source/src/protocols/denovo_design/components/StructureDataPerturber.cc +++ b/source/src/protocols/denovo_design/components/StructureDataPerturber.cc @@ -336,7 +336,7 @@ CompoundPerturber::parse_my_tag( utility::tag::Tag const & tag, basic::datacache std::stringstream msg; msg << class_name() << "::parse_my_tag(): Invalid mode specified (" << mode << ") -- valid modes are [ AND, OR ]" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } perturbers_.clear(); diff --git a/source/src/protocols/denovo_design/components/StructureDataWithPose.cc b/source/src/protocols/denovo_design/components/StructureDataWithPose.cc index df7809147e..9923a61539 100644 --- a/source/src/protocols/denovo_design/components/StructureDataWithPose.cc +++ b/source/src/protocols/denovo_design/components/StructureDataWithPose.cc @@ -673,7 +673,7 @@ StructureDataWithPose::consolidate_movable_groups( core::kinematics::FoldTree ft = fg.fold_tree( root_segments ); if ( ft.nres() != pose.size() ) { TR.Error << "FT nres " << ft.nres() << " != pose nres " << pose.size() << " FT: " << ft << std::endl; - throw utility::excn::EXCN_Msg_Exception( "Bad nres" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Bad nres" ); } if ( pose.is_centroid() ) { TR << "Pose is centroid" << std::endl; @@ -1140,7 +1140,7 @@ StructureDataWithPose::delete_residues_in_pose( ss << id() << ": deleting residue from " << start << " to " << end << ", pose length = " << pose_->size() << std::endl; ss << "Bad start and end given to delete_residues_in_pose()" << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } pose_->conformation().delete_residue_range_slow( start, end ); pose_->conformation().unblock_signals(); diff --git a/source/src/protocols/denovo_design/connection/ConnectionArchitect.cc b/source/src/protocols/denovo_design/connection/ConnectionArchitect.cc index 6c6381a609..638439e66e 100644 --- a/source/src/protocols/denovo_design/connection/ConnectionArchitect.cc +++ b/source/src/protocols/denovo_design/connection/ConnectionArchitect.cc @@ -158,7 +158,7 @@ ConnectionArchitect::apply( components::StructureData & sd, core::Real & random ss << id() << ": No valid free connection points could be found. User-specified segment1 ids: " << segment1_ids_ << " and segment2 ids: " << segment2_ids_ << std::endl; ss << sd << std::endl; - throw EXCN_ConnectionSetupFailed( ss.str() ); + throw CREATE_EXCEPTION(EXCN_ConnectionSetupFailed, ss.str() ); } MotifOP motif = choose_motif( connection_candidates, random ); @@ -169,7 +169,7 @@ ConnectionArchitect::apply( components::StructureData & sd, core::Real & random ss << id() << ": Failed to choose a motif to use for the connection. User-specified segment1 ids: " << segment1_ids_ << " and segment2 ids: " << segment2_ids_ << std::endl; ss << sd << std::endl; - throw EXCN_ConnectionSetupFailed( ss.str() ); + throw CREATE_EXCEPTION(EXCN_ConnectionSetupFailed, ss.str() ); } } @@ -407,7 +407,7 @@ ConnectionArchitect::segment_pairs( components::StructureData const & sd ) const err << "Connection " << id() << ": " << " no available segment1 upper termini were found matching the user's input."; err << "Input ids: " << segment1_ids_ << " User chain: " << chain1_ << " Perm: " << std::endl; err << sd << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } if ( local_comp2_ids.empty() ) { @@ -415,7 +415,7 @@ ConnectionArchitect::segment_pairs( components::StructureData const & sd ) const err << "Connection " << id() << ": " << " no available segment2 lower termini were found matching the user's input."; err << "Input ids: " << segment2_ids_ << " User chain: " << chain2_ << " Perm: " << std::endl; err << sd << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return combine_segment_names( local_comp1_ids, local_comp2_ids ); diff --git a/source/src/protocols/denovo_design/connection/ConnectionArchitect.hh b/source/src/protocols/denovo_design/connection/ConnectionArchitect.hh index da4a018db6..a8f904c2be 100644 --- a/source/src/protocols/denovo_design/connection/ConnectionArchitect.hh +++ b/source/src/protocols/denovo_design/connection/ConnectionArchitect.hh @@ -28,7 +28,7 @@ #include // Utility headers -#include +#include #include #include #include @@ -238,15 +238,9 @@ typedef utility::pointer::shared_ptr< AreConnectablePredicate const > AreConnect SegmentNames parse_segment_names( std::string const & segment_name_str ); -class EXCN_ConnectionSetupFailed : public utility::excn::EXCN_Base { +class EXCN_ConnectionSetupFailed : public utility::excn::Exception { public: - EXCN_ConnectionSetupFailed( std::string const & msg ): - utility::excn::EXCN_Base(), - message_( msg ) {} - std::string const & message() const { return message_; } - virtual void show( std::ostream & os ) const { os << message_; } -private: - std::string const message_; + using utility::excn::Exception::Exception; }; @@ -255,4 +249,3 @@ private: } //protocols #endif //INCLUDED_protocols_denovo_design_connection_ConnectionArchitect_hh - diff --git a/source/src/protocols/denovo_design/constraints/FileConstraintGenerator.cc b/source/src/protocols/denovo_design/constraints/FileConstraintGenerator.cc index e63610c2a0..dd0e0e54b6 100644 --- a/source/src/protocols/denovo_design/constraints/FileConstraintGenerator.cc +++ b/source/src/protocols/denovo_design/constraints/FileConstraintGenerator.cc @@ -88,7 +88,7 @@ FileConstraintGenerator::parse_tag( { set_cstfile( tag->getOption< std::string >( "filename", filename_ ) ); if ( filename_.empty() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "FileConstraintGenerator requires the 'filename' option to be set." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "FileConstraintGenerator requires the 'filename' option to be set." ); } } @@ -105,7 +105,7 @@ FileConstraintGenerator::apply( core::pose::Pose const & pose ) const TR.Debug << "Opening " << filename_ << std::endl; utility::io::izstream infile( filename_ ); if ( !infile.good() ) { - throw utility::excn::EXCN_BadInput( "Could not open " + filename_ + " for reading." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Could not open " + filename_ + " for reading." ); } // Get stream of cst definitions diff --git a/source/src/protocols/denovo_design/filters/PreProlineFilter.cc b/source/src/protocols/denovo_design/filters/PreProlineFilter.cc index d2b8fd1028..768a2646f1 100644 --- a/source/src/protocols/denovo_design/filters/PreProlineFilter.cc +++ b/source/src/protocols/denovo_design/filters/PreProlineFilter.cc @@ -244,7 +244,7 @@ parse_matrix( if ( !instream.good() ) { std::stringstream err; err << "Error parsing matrix stream before y =" << i << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } for ( core::Size ii = 1; ii <= npoints_x; ++ii ) { // matrix is 0-indexed @@ -254,7 +254,7 @@ parse_matrix( if ( !instream.good() ) { std::stringstream err; err << "Error parsing matrix stream in preproline filter!" << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return matrix; } @@ -268,7 +268,7 @@ PreProlineFilter::setup_spline() if ( ! basic::database::open( infile, dbfile ) ) { std::stringstream err; err << "Pre-proline filter could not open database file " << dbfile << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } core::Size npoints_phi, npoints_psi; diff --git a/source/src/protocols/denovo_design/movers/AddSegmentDataMover.cc b/source/src/protocols/denovo_design/movers/AddSegmentDataMover.cc index dc62dc15b2..4fdce65a7a 100644 --- a/source/src/protocols/denovo_design/movers/AddSegmentDataMover.cc +++ b/source/src/protocols/denovo_design/movers/AddSegmentDataMover.cc @@ -63,15 +63,15 @@ AddSegmentDataMover::parse_my_tag( if ( segment_name_.empty() ) { std::stringstream msg; msg << "Name of new segment must be specified to AddSegment" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( secstruct_.empty() || abego_.empty() ) { std::stringstream msg; msg << "SS and ABEGO must be specified to AddSegment" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( secstruct_.size() != abego_.size() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "AddSegment: ss and abego must be the same length!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "AddSegment: ss and abego must be the same length!" ); } } @@ -126,16 +126,16 @@ AddSegmentDataMover::create_segment( components::StructureData & perm ) const if ( segment_name_.empty() ) { std::stringstream msg; msg << "Name of new segment must be specified to AddSegment" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( secstruct_.empty() || abego_.empty() ) { std::stringstream msg; msg << "SS and ABEGO must be specified to AddSegment" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( secstruct_.size() != abego_.size() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "AddSegment: ss and abego must be the same length!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "AddSegment: ss and abego must be the same length!" ); } bool const nterm_inc = secstruct_.size() < 2; diff --git a/source/src/protocols/denovo_design/movers/AlignResiduesMover.cc b/source/src/protocols/denovo_design/movers/AlignResiduesMover.cc index b480a254c0..8d9b26fb30 100644 --- a/source/src/protocols/denovo_design/movers/AlignResiduesMover.cc +++ b/source/src/protocols/denovo_design/movers/AlignResiduesMover.cc @@ -74,7 +74,7 @@ parse_residue_selectors( std::string const & selector_name_str, basic::datacache for ( utility::vector1< std::string >::const_iterator sname=selector_names.begin(); sname!=selector_names.end(); ++sname ) { core::select::residue_selector::ResidueSelectorCOP s = protocols::rosetta_scripts::get_residue_selector( *sname, data ); if ( !s ) { - throw utility::excn::EXCN_RosettaScriptsOption( "target_selector named " + *sname + " could not be found in the RosettaScripts XML" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "target_selector named " + *sname + " could not be found in the RosettaScripts XML" ); } selectors.push_back( s->clone() ); } @@ -99,7 +99,7 @@ AlignResiduesMover::parse_my_tag( target_selectors_ = parse_residue_selectors( target_selector_names, data ); if ( template_selectors_.size() != target_selectors_.size() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Number of template ids must match number of target ids." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Number of template ids must match number of target ids." ); } } diff --git a/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.cc b/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.cc index f8af9c785a..b24374f866 100644 --- a/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.cc +++ b/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.cc @@ -140,7 +140,7 @@ BuildDeNovoBackboneMover::parse_my_tag( msg << get_name() << "::parse_my_tag(): Invalid subtag found:" << *subtag << std::endl; msg << "Valid subtags are \"PreFoldMovers\", \"PostFoldMovers\", a DeNovo architect, and a Pose Folder." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } TR << "Finished parsing tag: " << prefold_movers_.size() << " prefold movers found." << std::endl; @@ -318,7 +318,7 @@ BuildDeNovoBackboneMover::build_in_phases( e.show( TR ); TR.flush(); TR.Warning << "not folding anything!" << std::endl; - } catch ( EXCN_FilterFailed const & e ) { + } catch (EXCN_FilterFailed const & e ) { e.show( TR ); TR.flush(); } @@ -328,7 +328,7 @@ BuildDeNovoBackboneMover::build_in_phases( std::stringstream msg; msg << mover_name() << "build_in_phases(): Failed to fold anything passing filters after " << max_iter << " attempts." << std::endl; - throw components::EXCN_Fold( msg.str() ); + throw CREATE_EXCEPTION(components::EXCN_Fold, msg.str() ); return core::pose::PoseOP(); } @@ -338,7 +338,7 @@ BuildDeNovoBackboneMover::check_pose( core::pose::Pose const & pose ) const { core::Size filter_num = 1; for ( FilterCOPs::const_iterator f=filters_.begin(); f!=filters_.end(); ++f, ++filter_num ) { - if ( !(*f)->apply( pose ) ) throw EXCN_FilterFailed( (*f)->get_type(), filter_num ); + if ( !(*f)->apply( pose ) ) throw CREATE_EXCEPTION(EXCN_FilterFailed, (*f)->get_type(), filter_num ); } } @@ -418,14 +418,14 @@ BuildDeNovoBackboneMover::parse_movers( utility::tag::TagCOP tag, protocols::mov std::stringstream msg; msg << type() << ": Invalid xml tag name (" << (*subtag)->getName() << ") found in tag " << *tag << std::endl; msg << "Valid tags are: \"Add\"." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } std::string const mover_name = (*subtag)->getOption< std::string >( "mover" ); protocols::moves::Movers_map::const_iterator find_mover = moversmap.find( mover_name ); if ( find_mover == moversmap.end() ) { std::stringstream msg; msg << type() << "::parse_movers(): ERROR !! mover not found in map: \n" << **subtag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } movers.push_back( find_mover->second->clone() ); TR.Debug << "found mover " << mover_name << std::endl; @@ -442,14 +442,14 @@ BuildDeNovoBackboneMover::parse_filters( utility::tag::TagCOP tag, protocols::fi std::stringstream msg; msg << type() << ": Invalid xml tag name (" << (*subtag)->getName() << ") found in tag " << *tag << std::endl; msg << "Valid tags are: \"Add\"." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } std::string const filter_name = (*subtag)->getOption< std::string >( "filter" ); protocols::filters::Filters_map::const_iterator find_filter = filter_map.find( filter_name ); if ( find_filter == filter_map.end() ) { std::stringstream msg; msg << type() << "::parse_filters(): ERROR !! filter not found in map: \n" << **subtag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } filters_.push_back( find_filter->second->clone() ); TR.Debug << "found filter " << filter_name << std::endl; @@ -579,7 +579,7 @@ BuildDeNovoBackboneMover::create_loops( std::stringstream msg; msg << type() << "::create_loops(): Loops object could not be created! Movable segments=" << movable_segments << " SD=" << sd << std::endl; - throw EXCN_NothingToFold( msg.str() ); + throw CREATE_EXCEPTION(EXCN_NothingToFold, msg.str() ); } // add requested connection overlap @@ -1272,4 +1272,3 @@ add_overlap_to_loops( } //protocols } //denovo_design } //movers - diff --git a/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.hh b/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.hh index 65e032f481..060e452c7d 100644 --- a/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.hh +++ b/source/src/protocols/denovo_design/movers/BuildDeNovoBackboneMover.hh @@ -38,7 +38,7 @@ // Basic/Utility headers #include -#include +#include // C++ headers #include @@ -338,13 +338,10 @@ public: get_name() const override; }; -class EXCN_FilterFailed : public utility::excn::EXCN_Base { +class EXCN_FilterFailed : public utility::excn::Exception { public: - EXCN_FilterFailed( std::string const & filter, core::Size const filter_num ): - utility::excn::EXCN_Base(), filter_( filter ), filter_num_( filter_num ) {}; - - virtual void - show( std::ostream & ) const {} + EXCN_FilterFailed(char const *file, int line, std::string const & filter, core::Size const filter_num ) + : utility::excn::Exception(file, line, ""), filter_( filter ), filter_num_( filter_num ) {}; std::string const & filter_name() const { return filter_; } @@ -357,17 +354,9 @@ private: core::Size filter_num_; }; -class EXCN_NothingToFold : public utility::excn::EXCN_Base { +class EXCN_NothingToFold : public utility::excn::Exception { public: - EXCN_NothingToFold( std::string const & msg ): - utility::excn::EXCN_Base(), msg_( msg ) {} - - virtual void - show( std::ostream & os ) const { os << msg_ << std::endl; } - -private: - std::string msg_; - EXCN_NothingToFold() {}; + using utility::excn::Exception::Exception; }; /// @brief goes through loops and adds overlapping residues @@ -385,4 +374,3 @@ add_overlap_to_loops( } //movers #endif //protocols/denovo_design/movers_BuildDeNovoBackboneMover_hh - diff --git a/source/src/protocols/denovo_design/movers/DeclareStructureDataCovalentBondMover.cc b/source/src/protocols/denovo_design/movers/DeclareStructureDataCovalentBondMover.cc index a14114dbed..ad604e5ad0 100644 --- a/source/src/protocols/denovo_design/movers/DeclareStructureDataCovalentBondMover.cc +++ b/source/src/protocols/denovo_design/movers/DeclareStructureDataCovalentBondMover.cc @@ -64,15 +64,15 @@ void DeclareStructureDataCovalentBondMover::apply( core::pose::Pose & pose ) { if ( atom1_.find(',') == std::string::npos ) { - throw utility::excn::EXCN_BadInput( "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); } if ( atom2_.find(',') == std::string::npos ) { - throw utility::excn::EXCN_BadInput( "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); } utility::vector1< std::string > res_plus_atom1 = utility::string_split( atom1_, ',' ); if ( res_plus_atom1.size() != 2 ) { - throw utility::excn::EXCN_BadInput( "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); } utility::vector1< std::string > res1_strs = utility::string_split( res_plus_atom1[1], '.' ); @@ -80,7 +80,7 @@ DeclareStructureDataCovalentBondMover::apply( core::pose::Pose & pose ) res1_strs.push_back( "0" ); } if ( res1_strs.size() != 2 ) { - throw utility::excn::EXCN_BadInput( "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom1 description " + atom1_ + " is malformed. It should be of the form segment#residue,atom." ); } std::string const seg1 = res1_strs[1]; @@ -89,14 +89,14 @@ DeclareStructureDataCovalentBondMover::apply( core::pose::Pose & pose ) utility::vector1< std::string > res_plus_atom2 = utility::string_split( atom2_, ',' ); if ( res_plus_atom2.size() != 2 ) { - throw utility::excn::EXCN_BadInput( "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); } utility::vector1< std::string > res2_strs = utility::string_split( res_plus_atom2[1], '.' ); if ( res2_strs.size() == 1 ) { res2_strs.push_back( "0" ); } if ( res2_strs.size() != 2 ) { - throw utility::excn::EXCN_BadInput( "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Atom2 description " + atom2_ + " is malformed. It should be of the form segment#residue,atom." ); } std::string const seg2 = res2_strs[1]; @@ -152,10 +152,10 @@ DeclareStructureDataCovalentBondMover::parse_my_tag( atom1_ = tag->getOption< std::string >( "atom1", atom1_ ); atom2_ = tag->getOption< std::string >( "atom2", atom2_ ); if ( ! atom1_.size() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Atom1 option must be specified to DeclareCovalentBond." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Atom1 option must be specified to DeclareCovalentBond." ); } if ( ! atom2_.size() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Atom2 option must be specified to DeclareCovalentBond." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Atom2 option must be specified to DeclareCovalentBond." ); } } diff --git a/source/src/protocols/denovo_design/movers/ExtendChainMover.cc b/source/src/protocols/denovo_design/movers/ExtendChainMover.cc index 558e357e6c..c6317b1695 100644 --- a/source/src/protocols/denovo_design/movers/ExtendChainMover.cc +++ b/source/src/protocols/denovo_design/movers/ExtendChainMover.cc @@ -121,12 +121,12 @@ ExtendChainMover::parse_my_tag( if ( tag->hasOption( "length" ) ) { std::stringstream msg; msg << architect().id() << ": The length option is not valid for ExtendChainMover -- please specify a motif using the \"motif\" option!"; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( !tag->hasOption( "motif" ) ) { std::stringstream msg; msg << architect().id() << ": You must specify a motif (e.g. 1LG-1LB-10HA) to ExtendChainMover."; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } std::string const & segment_id_str = tag->getOption< std::string >( "segment", "" ); @@ -141,12 +141,12 @@ ExtendChainMover::parse_my_tag( msg << architect().id() << ": You cannot set both segment and chain in ExtendChainMover. Please specify one or the other."; msg << "segment1_ids = " << segment_names_ << std::endl; msg << "chain1 = " << chain_ << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( segment_names_.empty() && !chain_ ) { std::stringstream msg; msg << architect().id() << ": You must set either segment or chain in ExtendChainMover, but you haven't specified either. Please specify either one or the other."; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } @@ -281,7 +281,7 @@ seg2 = local_comp2_ids[ s2_idx ]; } if ( user_chain1() ) { if ( !seg1.empty() ) { -throw utility::excn::EXCN_BadInput( id() + ": you can only specify one segment/chain to ExtendChainMover! You have specified more than one." ); +throw CREATE_EXCEPTION(utility::excn::BadInput, id() + ": you can only specify one segment/chain to ExtendChainMover! You have specified more than one." ); } utility::vector1< std::string > const local_comp1_ids = find_available_upper_termini( perm ); if ( user_chain1() > local_comp1_ids.size() ) { @@ -289,13 +289,13 @@ std::stringstream msg; msg << id() << ": The user-specified chain number (" << user_chain1() << ") is larger than the number of upper termini in the pose (" << local_comp1_ids.size() << "). Perm = " << perm << std::endl; -throw utility::excn::EXCN_BadInput( msg.str() ); +throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } seg1 = local_comp1_ids[ user_chain1() ]; } if ( user_chain2() ) { if ( !seg2.empty() ) { -throw utility::excn::EXCN_BadInput( id() + ": you can only specify one segment/chain to ExtendChainMover! You have specified more than one." ); +throw CREATE_EXCEPTION(utility::excn::BadInput, id() + ": you can only specify one segment/chain to ExtendChainMover! You have specified more than one." ); } utility::vector1< std::string > const local_comp2_ids = find_available_lower_termini( perm ); if ( user_chain2() > local_comp2_ids.size() ) { @@ -303,7 +303,7 @@ std::stringstream msg; msg << id() << ": The user-specified chain2 number (" << user_chain2() << ") is larger than the number of lower termini in the pose (" << local_comp2_ids.size() << "). Perm = " << perm << std::endl; -throw utility::excn::EXCN_BadInput( msg.str() ); +throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } seg2 = local_comp2_ids[ user_chain2() ]; } @@ -314,7 +314,7 @@ msg << id() << ": you must specify exactly one valid segment/chain to ExtendChai msg << "user_chain1() = " << user_chain1() << " user_chain2() = " << user_chain2() << std::endl; msg << "segment1 = " << comp1_ids() << " segment2 = " << comp2_ids() << std::endl; msg << "Perm = " << perm << std::endl; -throw utility::excn::EXCN_BadInput( msg.str() ); +throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } std::string const segname = id(); @@ -386,7 +386,7 @@ perm.move_segment( loop_upper( perm ), loop_upper( perm ), upper_segment_id( per } else { std::stringstream msg; msg << id() << ": Lower segment id and upper segment id are both empty! Perm= " << perm << std::endl; -throw utility::excn::EXCN_BadInput( msg.str() ); +throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } perm.chains_from_termini(); @@ -411,7 +411,7 @@ connect_upper_loop( perm ); std::stringstream msg; msg << id() << ": Neither loop_upper (" << loop_upper( perm ) << ") nor loop_lower(" << loop_lower( perm ) << ") are the segment built by this connection. Perm=" << perm << std::endl; -throw utility::excn::EXCN_BadInput( msg.str() ); +throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } // check sfxn @@ -419,7 +419,7 @@ if ( !scorefxn() ) { std::stringstream err; err << "ExtendChain: You must set a valid scorefunction to " << id() << " before connecting" << std::endl; -throw utility::excn::EXCN_Msg_Exception( err.str() ); +throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } // create loops diff --git a/source/src/protocols/denovo_design/movers/FastDesign.cc b/source/src/protocols/denovo_design/movers/FastDesign.cc index f775ffb77a..1d858f29e6 100644 --- a/source/src/protocols/denovo_design/movers/FastDesign.cc +++ b/source/src/protocols/denovo_design/movers/FastDesign.cc @@ -178,7 +178,7 @@ FastDesign::parse_my_tag( std::stringstream msg; msg << "FastDesign: Could not find a constraint generator named " << *cg << " in the data map. Ensure it has been defined in an AddConstraints mover before being referenced by FastDesign." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } cgs_.push_back( new_cg->clone() ); } diff --git a/source/src/protocols/denovo_design/movers/SetResidueAliasMover.cc b/source/src/protocols/denovo_design/movers/SetResidueAliasMover.cc index b9d11b29ed..b9a879a6fa 100644 --- a/source/src/protocols/denovo_design/movers/SetResidueAliasMover.cc +++ b/source/src/protocols/denovo_design/movers/SetResidueAliasMover.cc @@ -63,14 +63,14 @@ SetResidueAliasMover::parse_my_tag( std::stringstream msg; msg << mover_name() << "::apply(): Residue number must be specified to add an alias via the \"residue\" option. If a residue number is " << "specified along with a segment_name, the residue number will be local within the segment." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } if ( alias_name_.empty() ) { std::stringstream msg; msg << mover_name() << "::apply(): Alias name is not specified -- you must specify the \"alias_name\" option in order " << "to set an alias." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } diff --git a/source/src/protocols/denovo_design/residue_selectors/NamedSegmentSelector.cc b/source/src/protocols/denovo_design/residue_selectors/NamedSegmentSelector.cc index e847d632ff..ecdb71b6a8 100644 --- a/source/src/protocols/denovo_design/residue_selectors/NamedSegmentSelector.cc +++ b/source/src/protocols/denovo_design/residue_selectors/NamedSegmentSelector.cc @@ -191,7 +191,7 @@ NamedSegmentSelector::resid_set() const for ( utility::vector1< std::string >::const_iterator b=residue_blocks.begin(); b!=residue_blocks.end(); ++b ) { utility::vector1< std::string > const ranges = utility::string_split( *b, ':' ); if ( ( ! ranges.size() ) || ( ranges.size() > 2 ) ) { - throw utility::excn::EXCN_Msg_Exception( "Bad residue range specified to NamedSegmentSelector: " + *b ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Bad residue range specified to NamedSegmentSelector: " + *b ); } SignedResid start = boost::lexical_cast< SignedResid >( ranges[ 1 ] ); SignedResid stop = start; @@ -223,7 +223,7 @@ NamedSegmentSelector::parse_my_tag( if ( segment_.empty() ) { std::stringstream error_message; error_message << "TomponentSelector::parse_my_tag Missing required option 'segment' in the input Tag" << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } error_on_missing_segment_ = tag->getOption< bool >( "error_on_missing_segment", error_on_missing_segment_ ); diff --git a/source/src/protocols/denovo_design/task_operations/ConsensusLoopDesignOperation.cc b/source/src/protocols/denovo_design/task_operations/ConsensusLoopDesignOperation.cc index ee12082019..1906bc4247 100644 --- a/source/src/protocols/denovo_design/task_operations/ConsensusLoopDesignOperation.cc +++ b/source/src/protocols/denovo_design/task_operations/ConsensusLoopDesignOperation.cc @@ -130,7 +130,7 @@ ConsensusLoopDesignOperation::parse_tag( if ( secstruct_.empty() ) { std::stringstream msg; msg << "ConsensusLoopDesign: Error getting secondary structure from blueprint file" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } @@ -681,7 +681,7 @@ ConsensusLoopDatabase::read_db() // database format is: ... if ( !infile.good() ) { - throw utility::excn::EXCN_Msg_Exception( "ConsensusLoopDesign: Could not open database file " + db_file + "\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ConsensusLoopDesign: Could not open database file " + db_file + "\n" ); } while ( infile.good() ) { diff --git a/source/src/protocols/denovo_design/util.cc b/source/src/protocols/denovo_design/util.cc index 7bbb7b4ee5..dfc4d772ea 100644 --- a/source/src/protocols/denovo_design/util.cc +++ b/source/src/protocols/denovo_design/util.cc @@ -295,11 +295,11 @@ get_residue_selector( basic::datacache::DataMap const & data, std::string const core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << name << "' from the Datamap.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector ); return selector; @@ -538,7 +538,7 @@ parse_length_string( std::string const & len_str ) retval.push_back( i ); } } else { - throw utility::excn::EXCN_Msg_Exception( "Invalid length input: " + len_str ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Invalid length input: " + len_str ); } } return retval; @@ -573,7 +573,7 @@ parse_strand_pair( std::string const & strand_pair_str ) if ( strandvec.size() != 2 ) { std::stringstream err; err << "The given strand pair (" << strand_pair_str << ") has more or less than 2 values. It must have exactly two. Edge strands can be represented by blanks (e.g. \"\",sheet.s2 )." << std::endl; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } return std::make_pair( strandvec[ 1 ], strandvec[ 2 ] ); } diff --git a/source/src/protocols/design_opt/GreedyOptMutationMover.cc b/source/src/protocols/design_opt/GreedyOptMutationMover.cc index 42cb914028..7df9f8750a 100644 --- a/source/src/protocols/design_opt/GreedyOptMutationMover.cc +++ b/source/src/protocols/design_opt/GreedyOptMutationMover.cc @@ -828,7 +828,7 @@ GreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, std::string const relax_mover_name( tag->getOption< std::string >( "relax_mover", "null" ) ); auto mover_it( movers.find( relax_mover_name ) ); if ( mover_it == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Relax mover "+relax_mover_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Relax mover "+relax_mover_name+" not found" ); } relax_mover( mover_it->second ); //load scorefxn @@ -861,7 +861,7 @@ GreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, add_filter( find_filt->second->clone(), samp_type, filter_delta ); } //foreach ftag } else { // fi Filters - throw utility::excn::EXCN_RosettaScriptsOption( "tag name " + btag->getName() + " unrecognized." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "tag name " + btag->getName() + " unrecognized." ); } }//foreach btag //load single filter @@ -870,7 +870,7 @@ GreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, if ( filter_name != "true_filter" || filters_.size() < 1 ) { auto find_filt( filters.find( filter_name ) ); if ( find_filt == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Filter "+filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter "+filter_name+" not found" ); } std::string const samp_type( tag->getOption< std::string >( "sample_type", "low" ) ); core::Real filter_delta( tag->getOption< core::Real >( "filter_delta", core::Real( 0. ) ) ); diff --git a/source/src/protocols/docking/DockSetupMover.cc b/source/src/protocols/docking/DockSetupMover.cc index 6e314a4142..c0e27e083f 100644 --- a/source/src/protocols/docking/DockSetupMover.cc +++ b/source/src/protocols/docking/DockSetupMover.cc @@ -174,7 +174,7 @@ DockSetupMover::parse_my_tag( moves::MoverOP mover = rosetta_scripts::parse_mover( tag->getOption< std::string >( "rb_mover", "null" ), movers ); rb_mover_ = utility::pointer::dynamic_pointer_cast< rigid::RigidBodyPerturbNoCenterMover > ( mover ); // if ( !rb_mover_ ) { - // throw utility::excn::EXCN_RosettaScriptsOption( "DockSetupMover requires an rb_mover argument" ); + // throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "DockSetupMover requires an rb_mover argument" ); // } movable_jumps_.clear(); if ( tag->hasOption( "moveable_jump" ) ) { diff --git a/source/src/protocols/docking/DockingInitialPerturbation.cc b/source/src/protocols/docking/DockingInitialPerturbation.cc index 186e649c14..f9d95ea69c 100644 --- a/source/src/protocols/docking/DockingInitialPerturbation.cc +++ b/source/src/protocols/docking/DockingInitialPerturbation.cc @@ -426,7 +426,7 @@ DockingInitialPerturbation::parse_my_tag( TR << "RigidBodyInfo not found in basic::datacache::DataMap" << std::endl; rigid_body_info_ = protocols::docking::RigidBodyInfoOP( new protocols::docking::RigidBodyInfo ); data_map.add( "RigidBodyInfo", "docking_setup", rigid_body_info_ ); - // throw utility::excn::EXCN_RosettaScriptsOption( "RigidBodyInfo not found in basic::datacache::DataMap, DockingInitialPerturbation can not be done, so exit here!" ); + // throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RigidBodyInfo not found in basic::datacache::DataMap, DockingInitialPerturbation can not be done, so exit here!" ); } else { rigid_body_info_ = data_map.get_ptr< protocols::docking::RigidBodyInfo >( "RigidBodyInfo", "docking_setup" ); TR.Debug << "get RigidBodyInfo pointer from basic::datacache::DataMap" << std::endl; diff --git a/source/src/protocols/environment/AutoCutData.cc b/source/src/protocols/environment/AutoCutData.cc index d100a7f0f8..77259b7ffe 100644 --- a/source/src/protocols/environment/AutoCutData.cc +++ b/source/src/protocols/environment/AutoCutData.cc @@ -44,7 +44,7 @@ std::string AutoCutDataCreator::keyname() const{ AutoCutData::AutoCutData( std::istream &in ) : Parent() { - utility::excn::EXCN_BadInput e( "AutoCutData tried to read an improperly formatted SilentFile remark." ); + auto e = CREATE_EXCEPTION(utility::excn::BadInput, "AutoCutData tried to read an improperly formatted SilentFile remark." ); std::string token; diff --git a/source/src/protocols/environment/ClientMover.cc b/source/src/protocols/environment/ClientMover.cc index f5d8911766..aeea6e845a 100644 --- a/source/src/protocols/environment/ClientMover.cc +++ b/source/src/protocols/environment/ClientMover.cc @@ -112,7 +112,7 @@ void ClientMover::sandboxed_copy( core::pose::Pose const& sandbox_pose, //CLAIMING METHODS: void ClientMover::initialize( Pose& ) { - throw utility::excn::EXCN_Msg_Exception( "ClientMover "+this->get_name()+ + throw CREATE_EXCEPTION(utility::excn::Exception, "ClientMover "+this->get_name()+ " claimed a dof to initialize, but did not override ClientMover::initialize" ); } @@ -120,7 +120,7 @@ void ClientMover::initialize( Pose& ) { //PASSPORT MANAGEMENT METHODS: core::environment::DofPassportCOP ClientMover::passport() const { if ( passports_.empty() ) { - throw utility::excn::EXCN_NullPointer( "ClientMover "+this->get_name()+ + throw CREATE_EXCEPTION(utility::excn::NullPointerError, "ClientMover "+this->get_name()+ " tried to access its passports, of which it has none."); } return passports_.top().second; @@ -144,7 +144,7 @@ void ClientMover::push_passport( EnvironmentCAP env_ap, DofPassportCOP pass ){ if ( superenv && superenv->is_registered( utility::pointer::static_pointer_cast< ClientMover >( get_self_ptr() ) ) ) { EnvironmentCOP passport_env = passports_.top().first.lock(); if ( passport_env && passport_env->id() == superenv->id() ) { - throw EXCN_Env_Passport( "ClientMover being double-assigned a passport for an environment.", + throw CREATE_EXCEPTION(EXCN_Env_Passport, "ClientMover being double-assigned a passport for an environment.", get_name(), env_ap ); } } else { @@ -153,9 +153,9 @@ void ClientMover::push_passport( EnvironmentCAP env_ap, DofPassportCOP pass ){ std::ostringstream ss; ss << "ClientMover " << this->get_name() << " already has a passport for " << env->name() << ". This probably means Environment::start got called multiple times." << std::endl; - throw EXCN_Env_Passport( ss.str(), get_name(), env_ap ); + throw CREATE_EXCEPTION(EXCN_Env_Passport, ss.str(), get_name(), env_ap ); } else { - throw EXCN_Env_Passport( "ClientMover lacks a superenvironment passport for a superenvironment with which it is registered.", + throw CREATE_EXCEPTION(EXCN_Env_Passport, "ClientMover lacks a superenvironment passport for a superenvironment with which it is registered.", get_name(), env_ap ); } } @@ -167,7 +167,7 @@ void ClientMover::push_passport( EnvironmentCAP env_ap, DofPassportCOP pass ){ void ClientMover::pop_passport( Environment const& canceling_env ) { // passport_cancel should never be called on an empty passport stack if ( passports_.empty() ) { - throw utility::excn::EXCN_Msg_Exception( "Environment '"+canceling_env.name()+" trying to pop a passport on "+this->get_name()+"'s empty pass stack." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Environment '"+canceling_env.name()+" trying to pop a passport on "+this->get_name()+"'s empty pass stack." ); } // in fact, we should only ever cancel our own passports. (Should this be an assert?) EnvironmentCOP passport_env = passports_.top().first.lock(); @@ -177,7 +177,7 @@ void ClientMover::pop_passport( Environment const& canceling_env ) { // being deallocated. We'll allow the delete. Optimally, we'd want to check to see that the incoming passport // is also inaccessible via owning pointer, but I don't really know how to do that... } else if ( passport_env->id() != canceling_env.id() ) { - throw utility::excn::EXCN_Msg_Exception( "Environment '"+canceling_env.name()+" trying to pop a passport on "+this->get_name()+" it did not issue." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Environment '"+canceling_env.name()+" trying to pop a passport on "+this->get_name()+" it did not issue." ); } passports_.pop(); @@ -191,7 +191,7 @@ bool ClientMover::state_check( std::string const& method_name, bool test ) const std::ostringstream ss; ss << "Call to " << this->get_name() << "::" << method_name << " is illegal because it has already " << "issued its claims." << std::endl; - throw utility::excn::EXCN_Msg_Exception( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, ss.str() ); } } diff --git a/source/src/protocols/environment/CoMTrackerCM.cc b/source/src/protocols/environment/CoMTrackerCM.cc index 7e4af99211..c4d6548f7f 100644 --- a/source/src/protocols/environment/CoMTrackerCM.cc +++ b/source/src/protocols/environment/CoMTrackerCM.cc @@ -166,7 +166,7 @@ void CoMTrackerCM::update_tracking_residue( core::kinematics::RT::Vector new_pos std::ostringstream ss; ss << "The CoMTrackerCM '" << name() << "' was configured to move all the residues in the pose. " << "This probably isn't what you meant, check your selectors and input pose." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } debug_assert( (Size) mobile_residues_.index( false ) <= pose.size() ); @@ -289,7 +289,7 @@ claims::EnvClaims CoMTrackerCM::yield_claims( core::pose::Pose const& pose, if ( std::find( mobile_residues_.begin(), mobile_residues_.end(), true ) == mobile_residues_.end() ) { std::ostringstream ss; ss << "The mobile_selector for '" << this->get_name() << "' made an empty selection. This is not allowed."; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } debug_assert( std::find( mobile_residues_.begin(), mobile_residues_.end(), true ) != mobile_residues_.end() ); diff --git a/source/src/protocols/environment/EnvClaimBroker.cc b/source/src/protocols/environment/EnvClaimBroker.cc index 96594c51a1..09979e5cbd 100644 --- a/source/src/protocols/environment/EnvClaimBroker.cc +++ b/source/src/protocols/environment/EnvClaimBroker.cc @@ -416,7 +416,7 @@ EnvClaimBroker::render_fold_tree( FoldTreeSketch& fts, tr.Debug << " Inserted automatic cut at " << cut << std::endl; result_.auto_cuts.insert( cut ); made_cut = true; - } catch( utility::excn::EXCN_Msg_Exception& e ){ + } catch( utility::excn::Exception& e ){ std::ostringstream ss; ss << "Automatic cut insertion failed with biases: ["; for ( Size k = 1; k <= cycle.size(); ++k ) { @@ -445,14 +445,14 @@ EnvClaimBroker::render_fold_tree( FoldTreeSketch& fts, } if ( env->auto_cut() ) { ss << " Cut bias was " << bias << "." << std::endl; } - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } cycle = fts.cycle(); } try { return fts.render(); - } catch ( utility::excn::EXCN_Msg_Exception& e ) { + } catch ( utility::excn::Exception& e ) { std::ostringstream ss; ss << "A problem was encountered rendering fold tree choices in " << __FILE__ << ":" << __LINE__ - 4 << ". Turn on debug output with '-out:levels' to investigate."; @@ -610,7 +610,7 @@ void EnvClaimBroker::setup_passports( DOFElemVect& elems, << element.type << " " << element.id << ": " << prev_str.first << " from '" << prev_str.second->get_name() << "' and " << strength << " from '" << owner->get_name() << "'." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } else { tr.Trace << " : not assigned" << std::endl; } @@ -694,7 +694,7 @@ EnvClaims EnvClaimBroker::collect_claims( MoverPassMap const & movers_and_passes ss << "The mover '" << claim->owner() << "' yielded a null pointer as one of its " << in_claims.size() << " claims during broking of the environment '" << (env ? env->name() : "(Unknown)") << "'." << std::endl; - throw utility::excn::EXCN_NullPointer( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, ss.str() ); } } @@ -736,7 +736,7 @@ void EnvClaimBroker::process_elements( ResElemVect const & elems, FoldTreeSketch std::ostringstream ss; ss << "[ERROR] Failed broking process due to duplicate residue claims for residue " << element.label << " that do not allow duplicate labels."; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } ann_->append_seq( element.label ); fts.append_residue(); @@ -813,7 +813,7 @@ void EnvClaimBroker::process_elements( JumpElemVect const & elems, brokered_jumps[ pos_pair ]->operator<<( ss ); ss << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } // if we make it through the above check, it's safe to double-label this jump with both. @@ -853,7 +853,7 @@ void EnvClaimBroker::process_elements( CutBiasElemVect const & elems, BiasVector if ( element.bias > 1 || element.bias < 0 ) { std::ostringstream ss; ss << "Cut biases must be between 0 and 1. Cut was (" << element.p << "," << bias << ")"; - throw utility::excn::EXCN_RangeError( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, ss.str() ); } bias[ abs_p ] *= element.bias; } diff --git a/source/src/protocols/environment/EnvExcn.cc b/source/src/protocols/environment/EnvExcn.cc index 5cf6841894..581dc0da9e 100644 --- a/source/src/protocols/environment/EnvExcn.cc +++ b/source/src/protocols/environment/EnvExcn.cc @@ -51,6 +51,7 @@ std::string dof_id_to_string( core::id::DOF_ID const& id, ProtectedConformation EXCN_Env_Security_Exception::EXCN_Env_Security_Exception( + char const *file, int line, core::id::DOF_ID const & dof, core::environment::DofPassportCOP pass, std::string const& mod_type, @@ -58,7 +59,7 @@ EXCN_Env_Security_Exception::EXCN_Env_Security_Exception( std::string const& mover_name, EnvironmentCAP env ): - Parent( env ), + Parent(file, line, env ), id_( dof ), pass_( pass ) { @@ -86,10 +87,11 @@ EXCN_Env_Security_Exception::EXCN_Env_Security_Exception( } EXCN_Env_Security_Exception::EXCN_Env_Security_Exception( + char const *file, int line, std::string const& message, std::string const& mover_name, EnvironmentCAP env ) : - Parent( env ) + Parent(file, line, env ) { std::ostringstream msg; msg << message << std::endl << "Failure due to a call by mover '" << mover_name << "'"; diff --git a/source/src/protocols/environment/EnvExcn.hh b/source/src/protocols/environment/EnvExcn.hh index 4dfa6450f4..437c25a908 100644 --- a/source/src/protocols/environment/EnvExcn.hh +++ b/source/src/protocols/environment/EnvExcn.hh @@ -37,14 +37,14 @@ namespace environment { class EXCN_Env_Security_Exception : public core::environment::EXCN_Env_Exception { typedef core::environment::EXCN_Env_Exception Parent; public: - EXCN_Env_Security_Exception( core::id::DOF_ID const& dof, + EXCN_Env_Security_Exception(char const *file, int line, core::id::DOF_ID const& dof, core::environment::DofPassportCOP pass, std::string const& mod_type, ProtectedConformation const&, std::string const& mover_name, EnvironmentCAP env ); - EXCN_Env_Security_Exception( std::string const& message, + EXCN_Env_Security_Exception(char const *file, int line, std::string const& message, std::string const& mover_name, EnvironmentCAP env ); @@ -64,10 +64,7 @@ private: class EXCN_Env_Passport : public core::environment::EXCN_Env_Exception { typedef core::environment::EXCN_Env_Exception Parent; public: - EXCN_Env_Passport( std::string const& message, - std::string const& mover_name, - EnvironmentCAP env ) : - Parent( env ) { + EXCN_Env_Passport(char const *file, int line, std::string const& message, std::string const& mover_name, EnvironmentCAP env ) : Parent(file, line, env ) { std::ostringstream msg; msg << message << " Mover: '" << mover_name << "'."; diff --git a/source/src/protocols/environment/EnvMover.cc b/source/src/protocols/environment/EnvMover.cc index 6b1dc2eb3c..78e6c955d9 100644 --- a/source/src/protocols/environment/EnvMover.cc +++ b/source/src/protocols/environment/EnvMover.cc @@ -147,7 +147,7 @@ moves::MoverOP find_mover( utility::tag::TagCOP tag, mover_name = tag->getOption< std::string >( "mover" ); } else { std::string err = "An environment was provided a subtag without the appropriate options. Either 'name' or 'mover' must be specified."; - throw utility::excn::EXCN_RosettaScriptsOption( err ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err ); } moves::Movers_map::const_iterator mv_it = movers.find( mover_name ); @@ -156,7 +156,7 @@ moves::MoverOP find_mover( utility::tag::TagCOP tag, return mv_it->second; } else { std::string err = "The mover " + mover_name + " could not be found. Check your spelling in the xml script."; - throw utility::excn::EXCN_RosettaScriptsOption( err ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err ); } } @@ -181,10 +181,10 @@ void EnvMover::parse_subtag( utility::tag::TagCOP tag, } else { std::ostringstream err; err << "The Environment cannot be used with the tag '" << *tag << "'."; - throw utility::excn::EXCN_RosettaScriptsOption( err.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err.str() ); } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_RosettaScriptsOption( "In Environment '" + get_name() + "': " + e.msg() ); + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "In Environment '" + get_name() + "': " + e.msg() ); } } @@ -192,7 +192,7 @@ void EnvMover::add_apply_mover( protocols::moves::MoverOP mover_in ) { if ( !mover_in ) { std::ostringstream ss; ss << "Mover '" << this->get_name() << "' recieved a null pointer in " << __FUNCTION__ << "."; - throw utility::excn::EXCN_NullPointer( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, ss.str() ); } movers_->add_mover( mover_in ); } @@ -201,7 +201,7 @@ void EnvMover::add_registered_mover( protocols::moves::MoverOP mover_in ) { if ( !mover_in ) { std::ostringstream ss; ss << "Mover '" << this->get_name() << "' recieved a null pointer in " << __FUNCTION__ << "."; - throw utility::excn::EXCN_NullPointer( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, ss.str() ); } reg_only_movers_.insert( mover_in ); } diff --git a/source/src/protocols/environment/Environment.cc b/source/src/protocols/environment/Environment.cc index 28b0fa7597..324d5a4b41 100644 --- a/source/src/protocols/environment/Environment.cc +++ b/source/src/protocols/environment/Environment.cc @@ -97,7 +97,7 @@ void Environment::register_mover( moves::MoverOP mover ){ << "' is not a ClientMover or a MoverContainer, and thus cannot be used inside an BrokeredEnvironment. " << "If you're sure you want to include this mover, set the option 'allow_pure_movers' to true. " << "This will cause the Environment to ignore Environment-incompatible movers during registration."; - throw utility::excn::EXCN_BadInput( err.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err.str() ); } } @@ -137,7 +137,7 @@ core::pose::Pose Environment::end( core::pose::Pose const & pose ){ if ( !conf ) { tr.Error << "Environment::end recieved a pose that contains an unprotcted Conformation." << std::endl; - throw utility::excn::EXCN_BadInput( "Nonprotected pose came in to Environment::end" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Nonprotected pose came in to Environment::end" ); } core::pose::Pose new_pose = pose; @@ -268,7 +268,7 @@ void Environment::auto_cut( bool setting ){ std::ostringstream ss; ss << "The Environment '" << name() << "' was asked to set auto_cut to " << setting << ", but broking was already completed." << std::endl; - throw utility::excn::EXCN_Msg_Exception( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, ss.str() ); } bAutoCut_ = setting; } @@ -278,7 +278,7 @@ void Environment::inherit_cuts( bool setting ) { std::ostringstream ss; ss << "The Environment '" << name() << "' was asked to set inherit_cuts to " << setting << ", but broking was already completed." << std::endl; - throw utility::excn::EXCN_Msg_Exception( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, ss.str() ); } bInheritCuts_ = setting; } @@ -289,7 +289,7 @@ void Environment::allow_pure_movers( bool setting ) { std::ostringstream ss; ss << "The Environment '" << name() << "' was asked to set allow_pure_movers to " << setting << ", but broking was already completed." << std::endl; - throw utility::excn::EXCN_Msg_Exception( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, ss.str() ); } bAllowPureMovers_ = setting; } diff --git a/source/src/protocols/environment/ProtectedConformation.cc b/source/src/protocols/environment/ProtectedConformation.cc index 008b6882e5..a16836627a 100644 --- a/source/src/protocols/environment/ProtectedConformation.cc +++ b/source/src/protocols/environment/ProtectedConformation.cc @@ -97,7 +97,7 @@ EnvironmentCAP ProtectedConformation::environment() const { if ( environment_exists_ ) { return env_; } else { - throw utility::excn::EXCN_NullPointer( "ProtectedEnvironment asked for Environment pointer after environment has already been destroyed/gone out of scope." ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, "ProtectedEnvironment asked for Environment pointer after environment has already been destroyed/gone out of scope." ); } } @@ -400,7 +400,7 @@ ProtectedConformation::replace_residue_sandbox( ss << "Residue replacement of residue " << residue( seqpos ).name3() << seqpos << " (" << residue( seqpos ).natoms() << " atoms) failed because the input residue (" << new_rsd->name3() << ", " << new_rsd->natoms() << " atoms) had a different identity than the current residue."; - throw EXCN_Env_Security_Exception( ss.str(), get_mover_name( unlocks_ ), environment() ); + throw CREATE_EXCEPTION(EXCN_Env_Security_Exception, ss.str(), get_mover_name( unlocks_ ), environment() ); } else if ( new_rsd->natoms() != this->residue( seqpos ).natoms() ) { new_rsd = match_variants( seqpos, *new_rsd ); @@ -418,7 +418,7 @@ ProtectedConformation::replace_residue_sandbox( << in_rsd.type() << std::endl; if ( tr.Debug.visible() ) { tr.Debug << ss.str() << std::endl; } - throw EXCN_Env_Security_Exception( ss.str(), get_mover_name( unlocks_ ), environment() ); + throw CREATE_EXCEPTION(EXCN_Env_Security_Exception, ss.str(), get_mover_name( unlocks_ ), environment() ); } } @@ -439,7 +439,7 @@ ProtectedConformation::replace_residue_sandbox( << new_rsd->name3() << " (" << new_rsd->natoms() << " failed" << ": dofs were created or destroyed during replacement (old size: " << old_dofs.size() << "; new size: " << new_dofs.size() << ")" << std::endl; - throw EXCN_Env_Security_Exception( ss.str(), get_mover_name( unlocks_ ), environment() ); + throw CREATE_EXCEPTION(EXCN_Env_Security_Exception, ss.str(), get_mover_name( unlocks_ ), environment() ); } for ( auto it = old_dofs.begin(); @@ -636,7 +636,7 @@ ProtectedConformation::fail_verification( std::string const& mod_type ) const { core::environment::DofPassportCOP pass = unlocks_.empty() ? nullptr : unlocks_.top(); - throw EXCN_Env_Security_Exception( id, pass, mod_type, *this, get_mover_name( unlocks_ ), environment() ); + throw CREATE_EXCEPTION(EXCN_Env_Security_Exception, id, pass, mod_type, *this, get_mover_name( unlocks_ ), environment() ); } // ALWAYS-FAILING SECURITY OVERLOADS diff --git a/source/src/protocols/environment/ScriptCM.cc b/source/src/protocols/environment/ScriptCM.cc index 237f847473..478931ae8f 100644 --- a/source/src/protocols/environment/ScriptCM.cc +++ b/source/src/protocols/environment/ScriptCM.cc @@ -119,7 +119,7 @@ void ScriptCM::parse_my_tag( utility::tag::TagCOP tag, if ( mover_map.find( client_name ) != mover_map.end() ) { set_client( mover_map.find( client_name )->second ); } else { - throw utility::excn::EXCN_RosettaScriptsOption( "Undefined mover '"+client_name+"'." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Undefined mover '"+client_name+"'." ); } } else if ( claims::EnvClaim::is_claim( subtag->getName() ) ) { tr.Debug << " Interpreting tag with name " << subtag->getName() << " as new claim." << std::endl; @@ -141,7 +141,7 @@ void ScriptCM::set_client( moves::MoverOP mover_in ) { moves::MoveMapMoverOP mover_ptr = utility::pointer::dynamic_pointer_cast< moves::MoveMapMover > ( mover_in ); if ( !mover_ptr ) { - throw utility::excn::EXCN_RosettaScriptsOption( "The "+mover_in->type()+" named '"+mover_in->get_name()+ + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The "+mover_in->type()+" named '"+mover_in->get_name()+ "' doesn't implement MoveMapMover and can't be used by the ScriptCM." ); } diff --git a/source/src/protocols/environment/claims/EnvClaim.cc b/source/src/protocols/environment/claims/EnvClaim.cc index 8514b338b6..8936d3183d 100644 --- a/source/src/protocols/environment/claims/EnvClaim.cc +++ b/source/src/protocols/environment/claims/EnvClaim.cc @@ -63,7 +63,7 @@ EnvClaimOP EnvClaim::make_claim( std::string const& name, else if ( name == "XYZClaim" ) return EnvClaimOP( new XYZClaim( owner, tag, datamap ) ); else { tr << "NOTE: The VrtResClaim is now called VirtResClaim. Please alter your scripts accordingly." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "'" + name + "' is not a known EnvClaim type." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'" + name + "' is not a known EnvClaim type." ); } } @@ -179,7 +179,7 @@ ControlStrength EnvClaim::parse_ctrl_str( std::string const& str ) const { } else if ( lower == "exclusive" ) { return EXCLUSIVE; } else { - throw utility::excn::EXCN_BadInput( "The initialization strength '" + str + + throw CREATE_EXCEPTION(utility::excn::BadInput, "The initialization strength '" + str + "' is not recognized." ); } } @@ -200,7 +200,7 @@ void EnvClaim::annotate( core::pose::Pose const& pose, core::environment::Sequen try{ ann->add_seq_label( label, trues ); - } catch ( utility::excn::EXCN_KeyError& e ) { + } catch ( utility::excn::KeyError& e ) { std::ostringstream ss; ss << "While " << *this << " was annotating the pose for broking, the " << selector->get_name() << "Selector produced a conflicting residue selection."; @@ -222,7 +222,7 @@ void EnvClaim::queue_for_annotation( std::string const& label, ResidueSelectorCO if ( selector->get_name() == selector_list_[label]->get_name() ) { ss << " They aren't the same ResidueSelector."; // Make sure error is clear that selector-sameness has be checked already. } - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } } diff --git a/source/src/protocols/environment/claims/EnvLabelSelector.cc b/source/src/protocols/environment/claims/EnvLabelSelector.cc index 0e0865fa85..d2d78471b0 100644 --- a/source/src/protocols/environment/claims/EnvLabelSelector.cc +++ b/source/src/protocols/environment/claims/EnvLabelSelector.cc @@ -112,7 +112,7 @@ void EnvLabelSelector::parse_my_tag( utility::tag::TagCOP, basic::datacache::DataMap & ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Not to be used in RosettaScripts. For legacy compatibility only." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Not to be used in RosettaScripts. For legacy compatibility only." ); } void EnvLabelSelector::set_local_positions( LocalPositions const& positions_in ){ diff --git a/source/src/protocols/environment/claims/JumpClaim.cc b/source/src/protocols/environment/claims/JumpClaim.cc index 03f3c73697..772caaa6e2 100644 --- a/source/src/protocols/environment/claims/JumpClaim.cc +++ b/source/src/protocols/environment/claims/JumpClaim.cc @@ -251,7 +251,7 @@ void JumpClaim::validate() const { if ( pos1() == pos2() ) { std::ostringstream ss; ss << this << " tried to build a jump to *and* from " << pos1(); - throw utility::excn::EXCN_RangeError( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, ss.str() ); } } diff --git a/source/src/protocols/environment/claims/TorsionClaim.cc b/source/src/protocols/environment/claims/TorsionClaim.cc index def99058f6..b2a16fa6a9 100644 --- a/source/src/protocols/environment/claims/TorsionClaim.cc +++ b/source/src/protocols/environment/claims/TorsionClaim.cc @@ -185,13 +185,13 @@ void TorsionClaim::yield_elements( core::pose::Pose const & pose, DOFElements& e void TorsionClaim::strength( ControlStrength const& c_str, ControlStrength const& i_str ){ if ( c_str > EXCLUSIVE || c_str < DOES_NOT_CONTROL ) { - throw utility::excn::EXCN_RangeError( "Sampling ControlStrengths are limited to values between DOES_NOT_CONTROL and EXCLUSIVE" ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "Sampling ControlStrengths are limited to values between DOES_NOT_CONTROL and EXCLUSIVE" ); } else { c_str_ = c_str; } if ( i_str > EXCLUSIVE || i_str < DOES_NOT_CONTROL ) { - throw utility::excn::EXCN_RangeError( "Initialization ControlStrengths are limited to values between DOES_NOT_INITIALIZE and EXCLUSIVE" ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "Initialization ControlStrengths are limited to values between DOES_NOT_INITIALIZE and EXCLUSIVE" ); } else { i_str_ = i_str; } diff --git a/source/src/protocols/environment/claims/XYZClaim.cc b/source/src/protocols/environment/claims/XYZClaim.cc index df57a54bf2..b1de1f0118 100644 --- a/source/src/protocols/environment/claims/XYZClaim.cc +++ b/source/src/protocols/environment/claims/XYZClaim.cc @@ -181,13 +181,13 @@ ControlStrength const& XYZClaim::init_strength() const { void XYZClaim::strength( ControlStrength const& c_str, ControlStrength const& i_str ){ if ( c_str > EXCLUSIVE || c_str < DOES_NOT_CONTROL ) { - throw utility::excn::EXCN_RangeError( "Sampling ControlStrengths are limited to values between DOES_NOT_CONTROL and EXCLUSIVE" ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "Sampling ControlStrengths are limited to values between DOES_NOT_CONTROL and EXCLUSIVE" ); } else { c_str_ = c_str; } if ( i_str > EXCLUSIVE || i_str < DOES_NOT_CONTROL ) { - throw utility::excn::EXCN_RangeError( "Initialization ControlStrengths are limited to values between DOES_NOT_INITIALIZE and EXCLUSIVE" ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "Initialization ControlStrengths are limited to values between DOES_NOT_INITIALIZE and EXCLUSIVE" ); } else { i_str_ = i_str; } diff --git a/source/src/protocols/enzdes/AddorRemoveCsts.cc b/source/src/protocols/enzdes/AddorRemoveCsts.cc index b3aeeb8af2..c6cd5a6820 100644 --- a/source/src/protocols/enzdes/AddorRemoveCsts.cc +++ b/source/src/protocols/enzdes/AddorRemoveCsts.cc @@ -125,7 +125,7 @@ AddOrRemoveMatchCsts::parse_my_tag( utility::tag::TagCOP tag, basic::datacache:: else if ( cst_instruction == "add_pregenerated" ) cst_action_ = ADD_PREGENERATED; else if ( cst_instruction == "remove" ) cst_action_ = REMOVE; else { - throw utility::excn::EXCN_RosettaScriptsOption("Illegal or no value for cst_instruction in xml tag given. Has to be either 'add_new', 'add_pregenerated', or 'remove'."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Illegal or no value for cst_instruction in xml tag given. Has to be either 'add_new', 'add_pregenerated', or 'remove'."); } keep_covalent_ = tag->getOption( "keep_covalent", 0 ); diff --git a/source/src/protocols/enzdes/EnzFilters.cc b/source/src/protocols/enzdes/EnzFilters.cc index 40239a0f0c..077130686c 100644 --- a/source/src/protocols/enzdes/EnzFilters.cc +++ b/source/src/protocols/enzdes/EnzFilters.cc @@ -736,7 +736,7 @@ RepackWithoutLigandFilter::parse_my_tag( TagCOP const tag, basic::datacache::Dat } // 21-05-2013 PG if ( !calc_dE_ && target_res_ != nullptr && cstid_list_.empty() && !rms_all_rpked_ ) { - throw utility::excn::EXCN_RosettaScriptsOption(" NO RESIDUES HAVE BEEN SPECIFIED FOR THE RMSD CALCULATION"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " NO RESIDUES HAVE BEEN SPECIFIED FOR THE RMSD CALCULATION"); } TR<<" Defined RepackWithoutLigandFilter "<< std::endl; } @@ -848,7 +848,7 @@ void EnzdesScorefileFilter::parse_my_tag( utility::tag::TagCOP tag , basic::datacache::DataMap &, Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( tag->hasOption("requirements") ) reqfile_name_ = tag->getOption( "requirements","" ); - else throw utility::excn::EXCN_RosettaScriptsOption("For EnzdesScorefileFilter, a requirements file needs to be specified in the tag."); + else throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "For EnzdesScorefileFilter, a requirements file needs to be specified in the tag."); this->initialize_value_evaluators_from_file( reqfile_name_ ); } @@ -1328,7 +1328,7 @@ ResidueConformerFilter::apply( core::pose::Pose const & pose ) const if ( desired_conformer_ == 0 ) { TR << "ResidueConformerFilter did not have a desired conformer set. Apply gets passed by default, conformer in pose is " << current_conformer << std::endl; return true; - //throw utility::excn::EXCN_RosettaScriptsOption("For ResidueConformerFilter, desired conformer needs to be set if it is used in actual filtering."); + //throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "For ResidueConformerFilter, desired conformer needs to be set if it is used in actual filtering."); } if ( current_conformer == desired_conformer_ ) return true; else return false; @@ -1356,7 +1356,7 @@ ResidueConformerFilter::parse_my_tag(utility::tag::TagCOP tag , basic::datacache if ( tag->hasOption("restype") ) { std::string resname = tag->getOption( "restype","" ); restype_ = core::chemical::ChemicalManager::get_instance()->residue_type_set( core::chemical::FA_STANDARD )->name_mapOP( resname ); - } else throw utility::excn::EXCN_RosettaScriptsOption("For ResidueConformerFilter, the desired residue type needs to be specified."); + } else throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "For ResidueConformerFilter, the desired residue type needs to be specified."); if ( tag->hasOption("relevant_atoms") ) { utility::vector1< std::string > const atom_vec( utility::string_split( tag->getOption< std::string >("relevant_atoms", "" ), ',' ) ); @@ -1404,7 +1404,7 @@ ResidueConformerFilter::get_current_conformer( core::pose::Pose const & pose ) c if ( pose.residue( i ).name3() == restype_->name3() ) possible_seqpos.push_back( i ); } if ( possible_seqpos.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("In ResidueConformerFilter, no residue of the desired type was found in the pose."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "In ResidueConformerFilter, no residue of the desired type was found in the pose."); } if ( possible_seqpos.size() > 1 ) { std::cerr <<"In ResidueConformerFilter, more than one possible seqpos to check has been found. Taking only the first one (" << possible_seqpos[1] <<"), but this is probably not what you wanted." << std::endl; diff --git a/source/src/protocols/features/AtomAtomPairFeatures.cc b/source/src/protocols/features/AtomAtomPairFeatures.cc index d45bfebe0d..4bc8e08d8a 100644 --- a/source/src/protocols/features/AtomAtomPairFeatures.cc +++ b/source/src/protocols/features/AtomAtomPairFeatures.cc @@ -204,7 +204,7 @@ AtomAtomPairFeatures::parse_my_tag( max_dist_ = tag->getOption("max_dist", 10.0); nbins_ = tag->getOption("nbins", 15); if ( nbins_ < 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption("The parameter 'nbins' must be an integer greater than 0."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The parameter 'nbins' must be an integer greater than 0."); } } diff --git a/source/src/protocols/features/BetaTurnDetection.cc b/source/src/protocols/features/BetaTurnDetection.cc index 9a1263c2db..33b261d8fd 100644 --- a/source/src/protocols/features/BetaTurnDetection.cc +++ b/source/src/protocols/features/BetaTurnDetection.cc @@ -30,7 +30,7 @@ using std::map; using core::Size; using core::Real; using core::pose::Pose; -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; using utility::vector1; BetaTurnDetection::BetaTurnDetection() : @@ -217,7 +217,7 @@ void BetaTurnDetection::validate_ramachandran_hash( std::string & rama_hash ) co string single_residue_rama_hash( 1, toupper( * it ) ); if ( ! get_valid_ramachandran_hashes().contains( single_residue_rama_hash ) ) { - throw EXCN_Msg_Exception( "The Ramachandran hash '" + rama_hash + "' contains '" + string( 1, * it ) + ",' which is not valid. " + + throw CREATE_EXCEPTION(Exception, "The Ramachandran hash '" + rama_hash + "' contains '" + string( 1, * it ) + ",' which is not valid. " + "Valid Ramachandran hashes are 'A', 'B', 'L' and 'E' for trans peptide bonds, and 'a', 'b', 'l' and 'e' for cis peptide bonds." ); } @@ -225,7 +225,7 @@ void BetaTurnDetection::validate_ramachandran_hash( std::string & rama_hash ) co } if ( ! get_conformation_to_turn_type_map().count( cis_trans_hash ) ) { - throw EXCN_Msg_Exception( "The Ramachandran hash '" + rama_hash + + throw CREATE_EXCEPTION(Exception, "The Ramachandran hash '" + rama_hash + "' is not recognized as a valid beta-turn type. " + "The attempt to create a generic hash based on the omega dihedral angle resulted in '" + cis_trans_hash + ",' which is also not recognized as a valid beta-turn type." diff --git a/source/src/protocols/features/DatabaseFilters.cc b/source/src/protocols/features/DatabaseFilters.cc index 98e4cfd050..b1d07064ab 100644 --- a/source/src/protocols/features/DatabaseFilters.cc +++ b/source/src/protocols/features/DatabaseFilters.cc @@ -43,7 +43,7 @@ //Auto Headers -#include +#include namespace protocols { namespace features { @@ -104,7 +104,7 @@ WriteDeletePair get_write_delete_pair( try { score_type_id = get_score_type_id_from_score_term(db_session,protocol_id,score_term); - }catch(utility::excn::EXCN_Base &) + }catch (utility::excn::Exception &) { TR << "no score type term, looking in the job data map" <> value; return value; } else { - throw utility::excn::EXCN_Msg_Exception("No result found"); + throw CREATE_EXCEPTION(utility::excn::Exception, "No result found"); } } @@ -106,7 +106,7 @@ core::Size get_score_type_id_from_score_term( statement.bind(2,score_term); try{ return get_something_from_database(statement, core::Size()); - }catch(utility::excn::EXCN_Msg_Exception &){ + }catch (utility::excn::Exception &){ throw; //utility_exit_with_message("No score_term "+score_term+" with protocol_id "+utility::to_string(protocol_id)); } @@ -356,7 +356,7 @@ get_struct_id_with_nth_lowest_score_from_job_data( try{ return get_something_from_database(statement, StructureID()); - }catch(utility::excn::EXCN_Msg_Exception){ + }catch (utility::excn::Exception){ std::stringstream message; message << "No nth lowest " << score_term << " with input_tag " << input_tag << ", where n=" <" << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/FeaturesReporterFactory.cc b/source/src/protocols/features/FeaturesReporterFactory.cc index e049b27f2d..428bf9175e 100644 --- a/source/src/protocols/features/FeaturesReporterFactory.cc +++ b/source/src/protocols/features/FeaturesReporterFactory.cc @@ -131,8 +131,8 @@ FeaturesReporterFactory::define_features_reporter_xml_schema_group( utility::tag features_reporter_xml_schema_group_name(), & complex_type_name_for_features_reporter, xsd ); - } catch( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for FeaturesReporter from FeaturesReporterFactory; offending class" + } catch( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for FeaturesReporter from FeaturesReporterFactory; offending class" " must call protocols::features::complex_type_name_for_features_reporter when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/features/HBondFeatures.cc b/source/src/protocols/features/HBondFeatures.cc index d3b6877f32..366f9dc07d 100644 --- a/source/src/protocols/features/HBondFeatures.cc +++ b/source/src/protocols/features/HBondFeatures.cc @@ -625,7 +625,7 @@ HBondFeatures::parse_my_tag( << "Available hbond definition types are:" << endl << "\t'energy' => A polar-polar contact is an hbond when energy is below the definition_threshold." << endl << " 'AHdist' => A polar-polar contact is an hbond when the Acceptor-Hydrogen distance is less than the definition_threshold." << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } definition_threshold_ = diff --git a/source/src/protocols/features/HBondParameterFeatures.cc b/source/src/protocols/features/HBondParameterFeatures.cc index c31c26e239..faa585ffb4 100644 --- a/source/src/protocols/features/HBondParameterFeatures.cc +++ b/source/src/protocols/features/HBondParameterFeatures.cc @@ -130,7 +130,7 @@ HBondParameterFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'scorefxn' tag:" << endl << endl << " " << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/InterfaceDdGMover.cc b/source/src/protocols/features/InterfaceDdGMover.cc index c6974e4f11..62ec9bab0d 100644 --- a/source/src/protocols/features/InterfaceDdGMover.cc +++ b/source/src/protocols/features/InterfaceDdGMover.cc @@ -76,19 +76,19 @@ InterfaceDdGMover::parse_my_tag( // First, check for errors and throw exception if ( ( tag->hasOption("chain_num") || tag->hasOption("chain_name") ) && tag->hasOption("jump") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you can specify either chains or jump in the ddG mover, but not both"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you can specify either chains or jump in the ddG mover, but not both"); } if ( tag->hasOption("chain_num") && tag->hasOption("chain_name") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you can specify chains either by number or by name, but not both"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you can specify chains either by number or by name, but not both"); } if ( core::pose::symmetry::is_symmetric( pose ) && ( tag->hasOption("chain_num") || tag->hasOption("chain_name") || tag->hasOption("jump") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "you can't specify chains or jumps when using a symmetric pose" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you can't specify chains or jumps when using a symmetric pose" ); } if ( tag->hasOption("mut_ref_savepose_mover") && tag->hasOption("wt_ref_savepose_mover") ) { - throw utility::excn::EXCN_RosettaScriptsOption( "you can only specify either the mutant reference pose (SavePoseMover) or the wildtype reference pose (SavePoseMover) in this tag. The undefined pose will be set as the pose given to this mover in the apply function." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you can only specify either the mutant reference pose (SavePoseMover) or the wildtype reference pose (SavePoseMover) in this tag. The undefined pose will be set as the pose given to this mover in the apply function." ); } chain_ids_.clear(); // Useful if parse_my_tag is called multiple times in unit tests @@ -222,7 +222,7 @@ InterfaceDdGMover::unbind ( } } else { // We have no information about chains or jumps to move, so let's not try and unbind - throw utility::excn::EXCN_BadInput( "InterfaceDdGMover needs to have chains (numbers or names) or jumps defined to move" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "InterfaceDdGMover needs to have chains (numbers or names) or jumps defined to move" ); } } @@ -359,7 +359,7 @@ InterfaceDdGMover::get_chain_ids() const { void InterfaceDdGMover::add_chain_id( core::Size chain_id, core::pose::Pose const & pose ) { if ( ! core::pose::has_chain( chain_id, pose ) ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "InterfaceDdGMover cannot add chain_id " + utility::to_string( chain_id ) + " to pose; out of range" ); } @@ -372,7 +372,7 @@ InterfaceDdGMover::add_chain_id( core::Size chain_id, core::pose::Pose const & p void InterfaceDdGMover::add_chain_name( std::string chain_name, core::pose::Pose const & pose ) { if ( ! core::pose::has_chain( chain_name, pose ) ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "InterfaceDdGMover cannot add chain_name " + chain_name + " to pose; out of range" ); } @@ -386,7 +386,7 @@ void InterfaceDdGMover::add_jump_id( core::Size jump, core::pose::Pose const & pose ) { if ( jump > pose.num_jump() || jump < 1 ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "InterfaceDdGMover cannot add jump " + utility::to_string( jump ) + " to pose; out of range" ); } diff --git a/source/src/protocols/features/LoopAnchorFeatures.cc b/source/src/protocols/features/LoopAnchorFeatures.cc index 34e448428b..40b1f0c765 100644 --- a/source/src/protocols/features/LoopAnchorFeatures.cc +++ b/source/src/protocols/features/LoopAnchorFeatures.cc @@ -209,7 +209,7 @@ LoopAnchorFeatures::parse_my_tag( error_msg << "The max_loop_length, '" << max_loop_length_ << "'," << " must be longer than the min_loop_length, '" << min_loop_length_ << "'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/ReportToDB.cc b/source/src/protocols/features/ReportToDB.cc index 5d58399a14..8d738662fa 100644 --- a/source/src/protocols/features/ReportToDB.cc +++ b/source/src/protocols/features/ReportToDB.cc @@ -210,9 +210,7 @@ ReportToDB::ReportToDB( features_reporters_(), initialized( false ) { - if ( batch_name == "" ) { - utility::excn::EXCN_BadInput("Failed to create ReportToDB instance because the batch name must not be ''."); - } + if ( batch_name == "" ) throw CREATE_EXCEPTION(utility::excn::BadInput, "Failed to create ReportToDB instance because the batch name must not be ''."); initialize_reporters(); } @@ -246,7 +244,7 @@ ReportToDB::ReportToDB( initialized( false ) { if ( batch_name == "" ) { - utility::excn::EXCN_BadInput("Failed to create ReportToDB instance because the batch name must not be ''."); + CREATE_EXCEPTION(utility::excn::BadInput, "Failed to create ReportToDB instance because the batch name must not be ''."); } initialize_reporters(); @@ -303,7 +301,7 @@ ReportToDB::set_batch_name( std::string const & name ) { if ( name == "" ) { - utility::excn::EXCN_BadInput("Setting the batch name for a ReporToDB instance to '' is not allowed."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Setting the batch name for a ReporToDB instance to '' is not allowed."); } batch_name_ = name; @@ -496,8 +494,7 @@ ReportToDB::parse_relevant_residues_mode_tag_item( } else if ( rel_res_mode == "IMPLICIT" ) { relevant_residues_mode_ = RelevantResiduesMode::Inclusive; } else { - throw utility::excn::EXCN_RosettaScriptsOption - ( "Bad value for relevant_residues_mode: '" + rel_res_mode + "'. It must be either 'EXPLICIT' or 'IMPLICIT' (case insensitive). This indicates which features should be reported given the relevant residue specification (determined by the packable residues in the given task operation:\n\tEXCLUSIVE: All residues in a feature must be specified as 'relevant'. (DEFAULT)\n\tINCLUSIVE: At least one residue in the the feature must be specified as 'relevant' to be reported."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Bad value for relevant_residues_mode: '" + rel_res_mode + "'. It must be either 'EXPLICIT' or 'IMPLICIT' (case insensitive). This indicates which features should be reported given the relevant residue specification (determined by the packable residues in the given task operation:\n\tEXCLUSIVE: All residues in a feature must be specified as 'relevant'. (DEFAULT)\n\tINCLUSIVE: At least one residue in the the feature must be specified as 'relevant' to be reported."); } } @@ -512,19 +509,19 @@ ReportToDB::parse_my_tag( Pose const & pose ) { if ( tag->hasOption("db") ) { - throw utility::excn::EXCN_RosettaScriptsOption("The 'db' tag has been deprecated. Please use 'database_name' instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The 'db' tag has been deprecated. Please use 'database_name' instead."); } if ( tag->hasOption("db_mode") ) { - throw utility::excn::EXCN_RosettaScriptsOption("The 'db_mode' tag has been deprecated. Please use 'database_mode' instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The 'db_mode' tag has been deprecated. Please use 'database_mode' instead."); } if ( tag->hasOption("separate_db_per_mpi_process") ) { - throw utility::excn::EXCN_RosettaScriptsOption("The 'parse_separate_db_per_mpi_process' tag has been deprecated. Please use 'database_parse_separate_db_per_mpi_process' instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The 'parse_separate_db_per_mpi_process' tag has been deprecated. Please use 'database_parse_separate_db_per_mpi_process' instead."); } if ( tag->hasOption("sample_source") ) { - throw utility::excn::EXCN_RosettaScriptsOption("The 'sample_source' tag has been deprecated. Please use 'batch_description' instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The 'sample_source' tag has been deprecated. Please use 'batch_description' instead."); } // Name of output features database: @@ -533,8 +530,7 @@ ReportToDB::parse_my_tag( if ( tag->hasOption("resource_description") ) { std::string resource_description = tag->getOption("resource_description"); if ( ! basic::resource_manager::ResourceManager::get_instance()->has_resource_with_description( resource_description ) ) { - throw utility::excn::EXCN_Msg_Exception - ( "You specified a resource_description of " + resource_description + + throw CREATE_EXCEPTION(utility::excn::Exception, "You specified a resource_description of " + resource_description + " for ReportToDB, but the ResourceManager doesn't have a resource with that description" ); } db_session_ = basic::resource_manager::get_resource< utility::sql_database::session >( resource_description ); @@ -599,11 +595,11 @@ ReportToDB::parse_my_tag( feature_tag, data, filters, movers, pose)); features_reporter->set_relevant_residues_mode(relevant_residues_mode_); add_features_reporter(features_reporter); - } catch( utility::excn::EXCN_Base const & e ){ + } catch (utility::excn::Exception const & e ){ //TR.Error << "Please include only tags with name 'feature' as subtags of ReportToDB" << endl; TR.Error << "Tag with name '" << feature_tag->getName() << "' is invalid" << endl; TR.Error << " Specific error message: " << e << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Invalid FeaturesReporter tag."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Invalid FeaturesReporter tag."); } @@ -646,7 +642,7 @@ ReportToDB::check_features_reporter_dependencies( // Theoretically this could be thrown in a non-RosettaScripts context, // but that would be bad coding on the C++ developer's part - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } } @@ -819,7 +815,7 @@ ReportToDB::report_structure_features() const { << "\tbatch_id: '" << batch_id_ << "'" << endl << "Error Message:" << endl << error.what() << endl; utility_exit_with_message(err_msg.str()); - } catch (utility::excn::EXCN_Base & error){ + } catch (utility::excn::Exception & error){ if ( use_transactions_ ) { db_session_->rollback(); } diff --git a/source/src/protocols/features/ResidueGridScoresFeatures.cc b/source/src/protocols/features/ResidueGridScoresFeatures.cc index c27ccfd9c0..636f901ebc 100644 --- a/source/src/protocols/features/ResidueGridScoresFeatures.cc +++ b/source/src/protocols/features/ResidueGridScoresFeatures.cc @@ -177,7 +177,7 @@ void ResidueGridScoresFeatures::parse_my_tag( grid_set_prototype_ = protocols::qsar::scoring_grid::parse_grid_set_from_tag(tag, datamap); if ( !tag->hasOption("chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("The ResidueGridScoresFeatures reporter requires a Chain tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The ResidueGridScoresFeatures reporter requires a Chain tag"); } diff --git a/source/src/protocols/features/ResidueTotalScoresFeatures.cc b/source/src/protocols/features/ResidueTotalScoresFeatures.cc index ceeb500c57..499734ba1c 100644 --- a/source/src/protocols/features/ResidueTotalScoresFeatures.cc +++ b/source/src/protocols/features/ResidueTotalScoresFeatures.cc @@ -165,7 +165,7 @@ ResidueTotalScoresFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'scorefxn' tag:" << endl << endl << " " << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/RotamerBoltzmannWeightFeatures.cc b/source/src/protocols/features/RotamerBoltzmannWeightFeatures.cc index 98cdfd028e..52ea3abd5a 100644 --- a/source/src/protocols/features/RotamerBoltzmannWeightFeatures.cc +++ b/source/src/protocols/features/RotamerBoltzmannWeightFeatures.cc @@ -151,7 +151,7 @@ RotamerBoltzmannWeightFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'scorefxn' tag:" << endl << endl << " " << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/RotamerRecoveryFeatures.cc b/source/src/protocols/features/RotamerRecoveryFeatures.cc index 41cc55144c..4edf8bba8a 100644 --- a/source/src/protocols/features/RotamerRecoveryFeatures.cc +++ b/source/src/protocols/features/RotamerRecoveryFeatures.cc @@ -165,7 +165,7 @@ RotamerRecoveryFeatures::parse_my_tag( if ( tag->hasOption("mover") || tag->hasOption("mover_name") ) { if ( tag->hasOption("reference_name") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Both 'mover_name' and 'reference_name' were supplied. " "Please specify at most one to indicate which protocols should " "be used to run RotamerRecovery."); @@ -177,14 +177,14 @@ RotamerRecoveryFeatures::parse_my_tag( protocol_ = protocols::rotamer_recovery::RRProtocolOP( new RRProtocolMover(mover) ); } else if ( tag->hasOption("reference_name") ) { if ( tag->hasOption("mover") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Both 'mover' and 'reference_name' were supplied. " "Please specify at most one to indicate which protocols " "should be used to run RotamerRecovery."); } if ( tag->hasOption("mover_name") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Both 'mover_name' and 'reference_name' were supplied. " "Please specify at most one to indicate which protocols " "should be used to run RotamerRecovery."); @@ -193,7 +193,7 @@ RotamerRecoveryFeatures::parse_my_tag( if ( tag->hasOption("protocol") && !tag->getOption("protocol").compare( "RRProtocolReferenceStructure") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Specifying 'reference_name' is only compatible with the " "'RRProtocolReferenceStructure' protocol."); } @@ -206,11 +206,11 @@ RotamerRecoveryFeatures::parse_my_tag( string const & protocol_name(tag->getOption( "protocol", "RRProtocolMinPack")); if ( !protocol_name.compare("RRProtocolMover") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Please specify 'mover_name' with the 'RRProtocolMover' " "rotamer recovery protocol."); } else if ( !protocol_name.compare("RRProtocolReferenceStructure") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Please specify 'reference_name' with 'RRProtocolReferenceStructure' " "rotamer recovery protocol."); } else { @@ -265,7 +265,7 @@ RotamerRecoveryFeatures::parse_my_tag( << " Instead type specified mover '" << report_to_db_name << "'" << " is a mover of type '" << report_to_db->get_name() << "'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(errmsg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, errmsg.str()); } ReportToDBOP report_to_db_ptr( diff --git a/source/src/protocols/features/ScreeningFeatures.cc b/source/src/protocols/features/ScreeningFeatures.cc index 6f30d28008..fb566767c6 100644 --- a/source/src/protocols/features/ScreeningFeatures.cc +++ b/source/src/protocols/features/ScreeningFeatures.cc @@ -157,11 +157,11 @@ ScreeningFeatures::parse_my_tag( { if ( !basic::options::option[basic::options::OptionKeys::in::file::screening_job_file].user() ) { - throw utility::excn::EXCN_BadInput("The ScreeningFeatures reporter is only usable with the ScreeningJobInputter. specify input using -in:file:screening_job_inputter"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "The ScreeningFeatures reporter is only usable with the ScreeningJobInputter. specify input using -in:file:screening_job_inputter"); } if ( !tag->hasOption("chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScreeningFeatures requires the 'chain' tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScreeningFeatures requires the 'chain' tag"); } chain_ = tag->getOption("chain"); @@ -169,11 +169,11 @@ ScreeningFeatures::parse_my_tag( core::Size descriptor_count = 0; for ( utility::tag::TagCOP const & sub_tag : tag->getTags() ) { if ( sub_tag->getName() != "descriptor" ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScreeningFeatures only supports subtags with the name 'descriptor"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScreeningFeatures only supports subtags with the name 'descriptor"); } if ( !sub_tag->hasOption("type") ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScreeningFeatures descriptor subtags require a 'type' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScreeningFeatures descriptor subtags require a 'type' option"); } std::string descriptor_type(sub_tag->getOption("type")); @@ -181,7 +181,7 @@ ScreeningFeatures::parse_my_tag( descriptor_count++; } if ( descriptor_count == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScreeningFeatures requires at least one 'descriptor' subtag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScreeningFeatures requires at least one 'descriptor' subtag"); } } diff --git a/source/src/protocols/features/StructureScoresFeatures.cc b/source/src/protocols/features/StructureScoresFeatures.cc index 72bdd3a25b..0aa6cd2754 100644 --- a/source/src/protocols/features/StructureScoresFeatures.cc +++ b/source/src/protocols/features/StructureScoresFeatures.cc @@ -199,7 +199,7 @@ StructureScoresFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'scorefxn' tag:" << endl << endl << " " << endl; - //throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + //throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/TaskOperationFeatures.cc b/source/src/protocols/features/TaskOperationFeatures.cc index e81291ea5d..3c728ca342 100644 --- a/source/src/protocols/features/TaskOperationFeatures.cc +++ b/source/src/protocols/features/TaskOperationFeatures.cc @@ -197,7 +197,7 @@ TaskOperationFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'task_operations' tag:" << endl << endl << " " << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } // Fill task_factories_, one TaskFactoryCOP per TaskOperator @@ -214,7 +214,7 @@ TaskOperationFeatures::parse_my_tag( // taskop_keys_factories_.insert( // std::pair(*taskop_key, new_task_factory)); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + taskop_key + " not found in DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + taskop_key + " not found in DataMap."); } } } diff --git a/source/src/protocols/features/TotalScoreFeatures.cc b/source/src/protocols/features/TotalScoreFeatures.cc index 52351dfb30..7f377abbac 100644 --- a/source/src/protocols/features/TotalScoreFeatures.cc +++ b/source/src/protocols/features/TotalScoreFeatures.cc @@ -101,7 +101,7 @@ void TotalScoreFeatures::parse_my_tag( << "The " << type_name() << " reporter requires a 'scorefxn' tag:" << endl << endl << " " << endl; - throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); } } diff --git a/source/src/protocols/features/WaterFeatures.cc b/source/src/protocols/features/WaterFeatures.cc index 6b5e31de66..962d1cd82d 100644 --- a/source/src/protocols/features/WaterFeatures.cc +++ b/source/src/protocols/features/WaterFeatures.cc @@ -202,7 +202,7 @@ WaterFeatures::parse_my_tag( // << "The " << type_name() << " reporter requires a 'targets' tag:" << endl // << endl // << " " << endl; - //throw utility::excn::EXCN_RosettaScriptsOption(error_msg.str()); + //throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str()); std::string water_names_list = tag->getOption< std::string >("targets"); utility::vector0< std::string > const water_names( utility::string_split( water_names_list, ',' ) ); for ( auto const & water_name : water_names ) { diff --git a/source/src/protocols/features/strand_assembly/SandwichFeatures.cc b/source/src/protocols/features/strand_assembly/SandwichFeatures.cc index 9720fa04be..b3eb354f24 100644 --- a/source/src/protocols/features/strand_assembly/SandwichFeatures.cc +++ b/source/src/protocols/features/strand_assembly/SandwichFeatures.cc @@ -2230,7 +2230,7 @@ SandwichFeatures::report_features( } // try -catch ( utility::excn::EXCN_Base const & e ) +catch ( utility::excn::Exception const & e ) { std::cout << "caught exception during SandwichFeatures" << e.msg() << std::endl; } // catch diff --git a/source/src/protocols/filters/BasicFilters.cc b/source/src/protocols/filters/BasicFilters.cc index bd0825cb24..2e67b9e98c 100644 --- a/source/src/protocols/filters/BasicFilters.cc +++ b/source/src/protocols/filters/BasicFilters.cc @@ -332,7 +332,7 @@ CompoundFilter::parse_my_tag( else if ( operation == "ANDNOT" ) filter_pair.second = ANDNOT; else if ( operation == "NOT" ) filter_pair.second = NOT; else { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: Boolean operation in tag is undefined." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: Boolean operation in tag is undefined." ); } std::string const filter_name( cmp_tag_ptr->getOption( "filter_name" ) ); @@ -458,7 +458,7 @@ CombinedFilter::parse_my_tag( filter = find_filter->second->clone(); } else { TR.Warning<<"***Filter " << filter_name << " defined for CombinedValue not found in filter_list!!!! ***"<hasOption("testfilter") ) { TR.Error << "In IfThenFilter, If and ELIF require a tesfilter option." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("In IfThenFilter, If and ELIF require a tesfilter option."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "In IfThenFilter, If and ELIF require a tesfilter option."); } FilterOP testfilter = protocols::rosetta_scripts::parse_filter( tag_ptr->getOption( "testfilter" ), filters); bool inverttest = tag_ptr->getOption< bool >( "inverttest", false ); @@ -678,7 +678,7 @@ IfThenFilter::parse_my_tag( } else { TR.Error << "Unknown subtag name in IfThenFilter: " << tagname << std::endl; TR.Error << " Acceptable values are: IF ELIF ELSE" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Unknown subtag name in IfThenFilter: " + tagname ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unknown subtag name in IfThenFilter: " + tagname ); } } TR << "IfThenFilter defined with " << iffilters_.size() << " conditions and " diff --git a/source/src/protocols/filters/FilterFactory.cc b/source/src/protocols/filters/FilterFactory.cc index ae18da22dc..b1c00611f0 100644 --- a/source/src/protocols/filters/FilterFactory.cc +++ b/source/src/protocols/filters/FilterFactory.cc @@ -171,8 +171,8 @@ void FilterFactory::define_filter_xml_schema( utility::tag::XMLSchemaDefinition filter_xml_schema_group_name(), & complex_type_name_for_filter, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for Filters from FilterFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for Filters from FilterFactory; offending class" " must call protocols::filters::complex_type_name_for_filter when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/fldsgn/filters/HelixKinkFilter.cc b/source/src/protocols/fldsgn/filters/HelixKinkFilter.cc index 572f3e6193..a567de3c66 100644 --- a/source/src/protocols/fldsgn/filters/HelixKinkFilter.cc +++ b/source/src/protocols/fldsgn/filters/HelixKinkFilter.cc @@ -210,7 +210,7 @@ HelixKinkFilter::parse_my_tag( if ( tag->hasOption( "blueprint" ) && tag->hasOption( "secstruct" ) ) { std::stringstream msg; msg << "HelixKinkFilter::parse_my_tag(): Both blueprint and secstruct cannot be specified at the same time." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } String const blueprint = tag->getOption( "blueprint", "" ); if ( !blueprint.empty() ) { diff --git a/source/src/protocols/flexpep_docking/FlexPepDockingProtocol.cc b/source/src/protocols/flexpep_docking/FlexPepDockingProtocol.cc index defae8294b..785d896a9b 100644 --- a/source/src/protocols/flexpep_docking/FlexPepDockingProtocol.cc +++ b/source/src/protocols/flexpep_docking/FlexPepDockingProtocol.cc @@ -1772,7 +1772,7 @@ void FlexPepDockingProtocol::parse_my_tag( if ( tag->hasOption( "scorefxn_lowres") ) { std::string const scorefxn_lowres_key( tag->getOption("scorefxn_lowres" ) ); if ( ! data.has( "scorefxns", scorefxn_lowres_key ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_lowres_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_lowres_key + " not found in basic::datacache::DataMap."); } scorefxn_lowres_ = data.get_ptr( "scorefxns", scorefxn_lowres_key ); } diff --git a/source/src/protocols/flxbb/LayerDesignOperation.cc b/source/src/protocols/flxbb/LayerDesignOperation.cc index f10f4ff6e1..f6c900473f 100644 --- a/source/src/protocols/flxbb/LayerDesignOperation.cc +++ b/source/src/protocols/flxbb/LayerDesignOperation.cc @@ -587,13 +587,13 @@ LayerDesignOperation::layer_residues( { auto it = layer_residues_.find( layer_name ); if ( it == layer_residues_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Layer " + layer_name + " was not found when trying to determine valid residue types." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Layer " + layer_name + " was not found when trying to determine valid residue types." ); } debug_assert( it != layer_residues_.end() ); auto it2 = it->second.find( ss_name ); if ( it2 == it->second.end() ) { - throw utility::excn::EXCN_Msg_Exception( "SS type " + ss_name + " in layer " + layer_name + " was not found when trying to determine valid residue types." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SS type " + ss_name + " in layer " + layer_name + " was not found when trying to determine valid residue types." ); } debug_assert( it2 != it->second.end() ); @@ -608,13 +608,13 @@ LayerDesignOperation::layer_nc_residues( { auto it = layer_nc_residues_.find( layer_name ); if ( it == layer_nc_residues_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Layer " + layer_name + " was not found when trying to determine valid residue types." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Layer " + layer_name + " was not found when trying to determine valid residue types." ); } debug_assert( it != layer_nc_residues_.end() ); auto it2 = it->second.find( ss_name ); if ( it2 == it->second.end() ) { - throw utility::excn::EXCN_Msg_Exception( "SS type " + ss_name + " in layer " + layer_name + " was not found when trying to determine valid ncaa residue types." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SS type " + ss_name + " in layer " + layer_name + " was not found when trying to determine valid ncaa residue types." ); } debug_assert( it2 != it->second.end() ); @@ -629,7 +629,7 @@ LayerDesignOperation::copy_layer_residues( { LayerResidues::const_iterator src = layer_residues_.find( src_layer ); if ( src == layer_residues_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "LayerDesign: Layer named " + src_layer + " does not exist when trying to copy residue information to layer " + dest_layer ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LayerDesign: Layer named " + src_layer + " does not exist when trying to copy residue information to layer " + dest_layer ); } auto lr = layer_residues_.find( dest_layer ); @@ -1284,7 +1284,7 @@ LayerDesignOperation::parse_layer_tag( utility::tag::TagCOP layer_tag, DataMap & TaskOperationOP task = TaskOperationFactory::get_instance()->newTaskOperation( task_op_type, datamap, task_tag ); task_ops.push_back( task ); } else { - utility::excn::EXCN_Msg_Exception( "Illegal subtag \"" + task_op_type + "\" of CombinedTasks subtag of CombinedTasks. Expected \"all\", \"Helix\", \"Strand\", \"Loop\" or a valid TaskOperation name" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal subtag \"" + task_op_type + "\" of CombinedTasks subtag of CombinedTasks. Expected \"all\", \"Helix\", \"Strand\", \"Loop\" or a valid TaskOperation name" ); } } CombinedTaskOperationOP comb( new CombinedTaskOperation( task_ops ) ); @@ -1311,7 +1311,7 @@ LayerDesignOperation::parse_layer_tag( utility::tag::TagCOP layer_tag, DataMap & TaskOperationOP task = TaskOperationFactory::get_instance()->newTaskOperation( task_op_type, datamap, task_layer_subtag ); add_layer( task_name, task, DESIGN, DESIGNABLE ); } else { - throw utility::excn::EXCN_Msg_Exception( "Invalid TaskOperation name \"" + task_op_type + "\" in TaskLayer subtag of LayerDesign" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Invalid TaskOperation name \"" + task_op_type + "\" in TaskLayer subtag of LayerDesign" ); } } else { parse_layer_secstruct_tag( task_layer_subtag, datamap, task_name ); @@ -1470,7 +1470,7 @@ LayerDesignOperation::parse_layer_secstruct_tag( set_layer_residues( layer_name, secstruct, std::string( temp_def_res_set.begin(), temp_def_res_set.end() ) ); } else { if ( secstruct != "all" ) { - throw utility::excn::EXCN_Msg_Exception("LayerDesignOperation: Trying to exclude aas from a secstruct that doesn't exist. Layer = " + layer_name + " secstruct = " + secstruct ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LayerDesignOperation: Trying to exclude aas from a secstruct that doesn't exist. Layer = " + layer_name + " secstruct = " + secstruct ); } } diff --git a/source/src/protocols/fold_from_loops/SegmentedAtomPairConstraintGenerator.cc b/source/src/protocols/fold_from_loops/SegmentedAtomPairConstraintGenerator.cc index 5daf2a22c0..8af9195412 100644 --- a/source/src/protocols/fold_from_loops/SegmentedAtomPairConstraintGenerator.cc +++ b/source/src/protocols/fold_from_loops/SegmentedAtomPairConstraintGenerator.cc @@ -78,16 +78,16 @@ SegmentedAtomPairConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic if ( use_native ) { set_reference_pose( constraint_generator::get_native_pose() ); if ( ! reference_pose_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "'native' option for SegmentedAtomPairConstraintGenerator specified, but no native pose is availible." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'native' option for SegmentedAtomPairConstraintGenerator specified, but no native pose is availible." ); } } core::select::residue_selector::ResidueSelectorCOP selector = core::select::residue_selector::parse_residue_selector( tag, data ); if ( selector ) set_residue_selector( *selector ); - if ( !tag->hasTag( "Inner" ) ) throw utility::excn::EXCN_RosettaScriptsOption( "A Inner constraint condition is mandatory!" ); + if ( !tag->hasTag( "Inner" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "A Inner constraint condition is mandatory!" ); utility::tag::TagCOP const& innertag = tag->getTag( "Inner" ); - if ( !tag->hasTag( "Outer" ) ) throw utility::excn::EXCN_RosettaScriptsOption( "A Outer constraint condition is mandatory!" ); + if ( !tag->hasTag( "Outer" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "A Outer constraint condition is mandatory!" ); utility::tag::TagCOP const& outertag = tag->getTag( "Outer" ); set_inner_sd( innertag->getOption< core::Real >( "sd", inner_.sd ) ); @@ -105,7 +105,7 @@ SegmentedAtomPairConstraintGenerator::parse_tag( utility::tag::TagCOP tag, basic set_outer_unweighted_function( outertag->getOption< bool >( "unweighted", outer_.unweighted ) ); if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "SegmentedAtomPairConstraintGenerator requires a residue selector, but one is not set.\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "SegmentedAtomPairConstraintGenerator requires a residue selector, but one is not set.\n" ); } } diff --git a/source/src/protocols/fold_from_loops/SplitAndMixPoseMover.cc b/source/src/protocols/fold_from_loops/SplitAndMixPoseMover.cc index c91c11003f..ed1bcd3ea1 100644 --- a/source/src/protocols/fold_from_loops/SplitAndMixPoseMover.cc +++ b/source/src/protocols/fold_from_loops/SplitAndMixPoseMover.cc @@ -72,7 +72,7 @@ SplitAndMixPoseMover::set_order( std::string order ) if ( utility::string2int( res ) != -1 ) { order_.push_back( utility::string2Size( res ) ); } else { - throw utility::excn::EXCN_Msg_Exception( "Value " + res + " cannot be cast to integer." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Value " + res + " cannot be cast to integer." ); } } } @@ -107,15 +107,15 @@ SplitAndMixPoseMover::apply( core::pose::Pose & pose ) if ( order_.size() == 0 ) set_order( pose_list.size() ); if ( utility::max( order_ ) > pose_list.size() ) { - throw utility::excn::EXCN_Msg_Exception( "A subpose is requested identified with a number higher than the number of subposes available" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "A subpose is requested identified with a number higher than the number of subposes available" ); } if ( order_.size() > pose_list.size() ) { // We could use less than all, never more. - throw utility::excn::EXCN_Msg_Exception( "Requested ordes defines a number of parts different that those provided" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Requested ordes defines a number of parts different that those provided" ); } core::pose::PoseOP tmppose = merge_poses( pose_list ); transfer_conformation( pose, *tmppose ); } else { - throw utility::excn::EXCN_Msg_Exception( "Selector does not match with any residue of the provided pose" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Selector does not match with any residue of the provided pose" ); } } pose.pdb_info( core::pose::PDBInfoOP( new core::pose::PDBInfo( pose ) ) ); diff --git a/source/src/protocols/forge/constraints/InvrotTreeRCG.cc b/source/src/protocols/forge/constraints/InvrotTreeRCG.cc index 1379c9913c..38edfc6288 100644 --- a/source/src/protocols/forge/constraints/InvrotTreeRCG.cc +++ b/source/src/protocols/forge/constraints/InvrotTreeRCG.cc @@ -102,7 +102,7 @@ InvrotTreeRCG::parse_my_tag( TagCOP const tag, //in case we'ref folding up around a ligand std::string cstfilename = tag->getOption( "cstfile", "" ); if ( cstfilename == "" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "XML tag for invrot tree does not contain a cstfile option... this will probably fail when the InvrotTreeCstGenerator mover runs." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "XML tag for invrot tree does not contain a cstfile option... this will probably fail when the InvrotTreeCstGenerator mover runs." ); } set_cstfile( cstfilename ); diff --git a/source/src/protocols/forge/remodel/RemodelConstraintGenerator.cc b/source/src/protocols/forge/remodel/RemodelConstraintGenerator.cc index d80b408865..c3f9517684 100644 --- a/source/src/protocols/forge/remodel/RemodelConstraintGenerator.cc +++ b/source/src/protocols/forge/remodel/RemodelConstraintGenerator.cc @@ -109,7 +109,7 @@ RemodelConstraintGenerator::remove_remodel_constraints_from_pose( //TR << this->get_name() << " is about to try to remove " << remodel_csts.size() << " constraints." << std::endl; if ( ! pose.remove_constraints( remodel_csts, true ) ) { - throw EXCN_RemoveCstsFailed(); + throw CREATE_EXCEPTION(EXCN_RemoveCstsFailed, ""); } } diff --git a/source/src/protocols/forge/remodel/RemodelConstraintGenerator.hh b/source/src/protocols/forge/remodel/RemodelConstraintGenerator.hh index 29198ab0e3..9073e9ab3c 100644 --- a/source/src/protocols/forge/remodel/RemodelConstraintGenerator.hh +++ b/source/src/protocols/forge/remodel/RemodelConstraintGenerator.hh @@ -32,7 +32,7 @@ #include //utility headers -#include +#include #include #include #include @@ -147,12 +147,9 @@ private: }; //class RemodelConstraintGenerator -class EXCN_RemoveCstsFailed : public utility::excn::EXCN_Base { +class EXCN_RemoveCstsFailed : public utility::excn::Exception { public: - EXCN_RemoveCstsFailed(): - utility::excn::EXCN_Base() - {} - virtual void show( std::ostream & os ) const { os << "Remodel constraints somehow got lost along the way" << std::endl; } + EXCN_RemoveCstsFailed(char const *file, int line, std::string const & m) : utility::excn::Exception(file, line, m + "\nRemodel constraints somehow got lost along the way") {} }; /// @brief generic remodel constraint generator for use with arbitrary ConstraintGenerators diff --git a/source/src/protocols/forge/remodel/ResidueVicinityRCG.cc b/source/src/protocols/forge/remodel/ResidueVicinityRCG.cc index b1bb5f3bf0..410fd8297a 100644 --- a/source/src/protocols/forge/remodel/ResidueVicinityRCG.cc +++ b/source/src/protocols/forge/remodel/ResidueVicinityRCG.cc @@ -165,11 +165,11 @@ ResidueVicinityRCG::parse_my_tag( TagCOP const tag, RemodelConstraintGenerator::parse_my_tag( tag, data, filters, movers, pose ); lstart( tag->getOption< core::Size >( "lstart", lstart_ ) ); if ( lstart_ == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("lstart must be specified in ResidueVicinityCstGenerator mover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "lstart must be specified in ResidueVicinityCstGenerator mover"); } lstop( tag->getOption< core::Size >( "lstart", lstop_ ) ); if ( lstop_ == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("lstop must be specified in ResidueVicinityCstGenerator mover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "lstop must be specified in ResidueVicinityCstGenerator mover"); } } diff --git a/source/src/protocols/frag_picker/nonlocal/NonlocalFragsMain.cc b/source/src/protocols/frag_picker/nonlocal/NonlocalFragsMain.cc index e890a93d56..c981c5edba 100644 --- a/source/src/protocols/frag_picker/nonlocal/NonlocalFragsMain.cc +++ b/source/src/protocols/frag_picker/nonlocal/NonlocalFragsMain.cc @@ -28,7 +28,7 @@ a given PDB. This protocol will be used to generate a VALL database of non-local //#include //#include #include -#include +#include //#include #include @@ -49,7 +49,6 @@ void NonlocalFrags_main() { //using namespace basic::options; //using namespace basic::options::OptionKeys; using protocols::jd2::JobDistributor; - using utility::excn::EXCN_Base; // necessary for outputting intermediate structures //option[ OptionKeys::run::intermediate_structures ].value(true); @@ -60,7 +59,7 @@ void NonlocalFrags_main() { try { JobDistributor::get_instance()->go(mover); - } catch (EXCN_Base& e) { + } catch (utility::excn::Exception& e) { cerr << "Exception: " << endl; e.show(cerr); } diff --git a/source/src/protocols/grafting/simple_movers/DeleteRegionMover.cc b/source/src/protocols/grafting/simple_movers/DeleteRegionMover.cc index 5b0d97670a..93c2512aad 100644 --- a/source/src/protocols/grafting/simple_movers/DeleteRegionMover.cc +++ b/source/src/protocols/grafting/simple_movers/DeleteRegionMover.cc @@ -132,7 +132,7 @@ DeleteRegionMover::parse_my_tag( } if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "You must specify a start and end residue or a residue selector to DeleteRegionMover.\n" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "You must specify a start and end residue or a residue selector to DeleteRegionMover.\n" ); } nter_overhang_ = tag->getOption( "nter_overhang", nter_overhang_ ); @@ -146,7 +146,7 @@ DeleteRegionMover::apply( core::pose::Pose& pose ) using core::select::residue_selector::ResidueRanges; if ( ! selector_ ) { - throw utility::excn::EXCN_BadInput( "Selector not set in DeleteRegionMover!" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Selector not set in DeleteRegionMover!" ); } ResidueRanges const ranges( selector_->apply( pose ) ); diff --git a/source/src/protocols/hbnet/HBNet.cc b/source/src/protocols/hbnet/HBNet.cc index f268ca6a21..36a392bcfd 100644 --- a/source/src/protocols/hbnet/HBNet.cc +++ b/source/src/protocols/hbnet/HBNet.cc @@ -454,9 +454,9 @@ HBNet::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &data, core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from AddCompositionConstraintMover::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } runtime_assert( selector ); start_selector_ = selector->clone(); @@ -469,9 +469,9 @@ HBNet::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &data, core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from AddCompositionConstraintMover::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } runtime_assert( selector ); core_selector_ = selector->clone(); @@ -484,9 +484,9 @@ HBNet::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &data, core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from AddCompositionConstraintMover::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } runtime_assert( selector ); boundary_selector_ = selector->clone(); diff --git a/source/src/protocols/helical_bundle/BackboneGridSampler.cc b/source/src/protocols/helical_bundle/BackboneGridSampler.cc index 2e4965bd87..565063ba69 100644 --- a/source/src/protocols/helical_bundle/BackboneGridSampler.cc +++ b/source/src/protocols/helical_bundle/BackboneGridSampler.cc @@ -433,7 +433,7 @@ BackboneGridSampler::parse_my_tag( try { if ( tag->getName() != "BackboneGridSampler" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible -- the tag name does not match the mover name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible -- the tag name does not match the mover name."); } if ( TR.visible() ) TR << "Parsing options for BackboneGridSampler (\"" << tag->getOption("name" ,"") << "\") mover." << std::endl; @@ -560,7 +560,7 @@ BackboneGridSampler::parse_my_tag( } // looping through sub-tags /*** End Parse of Sub-Tags ***/ - } catch ( utility::excn::EXCN_RosettaScriptsOption const & e ) { + } catch (utility::excn::RosettaScriptsOptionError const & e ) { TR << "kill me " << e.msg() << std::endl; } diff --git a/source/src/protocols/helical_bundle/BundleGridSampler.cc b/source/src/protocols/helical_bundle/BundleGridSampler.cc index 9bccf2c5f9..866bb78b7d 100644 --- a/source/src/protocols/helical_bundle/BundleGridSampler.cc +++ b/source/src/protocols/helical_bundle/BundleGridSampler.cc @@ -592,7 +592,7 @@ BundleGridSampler::parse_my_tag( //TODO: ADD SUPPORT FOR Z-OFFSET. if ( tag->getName() != "BundleGridSampler" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible -- the tag name does not match the mover name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible -- the tag name does not match the mover name."); } if ( TR.visible() ) TR << "Parsing options for BundleGridSampler (\"" << tag->getOption("name" ,"") << "\") mover." << std::endl; diff --git a/source/src/protocols/helical_bundle/MakeBundle.cc b/source/src/protocols/helical_bundle/MakeBundle.cc index ed42f3d9e1..8c8fe2ff50 100644 --- a/source/src/protocols/helical_bundle/MakeBundle.cc +++ b/source/src/protocols/helical_bundle/MakeBundle.cc @@ -259,7 +259,7 @@ MakeBundle::parse_my_tag( ) { if ( tag->getName() != "MakeBundle" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible -- the tag name does not match the mover name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible -- the tag name does not match the mover name."); } if ( TR.visible() ) TR << "Parsing options for MakeBundle (\"" << tag->getOption("name" ,"") << "\") mover." << std::endl; diff --git a/source/src/protocols/helical_bundle/PerturbBundle.cc b/source/src/protocols/helical_bundle/PerturbBundle.cc index 3d48540972..4302738e87 100644 --- a/source/src/protocols/helical_bundle/PerturbBundle.cc +++ b/source/src/protocols/helical_bundle/PerturbBundle.cc @@ -239,7 +239,7 @@ PerturbBundle::parse_my_tag( ) { if ( tag->getName() != "PerturbBundle" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible -- the tag name does not match the mover name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible -- the tag name does not match the mover name."); } if ( TR.visible() ) TR << "Parsing options for PerturbBundle (\"" << tag->getOption("name" ,"") << "\") mover." << std::endl; diff --git a/source/src/protocols/hybridization/HybridizeProtocol.cc b/source/src/protocols/hybridization/HybridizeProtocol.cc index 75e2ec6238..e2fa615155 100644 --- a/source/src/protocols/hybridization/HybridizeProtocol.cc +++ b/source/src/protocols/hybridization/HybridizeProtocol.cc @@ -233,7 +233,7 @@ HybridizeProtocol::HybridizeProtocol( ) { if ( templates_in.size() != template_weights_in.size() ) { - throw utility::excn::EXCN_BadInput("Error! Input templates and weights are in different sizes!"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Error! Input templates and weights are in different sizes!"); } stage1_probability_ = 1.; diff --git a/source/src/protocols/jd2/JD2ResourceManager.cc b/source/src/protocols/jd2/JD2ResourceManager.cc index a1e346c8fe..d3a179961e 100644 --- a/source/src/protocols/jd2/JD2ResourceManager.cc +++ b/source/src/protocols/jd2/JD2ResourceManager.cc @@ -69,7 +69,7 @@ using basic::resource_manager::ResourceManager; using basic::resource_manager::ResourceDescription; using basic::resource_manager::ResourceOP; using basic::resource_manager::JobOptionsOP; -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; using basic::resource_manager::LoaderType; using basic::resource_manager::LocatorTag; using basic::resource_manager::LocatorID; @@ -145,7 +145,7 @@ void JD2ResourceManager::read_resource_locators_tags( TagCOP tags ) using basic::resource_manager::ResourceLocatorOP; using basic::resource_manager::LocatorTag; using utility::tag::Tag; - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; for ( auto tag_iter = tags->getTags().begin(), @@ -157,7 +157,7 @@ void JD2ResourceManager::read_resource_locators_tags( TagCOP tags ) if ( ! (*tag_iter)->hasOption( "tag" ) ) { std::ostringstream err; err << "Unable to find a 'tag' for a ResourceLocator of type '" << locator_type << "'\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } LocatorTag locator_tag = (*tag_iter)->getOption< LocatorTag >( "tag" ); @@ -168,7 +168,7 @@ void JD2ResourceManager::read_resource_locators_tags( TagCOP tags ) err << locator_type << "'.\n"; err << "Prevous ResourceLocator object with this tag was of type '"; err << LazyResourceManager::find_resource_locator( locator_tag )->type() << "'\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } // 3. Try to create this ResourceLocator object; the factory may throw. Catch any thrown MsgException and @@ -176,13 +176,13 @@ void JD2ResourceManager::read_resource_locators_tags( TagCOP tags ) ResourceLocatorOP resource_locator; try { resource_locator = ResourceLocatorFactory::get_instance()->create_resource_locator( locator_type, locator_tag, *tag_iter ); - } catch ( MsgException const & e ) { + } catch ( Exception const & e ) { std::ostringstream err; err << e.msg() << "\n"; err << "Exception thrown while trying to initialize a ResourceLocator of type '"; err << locator_type << "' with a tag of '" << locator_tag << "'\n"; err << "from JD2ResourceManager::read_resource_locators_tags\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } LazyResourceManager::add_resource_locator( locator_tag, resource_locator ); } @@ -268,7 +268,7 @@ JD2ResourceManager::read_resource_options_table_tag( << "is an SQL SELECT statement that returns the following column formats" << endl << "ordered by :" << endl << "\t(, , , resource_option_value>)" << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } cppdb::statement select_stmt(safely_prepare_statement(sql_command, db_session)); @@ -293,7 +293,7 @@ JD2ResourceManager::read_resource_options_table_tag( << "Instead, the query returned " << res.cols() << ":" << endl << "SQL query:" << endl << sql_command << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } Size row_number(0); @@ -337,7 +337,7 @@ JD2ResourceManager::read_resource_option_item( using basic::resource_manager::ResourceOptionsFactory; using basic::resource_manager::ResourceOptionsOP; using basic::resource_manager::ResourceOptionsTag; - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; std::string const & tagname = tag->getName(); @@ -345,7 +345,7 @@ JD2ResourceManager::read_resource_option_item( if ( ! tag->hasOption( "tag" ) ) { std::ostringstream err; err << "Unable to find a 'tag' for a ResourceOption of type '" << tagname << "'\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } ResourceOptionsTag options_tag = tag->getOption< ResourceOptionsTag >( "tag" ); @@ -356,7 +356,7 @@ JD2ResourceManager::read_resource_option_item( err << tagname << "'.\n"; err << "Prevous ResourceOptions object with this tag was of type '"; err << LazyResourceManager::find_resource_options( options_tag )->type() << "'\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } // 3. Try to create this ResourceOptions object; the factory may throw. Catch any thrown MsgException and @@ -364,13 +364,13 @@ JD2ResourceManager::read_resource_option_item( ResourceOptionsOP resource_options; try { resource_options = ResourceOptionsFactory::get_instance()->create_resource_options( tagname, tag ); - } catch ( MsgException const & e ) { + } catch ( Exception const & e ) { std::ostringstream err; err << e.msg() << "\n"; err << "Exception thrown while trying to initialize a ResourceOption of type '"; err << tagname << "' with a tag of '" << options_tag << "'\n"; err << "from JD2ResourceManager::read_resource_options_tags\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } LazyResourceManager::add_resource_options( options_tag, resource_options ); } @@ -381,7 +381,7 @@ void JD2ResourceManager::check_resource_loader_type( LoaderType const & loader_type ) { - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; // 1. Make sure this is an allowed resource type / loader type if ( ! ResourceLoaderFactory::get_instance()->has_resource_loader( loader_type ) ) { @@ -392,7 +392,7 @@ JD2ResourceManager::check_resource_loader_type( iter = loader_types.begin(), iter_end = loader_types.end(); iter != iter_end; ++iter ) { err << " '" << *iter << std::endl; } - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } } @@ -404,7 +404,7 @@ JD2ResourceManager::read_resource_tag_item( LoaderType const & loader_type, LocatorID const & locator_id ) { - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; // 2. Set the resource tag to be the locator id unless it has been // explcitely provided. @@ -420,7 +420,7 @@ JD2ResourceManager::read_resource_tag_item( std::ostringstream err; err << "Duplicated tag, '" << resource_tag << "' assigned to a Resource object with ResourceLoader type '"; err << loader_type << "'.\n"; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } return resource_tag; } @@ -437,7 +437,7 @@ JD2ResourceManager::read_resource_locator_items( LoaderType const & loader_type, LocatorID & locator_id ) { - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; // 4. Verify that, if it's been given a locator, that the ResourceLocator has previously been declared LocatorTag locator_tag; @@ -450,7 +450,7 @@ JD2ResourceManager::read_resource_locator_items( << " with LoaderType '" << loader_type << "'" << " was given the ResourceLocator tag '" << locator_tag << "'," << " which has not previously been declared."; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } if ( tag->hasOption( "file" ) && locator_tag != "FileSystemResourceLocator" ) { std::ostringstream err; @@ -461,7 +461,7 @@ JD2ResourceManager::read_resource_locator_items( << " file='" << tag->getOption< LocatorID > ("file") << "'." << " But specifying a file is only compatible with the" << " FileSystemResourceLocator." << std::endl; - throw MsgException(err.str()); + throw CREATE_EXCEPTION(Exception, err.str()); } if ( locator_tag == "NULL" ) { locator_id = ""; @@ -481,7 +481,7 @@ JD2ResourceManager::read_resource_locator_items( << " file='" << tag->getOption< LocatorID >("file") << "' and" << " locatorID='" << tag->getOption< LocatorID >("locatorID") << "'" << " but it is only allowed to have one." << std::endl; - throw MsgException(err.str()); + throw CREATE_EXCEPTION(Exception, err.str()); } locator_id = tag->getOption< LocatorID >("file"); } else if ( tag->hasOption("locatorID") ) { @@ -492,7 +492,7 @@ JD2ResourceManager::read_resource_locator_items( << "Resource subtag" << " with LoaderType '" << loader_type << "' was not supplied" << " with a locatorID tag, which is required." << std::endl; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } return locator_tag; @@ -505,7 +505,7 @@ JD2ResourceManager::read_resource_options_tag_item( LoaderType const & loader_type, ResourceTag const & resource_tag ) { - typedef utility::excn::EXCN_Msg_Exception MsgException; + typedef utility::excn::Exception Exception; // 5. Verify that, if it's been given a resource options, that the // ResourceOptions has been previously declared @@ -516,7 +516,7 @@ JD2ResourceManager::read_resource_options_tag_item( std::ostringstream err; err << "Resource '" << resource_tag << "' with LoaderType '" << loader_type << "' was given the tag "; err << "for a ResourceLoaderOptions, '" << resource_options_tag << "', which has not previously been declared."; - throw MsgException( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } } return resource_options_tag; @@ -637,7 +637,7 @@ JD2ResourceManager::read_resource_table_tag( << "\tlocator_id" << endl << "\tloader_type" << endl << "\toptions_tag" << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } cppdb::statement select_stmt(safely_prepare_statement(sql_command, db_session)); @@ -655,7 +655,7 @@ JD2ResourceManager::read_resource_table_tag( << "\tresource_options_tag" << endl << "Instead, the query returned " << res.cols() << ":" << endl << sql_command << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } Size row_number(0); @@ -682,7 +682,7 @@ JD2ResourceManager::read_resource_table_tag( << "'" << locator_tag << ", '" << locator_id << "', '" << loader_type << "', '" << resource_options_tag << "'" << endl << "SQL comand: " << endl << sql_command; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } check_resource_loader_type(loader_type); @@ -696,7 +696,7 @@ JD2ResourceManager::read_resource_table_tag( << locator_tag << "\t" << locator_id << "\t" << loader_type << "\t" << resource_options_tag << endl << "SQL comand: " << endl << sql_command; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } ResourceConfiguration resource_configuration; @@ -726,7 +726,7 @@ JD2ResourceManager::get_jd2_resource_manager_instance( err << "Error trying to access the JD2ResourceManager " << "from the JD2ResourceManagerJobInputer"; - EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } return jd2_resource_manager; } @@ -788,7 +788,7 @@ JD2ResourceManager::get_resource( fallbackname = "fallback_" + resource_description + "_" + utility::to_string( numeric::random::random_range(1,4000000) ); } if ( has_resource_configuration( fallbackname ) ) { - throw utility::excn::EXCN_Msg_Exception( "Could not name the fallback resource after 10000 attempts. Try not to name your resources" + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not name the fallback resource after 10000 attempts. Try not to name your resources" " beginning with the prefix 'fallback_'." ); } basic::resource_manager::ResourceConfiguration fake_configuration; @@ -817,7 +817,7 @@ JD2ResourceManager::get_resource( } errmsg << "Thrown from JD2ResourceManager::get_resource\n"; - throw utility::excn::EXCN_Msg_Exception( errmsg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, errmsg.str() ); } return nullptr; // appease compiler } diff --git a/source/src/protocols/jd2/JD2ResourceManagerJobInputter.cc b/source/src/protocols/jd2/JD2ResourceManagerJobInputter.cc index b86480d6a8..5d7d66ca98 100644 --- a/source/src/protocols/jd2/JD2ResourceManagerJobInputter.cc +++ b/source/src/protocols/jd2/JD2ResourceManagerJobInputter.cc @@ -68,7 +68,7 @@ namespace protocols { namespace jd2 { -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; using basic::resource_manager::ResourceOP; using basic::resource_manager::ResourceManager; using basic::resource_manager::ResourceTag; @@ -139,13 +139,13 @@ JD2ResourceManagerJobInputter::pose_from_job( tr << "Loading startstruct " << jd2_resource_manager->find_resource_tag_by_job_tag( "startstruct", input_tag ) << " for job " << input_tag <get_resource_by_job_tag("startstruct", input_tag); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream err; err << e.msg() << std::endl; err << "Failed to access 'startstruct' resource from the JD2ResourceManager for job '"; err << input_tag << "' with nstruct index " << job->nstruct_index(); err << "\n" << "Exception caught and re-thrown from JD2ResourceManagerJobInputter::pose_from_job\n"; - throw utility::excn::EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err.str() ); } PoseOP resource_pose( utility::pointer::dynamic_pointer_cast< core::pose::Pose > ( resource ) ); @@ -165,7 +165,7 @@ JD2ResourceManagerJobInputter::pose_from_job( } else { err << " This starting structure for this job is critically absent\n"; } - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } /// Save a copy of the resource_pose into the inner job. @@ -290,7 +290,7 @@ JD2ResourceManagerJobInputter::parse_jobs_tags( } else { std::ostringstream err; err << "Error parsing jobs tags in JD2ResourceManagerJobInputter: unrecognized tag '" << tagname << "'"; - EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } } @@ -348,7 +348,7 @@ JD2ResourceManagerJobInputter::parse_job_tag( err << "startstruct is given multiple times, then we cannot ensure that job names are unique. Please\n"; err << "give each job with a shared startstrct a different name.\n"; err << "Offeding startstruct: '" << input_tag << "\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } jobname = input_tag; @@ -380,7 +380,7 @@ JD2ResourceManagerJobInputter::parse_jobs_table_tag( << "ordered by :" << endl << "\t(, 'Resource', , )" << endl << "\t(, 'Option', , )" << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } cppdb::statement select_stmt(safely_prepare_statement(sql_command, db_session)); @@ -410,7 +410,7 @@ JD2ResourceManagerJobInputter::parse_jobs_table_tag( << "Instead, the query returned " << res.cols() << ":" << endl << "SQL query:" << endl << sql_command << endl; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } Size row_number(0); @@ -457,7 +457,7 @@ JD2ResourceManagerJobInputter::parse_jobs_table_tag( << "Options:" << endl << job_options << endl; - throw EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(Exception, err_msg.str()); } if ( previous_job_name.empty() ) { @@ -519,7 +519,7 @@ JD2ResourceManagerJobInputter::record_job( err_msg << "Conflicting specification for nstruct for job with name '" << job_name << "'" << std::endl << "Previous nstruct=" << n_jobs << ", new nstruct=" << requested_nstruct << std::endl; - throw EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(Exception, err_msg.str() ); } } } @@ -555,7 +555,7 @@ JD2ResourceManagerJobInputter::parse_options_name_and_value( std::stringstream err_msg; err_msg << "Error: Option key '" << optname << "' not found. Please remember to use only one colon when giving options." << endl; - throw EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(Exception, err_msg.str() ); } if ( basic::options::OptionKeys::has( full_key ) ) { @@ -609,7 +609,7 @@ JD2ResourceManagerJobInputter::parse_options_name_and_value( std::ostringstream err; err << "Error: option '" << optname << "' corresponding to the full key '" << full_key << "' does not match any existing option in Rosetta.\n"; err << "Thrown from JD2ResourceManagerJobInputter::parse_job_tag\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } } @@ -627,7 +627,7 @@ JD2ResourceManagerJobInputter::read_BooleanOption_subtag_for_job( } catch ( boost::bad_lexical_cast const& ) { std::ostringstream err; err << "Error converting value '" << val << "' given for option '" << optname << "' to a boolean from within JD2ResourceManagerJobInputter::parse_job_tag\n Boolean options must be given either a '1' or a '0'"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } job_options->add_option( boolopt, boolval ); @@ -660,7 +660,7 @@ JD2ResourceManagerJobInputter::read_IntegerOption_subtag_for_job( std::ostringstream err; err << "Error converting value '" << val << "' given for option '" << optname << "' to an integer from within JD2ResourceManagerJobInputter::parse_job_tag\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } job_options->add_option( intopt, intval ); @@ -692,7 +692,7 @@ JD2ResourceManagerJobInputter::read_RealOption_subtag_for_job( } catch ( boost::bad_lexical_cast const& ) { std::ostringstream err; err << "Error converting value '" << val << "' given for option '" << optname << "' to a floating point number from within JD2ResourceManagerJobInputter::parse_job_tag\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } job_options->add_option( realopt, realval ); } @@ -730,7 +730,7 @@ JD2ResourceManagerJobInputter::read_BooleanVectorOption_subtag_for_job( << optname << "' to a boolean\nfrom within JD2ResourceManagerJobInputter::parse_job_tag\n" << "Original value string: '" << val << "'\n" << "Boolean options must be given either a '1' or a '0'\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } boolvect[ ii ] = boolval; } @@ -769,7 +769,7 @@ JD2ResourceManagerJobInputter::read_IntegerVectorOption_subtag_for_job( << ", given for the comma-separated vector option '" << optname << "' to an integer\nfrom within JD2ResourceManagerJobInputter::parse_job_tag\n" << "Original value string: '" << val << "'\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } intvect[ ii ] = intval; } @@ -807,7 +807,7 @@ JD2ResourceManagerJobInputter::read_RealVectorOption_subtag_for_job( err << "Error converting value '" << vals[ii] << "', option # " << ii << ", given for the comma-separated vector option '" << optname << "' to a boolean\nfrom within JD2ResourceManagerJobInputter::parse_job_tag\n" << "Original value string: '" << val << "'\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } realvect[ ii ] = realval; } @@ -838,7 +838,7 @@ JD2ResourceManagerJobInputter::read_ResidueType_for_subtag( if ( !options_tag->hasOption("resource_tag") ) { err << "you must specify the resource_tag option when using a ResidueType tag"; err <getOptions() ) { if ( opt_iter.first == "resource_tag" ) { @@ -934,7 +934,7 @@ JD2ResourceManagerJobInputter::read_Data_for_subtag( err << "\t(" << opt_iter.first << ", " << opt_iter.second << ")\n"; } err << "Thrown from protocols::jd2::JD2ResourceManagerJobInputter::parse_job_tag\n"; - throw EXCN_Msg_Exception( err.str() ); + throw CREATE_EXCEPTION(Exception, err.str() ); } if ( local_startstruct_found && pdb_found ) { @@ -976,7 +976,7 @@ JD2ResourceManagerJobInputter::check_each_job_has_startstruct( std::stringstream errmsg; errmsg << "Error: Job '" << job->input_tag() << "' given without a 'startstruct'"; - throw EXCN_Msg_Exception( errmsg.str() ); + throw CREATE_EXCEPTION(Exception, errmsg.str() ); } } } @@ -990,4 +990,3 @@ JD2ResourceManagerJobInputter::input_source() const } // namespace jd2 } // namespace protocols - diff --git a/source/src/protocols/jd2/JobDistributor.cc b/source/src/protocols/jd2/JobDistributor.cc index 5d080ce52b..a481c11160 100644 --- a/source/src/protocols/jd2/JobDistributor.cc +++ b/source/src/protocols/jd2/JobDistributor.cc @@ -206,7 +206,7 @@ void JobDistributor::init_jd() } else { //no batches... try{ job_inputter_ = JobDistributorFactory::create_job_inputter(); - } catch (utility::excn::EXCN_Base & excn) { + } catch (utility::excn::Exception & excn) { basic::Error() << "ERROR: Exception caught by JobDistributor while trying to initialize the JobInputter of type '" << JobInputter::job_inputter_input_source_to_string( @@ -318,9 +318,7 @@ void JobDistributor::go_main(protocols::moves::MoverOP mover) // The result in most applications will be a non-zero exit code // In the MPI case, number_failed_jobs_ will stay zero because MPI overrides job_failed() if ( option[OptionKeys::jd2::failed_job_exception]() && (number_failed_jobs_ > 0) ) { - throw( utility::excn::EXCN_JD2Failure( - utility::to_string(number_failed_jobs_) + " jobs failed; check output for error messages" - )); + throw( CREATE_EXCEPTION(utility::excn::JD2Failure, utility::to_string(number_failed_jobs_) + " jobs failed; check output for error messages") ); } basic::prof_show(); @@ -515,13 +513,13 @@ JobDistributor::run_one_job( protocols::boinc::Boinc::attach_graphics_current_pose_observer( pose ); #endif - } catch ( utility::excn::EXCN_RosettaScriptsOption& excn ) { + } catch ( utility::excn::RosettaScriptsOptionError& excn ) { // KAB - A RosettaScripts option exception is thrown when there is a problem // in the parsed script, which is used for all inputs. As it therefore // doesn't make sense to continue onto any other inputs, we reraise the // exception here. throw; - } catch (utility::excn::EXCN_Base& excn) { + } catch (utility::excn::Exception& excn) { basic::Error() << "ERROR: Exception caught by JobDistributor while trying to get pose from job " << "'" << job_outputter_->output_name(current_job_) << "'" << std::endl @@ -633,13 +631,13 @@ JobDistributor::run_one_job( } mover = mover_copy; // save the mover generated by the parser - } catch (utility::excn::EXCN_RosettaScriptsOption& excn) { + } catch (utility::excn::RosettaScriptsOptionError& excn) { // KAB - A RosettaScripts option exception is thrown when there is a problem // in the parsed script, which is used for all inputs. As it therefore // doesn't make sense to continue onto any other inputs, we reraise the // exception here. throw; - } catch (utility::excn::EXCN_Base& excn) { + } catch (utility::excn::Exception& excn) { basic::Error() << "ERROR: Exception caught by JobDistributor while trying to get pose from job '" << job_outputter_->output_name(current_job_) << "'" << std::endl @@ -710,14 +708,14 @@ JobDistributor::run_one_job( // Using pure exit instead of utility_exit_with_status to avoid infinite recursion std::exit( basic::options::option[basic::options::OptionKeys::out::std_IO_exit_error_code]()); - } catch (utility::excn::EXCN_BadInput& excn) { + } catch (utility::excn::BadInput& excn) { tr.Error << "\n\n[ERROR] Exception caught by JobDistributor for job " << job_outputter_->output_name(current_job_) << excn << std::endl; status = protocols::moves::FAIL_BAD_INPUT; - } catch (utility::excn::EXCN_Base& excn) { + } catch (utility::excn::Exception& excn) { tr.Error << "\n\n[ERROR] Exception caught by JobDistributor for job " << job_outputter_->output_name(current_job_) << excn @@ -1144,7 +1142,7 @@ void JobDistributor::get_job_list_from_job_inputter() { try { jobs_ = JobsContainerOP( new JobsContainer ); //Create the jobs container object job_inputter_->fill_jobs(*jobs_); - } catch (utility::excn::EXCN_Base & excn) { + } catch (utility::excn::Exception & excn) { basic::Error() << "ERROR: Exception caught by JobDistributor while trying to fill the input jobs with JobInputter of type type '" << JobInputter::job_inputter_input_source_to_string( job_inputter_->input_source() ) diff --git a/source/src/protocols/jd2/MSDJobDistributor.cc b/source/src/protocols/jd2/MSDJobDistributor.cc index 88418a03e7..4877b71a27 100644 --- a/source/src/protocols/jd2/MSDJobDistributor.cc +++ b/source/src/protocols/jd2/MSDJobDistributor.cc @@ -25,7 +25,6 @@ #include //#include #include -#include //option key includes #include #include diff --git a/source/src/protocols/jd2/ScreeningJobInputter.cc b/source/src/protocols/jd2/ScreeningJobInputter.cc index 690def6c52..24a615491e 100644 --- a/source/src/protocols/jd2/ScreeningJobInputter.cc +++ b/source/src/protocols/jd2/ScreeningJobInputter.cc @@ -115,7 +115,7 @@ void ScreeningJobInputter::fill_jobs(JobsContainer & jobs) utility::json_spirit::read(data,job_json_data); job_object_data = job_json_data.get_obj(); } catch(std::runtime_error &) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "screening file " + file_name + "is incorrectly formatted. " "it must be a dict with two keys: 'params' containing a list of needed params, and " "'jobs' which must be a list of dicts. each dict should contain keys 'group_name', 'proteins' and 'ligands'"); @@ -126,7 +126,7 @@ void ScreeningJobInputter::fill_jobs(JobsContainer & jobs) try { param_group_data = job_object_data["params"].get_array(); } catch(std::runtime_error &) { - throw utility::excn::EXCN_BadInput("the screening file " + file_name + " does not contain a 'params' section"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "the screening file " + file_name + " does not contain a 'params' section"); } // Annotate params files for later insertion into the Pose. @@ -141,7 +141,7 @@ void ScreeningJobInputter::fill_jobs(JobsContainer & jobs) try { job_group_data = job_object_data["jobs"].get_array(); } catch(std::runtime_error & ) { - throw utility::excn::EXCN_BadInput("the screening file " + file_name + " does not contain a 'jobs' section"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "the screening file " + file_name + " does not contain a 'jobs' section"); } for ( auto & i : job_group_data ) { utility::json_spirit::mObject group_map(i.get_obj()); @@ -154,7 +154,7 @@ void ScreeningJobInputter::fill_jobs(JobsContainer & jobs) try { group_name = group_map["group_name"].get_str(); } catch(std::runtime_error &) { - throw utility::excn::EXCN_BadInput("a group in screening file " + file_name + " does not contain the element 'group_name' or is misformatted"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "a group in screening file " + file_name + " does not contain the element 'group_name' or is misformatted"); } utility::json_spirit::mArray startfrom_data; @@ -167,13 +167,13 @@ void ScreeningJobInputter::fill_jobs(JobsContainer & jobs) try { protein_path_data = group_map["proteins"].get_array(); } catch(std::runtime_error &) { - throw utility::excn::EXCN_BadInput("the group " + group_name +" in screening file " + file_name + " does not contain the element 'proteins' or is misformatted"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "the group " + group_name +" in screening file " + file_name + " does not contain the element 'proteins' or is misformatted"); } try { ligand_path_data = group_map["ligands"].get_array(); } catch(std::runtime_error &) { - throw utility::excn::EXCN_BadInput("the group " + group_name +" in screening file " + file_name + " does not contain the element 'ligands' or is misformatted"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "the group " + group_name +" in screening file " + file_name + " does not contain the element 'ligands' or is misformatted"); } // If we specify a native structure, store it diff --git a/source/src/protocols/jd2/archive/ArchiveBase.cc b/source/src/protocols/jd2/archive/ArchiveBase.cc index 25cd18ead0..61a24e2209 100644 --- a/source/src/protocols/jd2/archive/ArchiveBase.cc +++ b/source/src/protocols/jd2/archive/ArchiveBase.cc @@ -303,7 +303,7 @@ void ArchiveBase::load_decoys( std::string const& filename, SilentStructs& decoy if ( utility::file::file_exists( filename ) ) { SilentFileOptions opts; SilentFileData sfd( opts ); - if ( !sfd.read_file( filename ) ) throw ( utility::excn::EXCN_BadInput( "problem reading silent file"+filename ) ); + if ( !sfd.read_file( filename ) ) throw ( CREATE_EXCEPTION(utility::excn::BadInput, "problem reading silent file"+filename ) ); for ( SilentFileData::iterator it=sfd.begin(), eit=sfd.end(); it!=eit; ++it ) { decoys.push_back( *it ); } diff --git a/source/src/protocols/jd2/archive/ArchiveManager.cc b/source/src/protocols/jd2/archive/ArchiveManager.cc index 12eb95ab50..69a08a4010 100644 --- a/source/src/protocols/jd2/archive/ArchiveManager.cc +++ b/source/src/protocols/jd2/archive/ArchiveManager.cc @@ -55,6 +55,10 @@ #include #include +#include +#include +#include + // C++ headers #include #include @@ -62,9 +66,6 @@ //Debug headers #include //testing -#include - -#include #if (defined WIN32) //&& (!defined WIN_PYROSETTA) #include @@ -180,20 +181,20 @@ void Batch::read_info_file() { core::Size this_id = id(); //to detec errors std::string this_batch = batch(); //for error report utility::io::izstream in( dir() + "BATCH_INFO" ); - if ( !in.good() ) throw( EXCN_Archive( "cannot find " + dir() + "BATCH_INFO" ) ); + if ( !in.good() ) throw CREATE_EXCEPTION(EXCN_Archive, "cannot find " + dir() + "BATCH_INFO" ); in >> *this; if ( this_id != id() ) { - throw( EXCN_Archive("Inconsistency detected when reading BATCH_INFO for "+ this_batch+" ID in BATCH_INFO is " + batch() ) ); + throw CREATE_EXCEPTION(EXCN_Archive, "Inconsistency detected when reading BATCH_INFO for "+ this_batch+" ID in BATCH_INFO is " + batch() ); } } //instead of goto statements: I think goto would be clearer... but there are coding guidlines to adhere... void report_tag_error( Batch& batch, std::string const& expected_tag, std::string const& tag ) { - throw( EXCN_Archive( "Error reading batch information for batch: "+batch.batch()+" expected_tag: "+expected_tag+ " found " + tag) ); + throw CREATE_EXCEPTION(EXCN_Archive, "Error reading batch information for batch: "+batch.batch()+" expected_tag: "+expected_tag+ " found " + tag); } void report_value_error( Batch& batch, std::string const& tag ) { - throw( EXCN_Archive( "Error reading batch information for batch: "+batch.batch()+" wrong value for tag: "+tag ) ); + throw CREATE_EXCEPTION(EXCN_Archive, "Error reading batch information for batch: "+batch.batch()+" wrong value for tag: "+tag ); } std::istream& operator >> (std::istream& in, Batch &batch ) { @@ -312,7 +313,7 @@ ArchiveManager::go( ArchiveBaseOP archive ) } save_archive(); read_existing_batches(); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { send_stop_to_jobdistributor(); throw; } @@ -438,7 +439,7 @@ ArchiveManager::go( ArchiveBaseOP archive ) default : utility_exit_with_message( "unknown msg in ArchiveManager " + ObjexxFCL::string_of( msg_tag ) ); } //switch - } catch ( utility::excn::EXCN_Base &excn ) { + } catch ( utility::excn::Exception &excn ) { basic::show_time( tr, "Exception in main msg-loop !" ); tr.Error << excn.msg() << std::endl; tr.Error << "spinning down" << std::endl; @@ -513,7 +514,7 @@ void BaseArchiveManager::read_returning_decoys( Batch& batch, bool final ) { std::cerr << "last_skipped tag: " << unread_tag << " first tag to read: " << tags_to_read[1] << " last tag to read: " << tags_to_read.back() << std::endl; try { sfd.read_file( batch.silent_out(), tags_to_read ); - } catch ( utility::excn::EXCN_Base& excn ) { //or should we be more specific ? + } catch ( utility::excn::Exception& excn ) { //or should we be more specific ? if ( final ) throw; //rethrow if it is the final version of the file... tr.Error << "ignored ERROR: " << excn.msg() << std::endl; tr.Error << "this is not the final version of " << batch.silent_out() << "\n... maybe some data is still held in a cache of the filesystem..." @@ -617,7 +618,7 @@ ArchiveManager::jobs_completed() {// core::Size batch_id, bool final, core::Size PROF_STOP( basic::SAVE_ARCHIVE ); } else { // no good decoys found tr.Debug << " no good decoys to read " << std::endl; - throw EXCN_Archive( "all decoys returned with FAIL_BAD_INPUT" ); + throw CREATE_EXCEPTION(EXCN_Archive, "all decoys returned with FAIL_BAD_INPUT" ); } if ( final ) { @@ -734,7 +735,7 @@ ArchiveManager::read_existing_batches() { try { finalize_batch( new_batch, true /*reread */ ); tr.Debug << new_batch << std::endl; - } catch ( EXCN_Archive& excn ) { + } catch (EXCN_Archive& excn ) { //last started batch must have problems... ignore it tr.Warning << new_batch.batch()+" is errorneous: " + excn.msg() << std::endl; tr.Warning << "ignoring this batch..." << std::endl; @@ -780,7 +781,7 @@ BaseArchiveManager::start_new_batch() { } void report_batch_inconsistency( Batch& new_batch, std::string const &tag ) { - throw( EXCN_Archive( "inconsistency detected when re-reading "+new_batch.batch()+" for " + tag) ); + throw CREATE_EXCEPTION(EXCN_Archive, "inconsistency detected when re-reading "+new_batch.batch()+" for " + tag); } void @@ -804,11 +805,11 @@ BaseArchiveManager::finalize_batch( Batch& new_batch, bool reread ) { try { tr.Debug << "load options from file" << std::endl; batch_opts.load_options_from_file_exception( new_batch.flag_file() ); - } catch ( utility::excn::EXCN_Msg_Exception &excn ) { + } catch ( utility::excn::Exception &excn ) { tr.Error << "problems with flags in " << new_batch.flag_file() << " aborting... " << std::endl; // excn.show( tr.Error ); batches_.pop_back(); - throw ( EXCN_Archive( new_batch.flag_file() + " contains errors: " + excn.msg() ) ); + throw CREATE_EXCEPTION(EXCN_Archive, new_batch.flag_file() + " contains errors: " + excn.msg() ); } if ( !reread ) { //access all archive controlled options... so they are not in the "user_flags" anymore diff --git a/source/src/protocols/jd2/archive/ArchiveManager.hh b/source/src/protocols/jd2/archive/ArchiveManager.hh index f364fa8236..241c1fefe5 100644 --- a/source/src/protocols/jd2/archive/ArchiveManager.hh +++ b/source/src/protocols/jd2/archive/ArchiveManager.hh @@ -43,9 +43,9 @@ namespace protocols { namespace jd2 { namespace archive { -class EXCN_Archive : public utility::excn::EXCN_Msg_Exception { +class EXCN_Archive : public utility::excn::Exception { public: - EXCN_Archive( std::string const& msg ) : EXCN_Msg_Exception( msg ) {}; + EXCN_Archive(char const *file, int line, std::string const& msg ) : Exception(file, line, msg ) {}; }; extern void report_batch_inconsistency( Batch& new_batch, std::string const &tag ); diff --git a/source/src/protocols/jd2/archive/EvaluatedArchive.cc b/source/src/protocols/jd2/archive/EvaluatedArchive.cc index 422886ba72..ae5a989a25 100644 --- a/source/src/protocols/jd2/archive/EvaluatedArchive.cc +++ b/source/src/protocols/jd2/archive/EvaluatedArchive.cc @@ -280,7 +280,7 @@ Real EvaluatedArchive::select_score( SilentStructOP evaluated_decoy ) { } } else { //normal score-contribution --- column should be present if ( !evaluated_decoy->has_energy( name ) ) { - throw EXCN_Archive( "energy name "+name+" not found in returned decoys -- run with rescoring in archive to avoid this or fix your batches" ); + throw CREATE_EXCEPTION(EXCN_Archive, "energy name "+name+" not found in returned decoys -- run with rescoring in archive to avoid this or fix your batches" ); } // add weighted column-value to final score if ( weight > 0.01 ) { sum += weight * evaluated_decoy->get_energy( name ) / variations.find( name )->second; diff --git a/source/src/protocols/jd2/archive/NormalizedEvaluatedArchive.cc b/source/src/protocols/jd2/archive/NormalizedEvaluatedArchive.cc index f0086f956d..a08bc48716 100644 --- a/source/src/protocols/jd2/archive/NormalizedEvaluatedArchive.cc +++ b/source/src/protocols/jd2/archive/NormalizedEvaluatedArchive.cc @@ -193,7 +193,7 @@ bool NormalizedEvaluatedArchive::determine_score_variations() const { values.resize( ndecoys ); for ( SilentStructs::const_iterator iss = my_decoys.begin(); iss != my_decoys.end(); ++iss, ++ct ) { if ( !(*iss)->has_energy( name ) ) { - throw EXCN_Archive( "energy name "+name+" not found in returned decoys -- run with rescoring in archive to avoid this or fix your batches" ); + throw CREATE_EXCEPTION(EXCN_Archive, "energy name "+name+" not found in returned decoys -- run with rescoring in archive to avoid this or fix your batches" ); } // add weighted column-value to final score values[ct]=(*iss)->get_energy( name ); } diff --git a/source/src/protocols/jd3/JobDigraph.cc b/source/src/protocols/jd3/JobDigraph.cc index 15ad531ec0..c6864671e7 100644 --- a/source/src/protocols/jd3/JobDigraph.cc +++ b/source/src/protocols/jd3/JobDigraph.cc @@ -390,7 +390,7 @@ void JobDigraphUpdater::add_node() void JobDigraphUpdater::add_edge_to_new_node( core::Size tail_node, core::Size head_node ) { if ( head_node <= orig_num_nodes_ ) { - throw utility::excn::EXCN_Msg_Exception( "Error: JobQueen has tried to add an edge that lands on a node that hasn't been freshly added to the JobDigraph" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Error: JobQueen has tried to add an edge that lands on a node that hasn't been freshly added to the JobDigraph" ); } job_digraph_->add_edge( tail_node, head_node ); } diff --git a/source/src/protocols/jd3/JobDistributor.hh b/source/src/protocols/jd3/JobDistributor.hh index cc1031f8f8..37e61f4bd9 100644 --- a/source/src/protocols/jd3/JobDistributor.hh +++ b/source/src/protocols/jd3/JobDistributor.hh @@ -30,7 +30,6 @@ // Utility headers #include #include -#include namespace protocols { namespace jd3 { diff --git a/source/src/protocols/jd3/JobGenealogist.cc b/source/src/protocols/jd3/JobGenealogist.cc index 4972a7f33d..a79b67ab60 100644 --- a/source/src/protocols/jd3/JobGenealogist.cc +++ b/source/src/protocols/jd3/JobGenealogist.cc @@ -286,7 +286,7 @@ JobGenealogist::get_parent_for_job( Size job_id ) const Sizes const & parents = get_parents_for_job( job_id ); if ( parents.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "Tried to call get_parent_for_job (which requires that the job have only a single parent) for a job that" + throw CREATE_EXCEPTION(utility::excn::Exception, "Tried to call get_parent_for_job (which requires that the job have only a single parent) for a job that" " has " + utility::to_string( parents.size() ) + " parents." ); } diff --git a/source/src/protocols/jd3/full_model/FullModelJobQueen.cc b/source/src/protocols/jd3/full_model/FullModelJobQueen.cc index c2a32a0b52..6ccc17557e 100644 --- a/source/src/protocols/jd3/full_model/FullModelJobQueen.cc +++ b/source/src/protocols/jd3/full_model/FullModelJobQueen.cc @@ -98,10 +98,10 @@ PreliminaryLarvalJob::operator = ( PreliminaryLarvalJob const & rhs ) -utility::excn::EXCN_Msg_Exception +utility::excn::Exception bad_inner_job_exception() { - return utility::excn::EXCN_Msg_Exception( "The InnerLarvalJob provided to the FullModelJobQueen by the DerivedJobQueen must derive from FullModelInnerLarvalJob. Cannot proceed." ); + return CREATE_EXCEPTION(utility::excn::Exception, "The InnerLarvalJob provided to the FullModelJobQueen by the DerivedJobQueen must derive from FullModelInnerLarvalJob. Cannot proceed." ); } @@ -208,7 +208,7 @@ value_attribute_type_for_option( case BOOLEAN_VECTOR_OPTION : return xsct_bool_wsslist; // note: double check that options system uses utility/string_funcs.hh to cast from strings to bools. default : - throw utility::excn::EXCN_Msg_Exception( "Unsupported option type hit in FullModelJobQueen.cc's value_attribute" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unsupported option type hit in FullModelJobQueen.cc's value_attribute" ); } return "ERROR"; } @@ -343,7 +343,7 @@ FullModelJobQueen::job_definition_xsd() const // verify that the derived class did not call anything besides the add_ordered_subelement_set_* // functions. if ( job_ct.subelement_behavior() != se_ordered_sets ) { - throw utility::excn::EXCN_Msg_Exception( "Subclass of FullModelJobQueen's append_job_tag_subelements" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subclass of FullModelJobQueen's append_job_tag_subelements" " method invokes a method of the XMLSchemaComplexTypeGenerator that overwrote the , , and" " elements. It should only call methods named \"add_ordered_subelement_set_*\"" ); } @@ -371,7 +371,7 @@ FullModelJobQueen::job_definition_xsd() const // verify that the derived class did not call anything besides the add_ordered_subelement_set_* // functions. if ( common_block_ct_gen.subelement_behavior() != se_ordered_sets ) { - throw utility::excn::EXCN_Msg_Exception( "Subclass of FullModelJobQueen's append_job_tag_subelements" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subclass of FullModelJobQueen's append_job_tag_subelements" " method invokes a method of the XMLSchemaComplexTypeGenerator that overwrote the , , and" " elements. It should only call methods named \"add_ordered_subelement_set_*\"" ); } @@ -400,12 +400,12 @@ FullModelJobQueen::job_definition_xsd() const try { utility::tag::test_if_schema_is_valid( xsd_string ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream oss; oss << "The XML Schema for the job definition file is invalid. The error message is:\n" << e.msg() << "\nAnd the whole schema is:\n" << xsd_string << "\nThis executable cannot be used in its" << " current state.\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } return xsd_string; @@ -560,7 +560,7 @@ void FullModelJobQueen::note_job_completed( LarvalJobCOP job, JobStatus status, void FullModelJobQueen::note_job_completed( core::Size , JobStatus , Size ) { - throw utility::excn::EXCN_Msg_Exception( "FullModelJobQueen requires a LarvalJob when noting job completion" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "FullModelJobQueen requires a LarvalJob when noting job completion" ); } @@ -1488,7 +1488,7 @@ FullModelJobQueen::load_job_definition_file( XMLValidationOutput validator_output; try { validator_output = validate_xml_against_xsd( job_def_string, job_def_schema ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream oss; if ( option[ in::file::job_definition_file ].user() ) { oss << "Job definition file \"" << option[ in::file::job_definition_file ] << "\" failed to validate against" @@ -1499,7 +1499,7 @@ FullModelJobQueen::load_job_definition_file( " the schema for this application\nUse the option -jd3::job_definition_schema to output" " the schema to a file.\n" << e.msg() << "\n"; } - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( ! validator_output.valid() ) { @@ -1515,7 +1515,7 @@ FullModelJobQueen::load_job_definition_file( } oss << "Error messages were: " << validator_output.error_messages() << "\n"; oss << "Warning messages were: " << validator_output.warning_messages() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } @@ -1643,7 +1643,7 @@ FullModelJobQueen::next_batch_of_larval_jobs_from_prelim( core::Size job_node_in } else { max_njobs = 0; // this should never happen! - throw utility::excn::EXCN_Msg_Exception( "expand_job_list returned " + utility::to_string( n_made ) + " jobs when it was given a maximum number of " + utility::to_string( max_to_make ) + " to make (with max_njobs of " + utility::to_string( max_njobs ) + ")\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "expand_job_list returned " + utility::to_string( n_made ) + " jobs when it was given a maximum number of " + utility::to_string( max_to_make ) + " to make (with max_njobs of " + utility::to_string( max_njobs ) + ")\n" ); } jobs.splice( jobs.end(), curr_jobs ); @@ -1737,7 +1737,7 @@ FullModelJobQueen::note_job_result_output_or_discarded( LarvalJobCOP job, Size r oss << "Tried to note that job " << job->job_index() << " result # " << result_index << " was output; this job has already had all of its results output or the" << " FullModelJobQueen was unaware of its existence\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( result_pos_iter->second.results_output_or_discarded.member( result_index ) ) { @@ -1746,7 +1746,7 @@ FullModelJobQueen::note_job_result_output_or_discarded( LarvalJobCOP job, Size r oss << "From FullModelJobQueen::note_job_result_output_or_discarded:\n"; oss << "Tried to note that job " << job->job_index() << " result # " << result_index << " was output; this result index for this job has already been output or discarded.\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } diff --git a/source/src/protocols/jd3/full_model_inputters/FullModelInputterFactory.cc b/source/src/protocols/jd3/full_model_inputters/FullModelInputterFactory.cc index 9420d71188..efb566f513 100644 --- a/source/src/protocols/jd3/full_model_inputters/FullModelInputterFactory.cc +++ b/source/src/protocols/jd3/full_model_inputters/FullModelInputterFactory.cc @@ -56,7 +56,7 @@ FullModelInputterFactory::factory_register( FullModelInputterCreatorOP creator ) std::string err_msg = "FullModelInputterFactory::factory_register already has a full_model_inputter creator with name \"" + full_model_inputter_type + "\". Conflicting FullModelInputter names"; if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -73,7 +73,7 @@ FullModelInputterFactory::new_full_model_inputter( std::string const & full_mode FullModelInputterMap::const_iterator iter( full_model_inputter_creator_map_.find( full_model_inputter_type ) ); if ( iter != full_model_inputter_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: FullModelInputterCreatorOP prototype for " + full_model_inputter_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: FullModelInputterCreatorOP prototype for " + full_model_inputter_type + " is NULL!" ); } return iter->second->create_inputter(); } else { @@ -82,7 +82,7 @@ FullModelInputterFactory::new_full_model_inputter( std::string const & full_mode TR << full_model_inputter_elem.first << ", "; } TR << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( full_model_inputter_type + " is not known to the FullModelInputterFactory." + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, full_model_inputter_type + " is not known to the FullModelInputterFactory." " Was it registered via a FullModelInputterRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); return FullModelInputterOP(); } diff --git a/source/src/protocols/jd3/full_model_inputters/PDBFullModelInputter.cc b/source/src/protocols/jd3/full_model_inputters/PDBFullModelInputter.cc index a9c29352cf..bbb1da41bb 100644 --- a/source/src/protocols/jd3/full_model_inputters/PDBFullModelInputter.cc +++ b/source/src/protocols/jd3/full_model_inputters/PDBFullModelInputter.cc @@ -115,7 +115,7 @@ PDBFullModelInputter::full_model_input_sources_from_tag( std::string list_fname( tag->getOption< std::string >( "listfile" ) ); utility::io::izstream list_stream( list_fname.c_str() ); if ( ! list_stream.good() ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to open list file \"" + list_fname + "\"" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to open list file \"" + list_fname + "\"" ); } std::string line; while ( getline( list_stream, line ) ) { @@ -127,7 +127,7 @@ PDBFullModelInputter::full_model_input_sources_from_tag( } } else { - throw utility::excn::EXCN_Msg_Exception( "Did not find either a \"filename\" or a \"listfile\" option in the PDB input tag" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Did not find either a \"filename\" or a \"listfile\" option in the PDB input tag" ); } return input_sources; } diff --git a/source/src/protocols/jd3/full_model_inputters/SilentFileFullModelInputter.cc b/source/src/protocols/jd3/full_model_inputters/SilentFileFullModelInputter.cc index f4ef0d0d20..c202fa1e24 100644 --- a/source/src/protocols/jd3/full_model_inputters/SilentFileFullModelInputter.cc +++ b/source/src/protocols/jd3/full_model_inputters/SilentFileFullModelInputter.cc @@ -224,7 +224,7 @@ SilentFileFullModelInputter::initialize_sfd_from_options_and_tag( if ( tag ) { std::string files = tag->getOption< std::string >( "silent_files", "" ); if ( files == "" ) { - throw utility::excn::EXCN_Msg_Exception( "The 'silent_files' attribute must be provided to the SilentFileFullModelInputer" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "The 'silent_files' attribute must be provided to the SilentFileFullModelInputer" ); } utility::vector1< std::string > files_vector = utility::string_split( files, ',', std::string() ); silent_files.reserve( files_vector.size() ); diff --git a/source/src/protocols/jd3/job_distributors/JobExtractor.cc b/source/src/protocols/jd3/job_distributors/JobExtractor.cc index 643e46b3e9..87efdb9500 100644 --- a/source/src/protocols/jd3/job_distributors/JobExtractor.cc +++ b/source/src/protocols/jd3/job_distributors/JobExtractor.cc @@ -256,10 +256,10 @@ JobExtractor::query_job_queen_for_more_jobs_for_current_node() for ( LarvalJobs::const_iterator iter = jobs_for_current_node.begin(); iter != jobs_for_current_node.end(); ++iter ) { if ( ! *iter ) { - throw utility::excn::EXCN_Msg_Exception( "determine_job_list has returned a null-pointer" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "determine_job_list has returned a null-pointer" ); } if ( job_indices_seen_.member( (*iter)->job_index() ) ) { - throw utility::excn::EXCN_Msg_Exception( "determine_job_list has returned two jobs with the same job index: " + + throw CREATE_EXCEPTION(utility::excn::Exception, "determine_job_list has returned two jobs with the same job index: " + utility::to_string( (*iter)->job_index() ) + ". The job distributor requires that all jobs are given a unique job index." ); } job_indices_seen_.insert( (*iter)->job_index() ); diff --git a/source/src/protocols/jd3/job_distributors/MPIWorkPartitionJobDistributor.cc b/source/src/protocols/jd3/job_distributors/MPIWorkPartitionJobDistributor.cc index 36d1f9c88d..a658f42129 100644 --- a/source/src/protocols/jd3/job_distributors/MPIWorkPartitionJobDistributor.cc +++ b/source/src/protocols/jd3/job_distributors/MPIWorkPartitionJobDistributor.cc @@ -176,7 +176,7 @@ MPIWorkPartitionJobDistributor::go( JobQueenOP queen ) JobResultOP result; try { result = mature_job->run(); - } catch ( utility::excn::EXCN_Base const & exception ) { + } catch ( utility::excn::Exception const & exception ) { process_exception_from_job( larval_job, exception ); } process_job_result( larval_job, result ); diff --git a/source/src/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cc b/source/src/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cc index 65fa134a97..d010dbe231 100644 --- a/source/src/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cc +++ b/source/src/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cc @@ -164,12 +164,12 @@ MPIWorkPoolJobDistributor::go_master() break; case mpi_work_pool_jd_error : job_queen_->flush(); - throw utility::excn::EXCN_Msg_Exception( "Received error from node " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Received error from node " + utility::to_string( worker_node ) + ": " + utility::receive_string_from_node( worker_node ) ); break; default : // error -- we should not have gotten here - throw utility::excn::EXCN_Msg_Exception( "Internal Error in the MPIWorkPoolJobDistributor: received inappropriate signal " + throw CREATE_EXCEPTION(utility::excn::Exception, "Internal Error in the MPIWorkPoolJobDistributor: received inappropriate signal " "on node 0 from node " + utility::to_string( worker_node ) + ": " + utility::to_string( message ) ); } @@ -196,7 +196,7 @@ MPIWorkPoolJobDistributor::go_master() break; default : // error -- we should not have gotten here - throw utility::excn::EXCN_Msg_Exception( "received inappropriate signal " + throw CREATE_EXCEPTION(utility::excn::Exception, "received inappropriate signal " "on node 0 from node " + utility::to_string( worker_node ) + ": " + utility::to_string( message ) + " in final spin-down loop" ); } @@ -433,7 +433,7 @@ MPIWorkPoolJobDistributor::process_archival_complete_message( int worker_node ) try { job_summaries = deserialize_job_summaries( serialized_job_summaries_string ); } catch ( cereal::Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to deserialize the JobSummary array for job #" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to deserialize the JobSummary array for job #" + utility::to_string( job_id ) + "\nError message from the cereal library:\n" + e.what() + "\n" ); } @@ -831,7 +831,7 @@ MPIWorkPoolJobDistributor::send_next_job_to_node( int worker_node ) // that the code cannot be used in its current state because some class stored inside // the LarvalJob (or perhaps the descendent of the LarvalJob itself) does not implement // the save and load serialization funcitons. - throw utility::excn::EXCN_Msg_Exception( "Failed to serialize LarvalJob " + utility::to_string( larval_job->job_index() ) + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to serialize LarvalJob " + utility::to_string( larval_job->job_index() ) + " because it holds an unserializable object. The following error message comes from the cereal library:\n" + e.what() ); } @@ -895,7 +895,7 @@ MPIWorkPoolJobDistributor::potentially_output_some_job_results() auto location_map_iter = job_result_location_map_.find( result_id ); if ( location_map_iter == job_result_location_map_.end() ) { // TO DO: better diagnostic message here - throw utility::excn::EXCN_Msg_Exception( "Failed to find job result (" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find job result (" + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + ") for outputting as requested by the JobQeen. Has this job already been" + " output or discarded?" ); @@ -923,7 +923,7 @@ MPIWorkPoolJobDistributor::potentially_output_some_job_results() oss << "Error trying to retrieve a serialized job result from disk for job result ("; oss << result_id.first << ", " << result_id.second << " ) which should have been in "; oss << "\"" << filename_for_archive( result_id.first, result_id.second ) << "\"\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } remove( filename_for_archive( result_id.first, result_id.second ).c_str() ); } else { @@ -932,7 +932,7 @@ MPIWorkPoolJobDistributor::potentially_output_some_job_results() std::ostringstream oss; oss << "Error trying to find job result ( " << result_id.first << ", "; oss << result_id.second << " ); node 0 thinks it ought to have this result.\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } serialized_job_and_result = std::move( *job_and_result_iter->second ); job_results_.erase( job_and_result_iter ); @@ -942,7 +942,7 @@ MPIWorkPoolJobDistributor::potentially_output_some_job_results() try { job_and_result = deserialize_larval_job_and_result( serialized_job_and_result ); } catch ( cereal::Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to deserialize LarvalJob & JobResult pair for job #" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to deserialize LarvalJob & JobResult pair for job #" + utility::to_string( result_id.first ) + " result index #" + utility::to_string( result_id.second ) + "\nError message from the cereal library:\n" + e.what() + "\n" ); } @@ -993,7 +993,7 @@ MPIWorkPoolJobDistributor::potentially_discard_some_job_results() for ( JobResultID result_id : jobs_to_discard ) { if ( job_result_location_map_.count( result_id ) == 0 ) { // TO DO: better diagnostic message here - throw utility::excn::EXCN_Msg_Exception( "Failed to find job result " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find job result " + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + " for discarding as requested by the JobQeen. Has this job already been" + " output or discarded?" ); @@ -1196,7 +1196,7 @@ MPIWorkPoolJobDistributor::throw_after_failed_to_retrieve_job_result( " archive node; it perhaps has been output or discarded already.\n"; } - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } @@ -1259,9 +1259,9 @@ MPIWorkPoolJobDistributor::retrieve_job_and_run() std::cerr << "std::IO error detected... exiting..." << std::endl; // We can not longer use Tracer's at this point // Using pure exit instead of utility_exit_with_status to avoid infinite recursion std::exit( basic::options::option[ basic::options::OptionKeys::out::std_IO_exit_error_code]() ); - } catch ( utility::excn::EXCN_BadInput & excn ) { + } catch ( utility::excn::BadInput & excn ) { worker_send_fail_on_bad_inputs_exception_message_to_master( larval_job, excn.msg() ); - } catch ( utility::excn::EXCN_Base & excn ) { + } catch ( utility::excn::Exception & excn ) { worker_send_fail_w_message_to_master( larval_job, excn.msg() ); } catch ( ... ) { worker_send_fail_w_message_to_master( larval_job, "Unhandled exception!" ); diff --git a/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.cc b/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.cc index cb04bc7768..cd81e2f22c 100644 --- a/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.cc +++ b/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.cc @@ -62,11 +62,11 @@ MultiThreadedJobDistributor::MultiThreadedJobDistributor() : default_retry_limit_( 1 ) { if ( ! basic::options::option[ basic::options::OptionKeys::jd3::nthreads ].active() ) { - throw utility::excn::EXCN_Msg_Exception( "jd3::nthreads not specified" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "jd3::nthreads not specified" ); } if ( basic::options::option[ basic::options::OptionKeys::jd3::nthreads ]() <= 0 ) { - throw utility::excn::EXCN_Msg_Exception( "negative or zero value passed in for jd3::nthreads" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "negative or zero value passed in for jd3::nthreads" ); } nthreads_ = basic::options::option[ basic::options::OptionKeys::jd3::nthreads ](); @@ -159,7 +159,7 @@ MultiThreadedJobDistributor::prepare_next_job( LarvalJobOP larval_job, core::Siz oss << larval_job->input_job_result_indices()[ ii ].first << ", "; oss << larval_job->input_job_result_indices()[ ii ].second << ")"; TR.Error << oss.str() << std::endl; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } input_job_results[ ii ] = iter->second.second; } @@ -226,7 +226,7 @@ MultiThreadedJobDistributor::potentially_output_some_job_results() JobResultID result_id = output_spec->result_id(); auto result_iter = job_results_.find( result_id ); if ( result_iter == job_results_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to retrieve job result (" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to retrieve job result (" + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + ") for outputting as requested by the JobQeen. Has this job already been output?" ); } @@ -249,7 +249,7 @@ MultiThreadedJobDistributor::potentially_discard_some_job_results() for ( JobResultID result_id : jobs_to_discard ) { if ( job_results_.count( result_id ) == 0 ) { // TO DO: better diagnostic message here - throw utility::excn::EXCN_Msg_Exception( "Failed to find job result " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find job result " + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + " for discarding as requested by the JobQeen. Has this job already been" + " output or discarded?" ); @@ -292,7 +292,7 @@ void JobRunner::run( int thread_index ) try { job_result_ = mature_job_->run(); - } catch ( utility::excn::EXCN_Base & e ) { + } catch ( utility::excn::Exception & e ) { exception_message_ = e.msg(); exited_w_exception_ = true; } catch ( ... ) { diff --git a/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.hh b/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.hh index e96f28b915..64a2ac9b31 100644 --- a/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.hh +++ b/source/src/protocols/jd3/job_distributors/MultiThreadedJobDistributor.hh @@ -38,7 +38,7 @@ // Utility headers #include #include -#include +#include // C++ headers #include diff --git a/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.cc b/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.cc index 5a75081af4..ff89aa81c7 100644 --- a/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.cc +++ b/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.cc @@ -74,7 +74,7 @@ VanillaJobDistributor::go( JobQueenOP queen ) { std::pair< SizeList, bool > job_total_order_pair = topological_sort( *job_dag_ ); if ( ! job_total_order_pair.second ) { job_queen_->flush(); - throw utility::excn::EXCN_Msg_Exception( "JobQueen produced a non-DAG job graph." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "JobQueen produced a non-DAG job graph." ); } SizeList job_total_order = job_total_order_pair.first; for ( Size const job_node : job_total_order ) { @@ -144,7 +144,7 @@ VanillaJobDistributor::construct_job_result_input_list( LarvalJobCOP larval_job for ( auto const result_id : larval_job->input_job_result_indices() ) { auto result_iter = job_results_.find( result_id ); if ( result_iter == job_results_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to retrieve job result (" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to retrieve job result (" + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + ") requested by LarvalJob " + larval_job->job_tag() ); } @@ -163,7 +163,7 @@ VanillaJobDistributor::run_mature_job( // Run the job! try { job_output = mature_job->run(); - } catch ( utility::excn::EXCN_Base & e ) { + } catch ( utility::excn::Exception & e ) { // An exception thrown by this job. Inform the JobQueen that it's a badie. TR.Error << "Job " << larval_job->job_index() << " named " << larval_job->job_tag() << " threw an exception:\n" << e.msg() << std::endl; @@ -187,7 +187,7 @@ VanillaJobDistributor::potentially_output_some_job_results() JobResultID result_id = output_spec->result_id(); auto result_iter = job_results_.find( result_id ); if ( result_iter == job_results_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to retrieve job result (" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to retrieve job result (" + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + ") for outputting as requested by the JobQeen. Has this job already been output?" ); } @@ -210,7 +210,7 @@ VanillaJobDistributor::potentially_discard_some_job_results() auto result_iter = job_results_.find( result_id ); if ( result_iter == job_results_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to retrieve job result (" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to retrieve job result (" + utility::to_string( result_id.first ) + ", " + utility::to_string( result_id.second ) + + ") for discardting as requested by the JobQeen. Has this job already been output?" ); } diff --git a/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.hh b/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.hh index 4cc85c22e5..8f5d898495 100644 --- a/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.hh +++ b/source/src/protocols/jd3/job_distributors/VanillaJobDistributor.hh @@ -34,7 +34,7 @@ // Utility headers #include #include -#include +#include // C++ headers #include diff --git a/source/src/protocols/jd3/pose_inputters/PDBPoseInputter.cc b/source/src/protocols/jd3/pose_inputters/PDBPoseInputter.cc index bd4a7ac76a..1bd75bd06d 100644 --- a/source/src/protocols/jd3/pose_inputters/PDBPoseInputter.cc +++ b/source/src/protocols/jd3/pose_inputters/PDBPoseInputter.cc @@ -103,7 +103,7 @@ PDBPoseInputter::pose_input_sources_from_tag( std::string list_fname( tag->getOption< std::string >( "listfile" ) ); utility::io::izstream list_stream( list_fname.c_str() ); if ( ! list_stream.good() ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to open list file \"" + list_fname + "\"" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to open list file \"" + list_fname + "\"" ); } std::string line; while ( getline( list_stream, line ) ) { @@ -118,7 +118,7 @@ PDBPoseInputter::pose_input_sources_from_tag( } } else { - throw utility::excn::EXCN_Msg_Exception( "Did not find either a \"filename\" or a \"listfile\" option in the PDB input tag" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Did not find either a \"filename\" or a \"listfile\" option in the PDB input tag" ); } return input_sources; } diff --git a/source/src/protocols/jd3/pose_inputters/PoseInputterFactory.cc b/source/src/protocols/jd3/pose_inputters/PoseInputterFactory.cc index 00757581f5..85ad8894e1 100644 --- a/source/src/protocols/jd3/pose_inputters/PoseInputterFactory.cc +++ b/source/src/protocols/jd3/pose_inputters/PoseInputterFactory.cc @@ -56,7 +56,7 @@ PoseInputterFactory::factory_register( PoseInputterCreatorOP creator ) std::string err_msg = "PoseInputterFactory::factory_register already has a pose_inputter creator with name \"" + pose_inputter_type + "\". Conflicting PoseInputter names"; if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -73,7 +73,7 @@ PoseInputterFactory::new_pose_inputter( std::string const & pose_inputter_type ) PoseInputterMap::const_iterator iter( pose_inputter_creator_map_.find( pose_inputter_type ) ); if ( iter != pose_inputter_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: PoseInputterCreatorOP prototype for " + pose_inputter_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: PoseInputterCreatorOP prototype for " + pose_inputter_type + " is NULL!" ); } return iter->second->create_inputter(); } else { @@ -82,7 +82,7 @@ PoseInputterFactory::new_pose_inputter( std::string const & pose_inputter_type ) TR << pose_inputter_elem.first << ", "; } TR << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( pose_inputter_type + " is not known to the PoseInputterFactory." + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, pose_inputter_type + " is not known to the PoseInputterFactory." " Was it registered via a PoseInputterRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); return PoseInputterOP(); } diff --git a/source/src/protocols/jd3/pose_inputters/SilentFilePoseInputter.cc b/source/src/protocols/jd3/pose_inputters/SilentFilePoseInputter.cc index 1f56f05a77..2c1dbb0532 100644 --- a/source/src/protocols/jd3/pose_inputters/SilentFilePoseInputter.cc +++ b/source/src/protocols/jd3/pose_inputters/SilentFilePoseInputter.cc @@ -208,7 +208,7 @@ SilentFilePoseInputter::initialize_sfd_from_options_and_tag( if ( tag ) { std::string files = tag->getOption< std::string >( "silent_files", "" ); if ( files == "" ) { - throw utility::excn::EXCN_Msg_Exception( "The 'silent_files' attribute must be provided to the SilentFilePoseInputer" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "The 'silent_files' attribute must be provided to the SilentFilePoseInputer" ); } utility::vector1< std::string > files_vector = utility::string_split( files, ',', std::string() ); silent_files.reserve( files_vector.size() ); diff --git a/source/src/protocols/jd3/pose_outputters/PoseOutputterFactory.cc b/source/src/protocols/jd3/pose_outputters/PoseOutputterFactory.cc index 72ca108954..30832032f8 100644 --- a/source/src/protocols/jd3/pose_outputters/PoseOutputterFactory.cc +++ b/source/src/protocols/jd3/pose_outputters/PoseOutputterFactory.cc @@ -58,7 +58,7 @@ PoseOutputterFactory::factory_register( PoseOutputterCreatorOP creator ) std::string err_msg = "PoseOutputterFactory::factory_register already has a pose_outputter creator with name \"" + pose_outputter_type + "\". Conflicting PoseOutputter names"; if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -76,7 +76,7 @@ PoseOutputterFactory::factory_register( SecondaryPoseOutputterCreatorOP creator std::string err_msg = "PoseOutputterFactory::factory_register already has a secondary pose outputter creator with name \"" + secondary_pose_outputter_type + "\". Conflicting SecondaryPoseOutputter names"; if ( throw_on_double_registration_ ) { - throw utility::excn::EXCN_Msg_Exception( err_msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg ); } else { utility_exit_with_message( err_msg ); } @@ -93,7 +93,7 @@ PoseOutputterFactory::new_pose_outputter( std::string const & pose_outputter_typ PoseOutputterMap::const_iterator iter( pose_outputter_creator_map_.find( pose_outputter_type ) ); if ( iter != pose_outputter_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: PoseOutputterCreatorOP prototype for " + pose_outputter_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: PoseOutputterCreatorOP prototype for " + pose_outputter_type + " is NULL!" ); } return iter->second->create_outputter(); } else { @@ -102,7 +102,7 @@ PoseOutputterFactory::new_pose_outputter( std::string const & pose_outputter_typ TR << elem.first << ", "; } TR << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( pose_outputter_type + " is not known to the PoseOutputterFactory." + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, pose_outputter_type + " is not known to the PoseOutputterFactory." " Was it registered via a PoseOutputterRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); return PoseOutputterOP(); } @@ -115,7 +115,7 @@ PoseOutputterFactory::new_secondary_outputter( std::string const & secondary_out SecondaryOutputterMap::const_iterator iter( secondary_pose_outputter_creator_map_.find( secondary_outputter_type ) ); if ( iter != secondary_pose_outputter_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: SecondaryPoseOutputterCreatorOP prototype for " + secondary_outputter_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: SecondaryPoseOutputterCreatorOP prototype for " + secondary_outputter_type + " is NULL!" ); } return iter->second->create_outputter(); } else { @@ -124,7 +124,7 @@ PoseOutputterFactory::new_secondary_outputter( std::string const & secondary_out TR << elem.first << ", "; } TR << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( secondary_outputter_type + " is not known to the PoseOutputterFactory." + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, secondary_outputter_type + " is not known to the PoseOutputterFactory." " Was it registered via a SecondaryPoseOutputterRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); return SecondaryPoseOutputterOP(); } diff --git a/source/src/protocols/jd3/standard/StandardJobQueen.cc b/source/src/protocols/jd3/standard/StandardJobQueen.cc index 9d4fcdc759..62b626cc46 100644 --- a/source/src/protocols/jd3/standard/StandardJobQueen.cc +++ b/source/src/protocols/jd3/standard/StandardJobQueen.cc @@ -93,10 +93,10 @@ PreliminaryLarvalJob::operator = ( PreliminaryLarvalJob const & rhs ) -utility::excn::EXCN_Msg_Exception +utility::excn::Exception bad_inner_job_exception() { - return utility::excn::EXCN_Msg_Exception( "The InnerLarvalJob provided to the StandardJobQueen by the DerivedJobQueen must derive from StandardInnerLarvalJob. Cannot proceed." ); + return CREATE_EXCEPTION(utility::excn::Exception, "The InnerLarvalJob provided to the StandardJobQueen by the DerivedJobQueen must derive from StandardInnerLarvalJob. Cannot proceed."); } @@ -184,7 +184,7 @@ value_attribute_type_for_option( case BOOLEAN_VECTOR_OPTION : return xsct_bool_wsslist; // note: double check that options system uses utility/string_funcs.hh to cast from strings to bools. default : - throw utility::excn::EXCN_Msg_Exception( "Unsupported option type hit in StandardJobQueen.cc's value_attribute" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unsupported option type hit in StandardJobQueen.cc's value_attribute" ); } return "ERROR"; } @@ -319,7 +319,7 @@ StandardJobQueen::job_definition_xsd() const // verify that the derived class did not call anything besides the add_ordered_subelement_set_* // functions. if ( job_ct.subelement_behavior() != se_ordered_sets ) { - throw utility::excn::EXCN_Msg_Exception( "Subclass of StandardJobQueen's append_job_tag_subelements" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subclass of StandardJobQueen's append_job_tag_subelements" " method invokes a method of the XMLSchemaComplexTypeGenerator that overwrote the , , and" " elements. It should only call methods named \"add_ordered_subelement_set_*\"" ); } @@ -347,7 +347,7 @@ StandardJobQueen::job_definition_xsd() const // verify that the derived class did not call anything besides the add_ordered_subelement_set_* // functions. if ( common_block_ct_gen.subelement_behavior() != se_ordered_sets ) { - throw utility::excn::EXCN_Msg_Exception( "Subclass of StandardJobQueen's append_job_tag_subelements" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subclass of StandardJobQueen's append_job_tag_subelements" " method invokes a method of the XMLSchemaComplexTypeGenerator that overwrote the , , and" " elements. It should only call methods named \"add_ordered_subelement_set_*\"" ); } @@ -376,12 +376,12 @@ StandardJobQueen::job_definition_xsd() const try { utility::tag::test_if_schema_is_valid( xsd_string ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream oss; oss << "The XML Schema for the job definition file is invalid. The error message is:\n" << e.msg() << "\nAnd the whole schema is:\n" << xsd_string << "\nThis executable cannot be used in its" << " current state.\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } return xsd_string; @@ -537,7 +537,7 @@ void StandardJobQueen::note_job_completed( LarvalJobCOP job, JobStatus status, S void StandardJobQueen::note_job_completed( core::Size, JobStatus, Size ) { - throw utility::excn::EXCN_Msg_Exception( "StandardJobQueen requires a LarvalJob when noting job completion" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "StandardJobQueen requires a LarvalJob when noting job completion" ); } bool StandardJobQueen::larval_job_needed_for_completed_job_summary() const { return false; } @@ -1491,7 +1491,7 @@ StandardJobQueen::load_job_definition_file( XMLValidationOutput validator_output; try { validator_output = validate_xml_against_xsd( job_def_string, job_def_schema ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream oss; if ( option[ in::file::job_definition_file ].user() ) { oss << "Job definition file \"" << option[ in::file::job_definition_file ] << "\" failed to validate against" @@ -1502,7 +1502,7 @@ StandardJobQueen::load_job_definition_file( " the schema for this application\nUse the option -jd3::job_definition_schema to output" " the schema to a file.\n" << e.msg() << "\n"; } - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( ! validator_output.valid() ) { @@ -1518,7 +1518,7 @@ StandardJobQueen::load_job_definition_file( } oss << "Error messages were: " << validator_output.error_messages() << "\n"; oss << "Warning messages were: " << validator_output.warning_messages() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } @@ -1649,7 +1649,7 @@ StandardJobQueen::next_batch_of_larval_jobs_from_prelim( core::Size job_node_ind } else { max_njobs = 0; // this should never happen! - throw utility::excn::EXCN_Msg_Exception( "expand_job_list returned " + utility::to_string( n_made ) + " jobs when it was given a maximum number of " + utility::to_string( max_to_make ) + " to make (with max_njobs of " + utility::to_string( max_njobs ) + ")\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "expand_job_list returned " + utility::to_string( n_made ) + " jobs when it was given a maximum number of " + utility::to_string( max_to_make ) + " to make (with max_njobs of " + utility::to_string( max_njobs ) + ")\n" ); } jobs.splice( jobs.end(), curr_jobs ); @@ -1745,7 +1745,7 @@ StandardJobQueen::note_job_result_output_or_discarded( LarvalJobCOP job, Size re oss << "Tried to note that job " << job->job_index() << " result # " << result_index << " was output; this job has already had all of its results output or the" << " StandardJobQueen was unaware of its existence\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( result_pos_iter->second.results_output_or_discarded.member( result_index ) ) { @@ -1754,7 +1754,7 @@ StandardJobQueen::note_job_result_output_or_discarded( LarvalJobCOP job, Size re oss << "From StandardJobQueen::note_job_result_output_or_discarded:\n"; oss << "Tried to note that job " << job->job_index() << " result # " << result_index << " was output; this result index for this job has already been output or discarded.\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } diff --git a/source/src/protocols/jumping/util.cc b/source/src/protocols/jumping/util.cc index 3c32d1991f..86435ab5e8 100644 --- a/source/src/protocols/jumping/util.cc +++ b/source/src/protocols/jumping/util.cc @@ -97,7 +97,7 @@ close_chainbreaks( //runtime_assert that all cut-points in final_fold_tree are also contained the actual fold_tree for ( Size ncut = 1; ncut <= (Size)final_fold_tree.num_cutpoint(); ncut++ ) { if ( !open_pose.fold_tree().is_cutpoint( final_fold_tree.cutpoint( ncut ) ) ) { - throw( loops::EXCN_Loop_not_closed( "Foldtree mismatch." ) ); + throw ( CREATE_EXCEPTION(loops::EXCN_Loop_not_closed, "Foldtree mismatch." ) ); } } tr.Debug << "close chainbreaks until final fold-tree is reached\n"; @@ -145,7 +145,7 @@ close_chainbreaks( } } if ( cuts.empty() ) { //size() == 0 ) { - throw( loops::EXCN_Loop_not_closed( "no moveable piece to close loop" ) ); + throw ( CREATE_EXCEPTION(loops::EXCN_Loop_not_closed, "no moveable piece to close loop" ) ); } Size const cutpoint( cuts.back().second ); //largest is last... so take last element diff --git a/source/src/protocols/legacy_sewing/sampling/LegacyAssemblyMover.cc b/source/src/protocols/legacy_sewing/sampling/LegacyAssemblyMover.cc index f8ed7fef34..af506653fb 100644 --- a/source/src/protocols/legacy_sewing/sampling/LegacyAssemblyMover.cc +++ b/source/src/protocols/legacy_sewing/sampling/LegacyAssemblyMover.cc @@ -516,7 +516,7 @@ LegacyAssemblyMover::parse_requirements( TR.Error << "Only allowed sub-tags of LegacyAssemblyMover are GlobalRequirements" << std::endl; TR.Error << "and IntraSegmentRequirements. Please see the LEGACY_SEWING protocol documentation" << std::endl; TR.Error << "Tag with name '" << requirement_tag->getName() << "' is invalid" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } } } diff --git a/source/src/protocols/ligand_docking/AtomCountFilter.cc b/source/src/protocols/ligand_docking/AtomCountFilter.cc index 518efb9e24..bb828f3b56 100644 --- a/source/src/protocols/ligand_docking/AtomCountFilter.cc +++ b/source/src/protocols/ligand_docking/AtomCountFilter.cc @@ -60,7 +60,7 @@ void AtomCountFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! (tag->hasOption("chain") && tag->hasOption("atom_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("AtomCount filter needs a 'chain' and an 'atom_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "AtomCount filter needs a 'chain' and an 'atom_limit' option"); } chain_ = tag->getOption("chain"); atom_limit_ = tag->getOption("atom_limit"); diff --git a/source/src/protocols/ligand_docking/ChainExistsFilter.cc b/source/src/protocols/ligand_docking/ChainExistsFilter.cc index 03c2b2178b..e3626fab6f 100644 --- a/source/src/protocols/ligand_docking/ChainExistsFilter.cc +++ b/source/src/protocols/ligand_docking/ChainExistsFilter.cc @@ -56,7 +56,7 @@ ChainExistsFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::Dat { if ( ! tag->hasOption("chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("ChainExists filter needs a 'chain' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ChainExists filter needs a 'chain' option"); } chain_ = tag->getOption("chain"); } diff --git a/source/src/protocols/ligand_docking/CompleteConnectionsFilter.cc b/source/src/protocols/ligand_docking/CompleteConnectionsFilter.cc index 854ff41a8d..0f8d40c02b 100644 --- a/source/src/protocols/ligand_docking/CompleteConnectionsFilter.cc +++ b/source/src/protocols/ligand_docking/CompleteConnectionsFilter.cc @@ -65,7 +65,7 @@ void CompleteConnectionsFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! tag->hasOption("chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("CompleteConnections filter needs a 'chain' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CompleteConnections filter needs a 'chain' option"); } chain_ = tag->getOption("chain"); } diff --git a/source/src/protocols/ligand_docking/CompoundTranslate.cc b/source/src/protocols/ligand_docking/CompoundTranslate.cc index 7204b1d5ea..db97767372 100644 --- a/source/src/protocols/ligand_docking/CompoundTranslate.cc +++ b/source/src/protocols/ligand_docking/CompoundTranslate.cc @@ -101,13 +101,13 @@ CompoundTranslate::parse_my_tag( ) { if ( tag->getName() != "CompoundTranslate" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } if ( ! tag->hasOption("randomize_order") ) { - throw utility::excn::EXCN_RosettaScriptsOption("CompoundTranslate needs a 'randomize_order' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CompoundTranslate needs a 'randomize_order' option"); } if ( ! tag->hasOption("allow_overlap") ) { - throw utility::excn::EXCN_RosettaScriptsOption("CompoundTranslate needs an 'allow_overlap' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CompoundTranslate needs an 'allow_overlap' option"); } // parsing randomize_order tag @@ -132,10 +132,10 @@ CompoundTranslate::parse_my_tag( translate->parse_my_tag( subtag, datamap, filters, movers, pose); translates_.push_back(translate); } else if ( name == "Translates" ) { - if ( ! subtag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translates' mover requires chain tag"); - if ( ! subtag->hasOption("distribution") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translates' mover requires distribution tag"); - if ( ! subtag->hasOption("angstroms") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translates' mover requires angstroms tag"); - if ( ! subtag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translates' mover requires cycles tag"); + if ( ! subtag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translates' mover requires chain tag"); + if ( ! subtag->hasOption("distribution") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translates' mover requires distribution tag"); + if ( ! subtag->hasOption("angstroms") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translates' mover requires angstroms tag"); + if ( ! subtag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translates' mover requires cycles tag"); std::string const & chain = subtag->getOption("chain"); utility::vector1 chain_ids = core::pose::get_chain_ids_from_chain(chain, pose); @@ -156,7 +156,7 @@ CompoundTranslate::parse_my_tag( translates_.push_back(protocols::ligand_docking::TranslateOP( new Translate(translate_info) )); } } else { - throw utility::excn::EXCN_RosettaScriptsOption("CompoundTranslate only takes Translate or Translates child tags"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "CompoundTranslate only takes Translate or Translates child tags"); } } } diff --git a/source/src/protocols/ligand_docking/ComputeLigandRDF.cc b/source/src/protocols/ligand_docking/ComputeLigandRDF.cc index 04eb6cbc89..627d8ef12e 100644 --- a/source/src/protocols/ligand_docking/ComputeLigandRDF.cc +++ b/source/src/protocols/ligand_docking/ComputeLigandRDF.cc @@ -131,19 +131,19 @@ void ComputeLigandRDF::parse_my_tag ) { if ( ! tag->hasOption("mode") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover 'ComputeLigandRDF' needs option 'mode'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover 'ComputeLigandRDF' needs option 'mode'"); } //right now, we assume that all things that aren't the ligand chain are the protein chain if ( !tag->hasOption("ligand_chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover 'ComputeLigandRDF' needs option 'ligand_chain'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover 'ComputeLigandRDF' needs option 'ligand_chain'"); } mode_ = tag->getOption("mode"); ligand_chain_ = tag->getOption("ligand_chain"); if ( mode_ != "pocket" && mode_ != "interface" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover 'ComputeLigandRDF' must have a mode of either 'pocket' or 'interface'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover 'ComputeLigandRDF' must have a mode of either 'pocket' or 'interface'"); } bin_count_ = tag->getOption("bin_count",100); @@ -160,10 +160,10 @@ void ComputeLigandRDF::parse_my_tag rdf::RDFBaseOP rdf_function(rdf::RDFFunctionFactory::get_instance()->get_rdf_function(function_tag, data_map)); rdf_functions_.push_back(rdf_function); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { compute_rdf_tracer.Error << "Please include only RDFFunction tags as subtags of ComputeLigandRDF" << std::endl; compute_rdf_tracer.Error << "Tag with name '" << function_tag->getName() << "' is invalid" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } } } diff --git a/source/src/protocols/ligand_docking/FinalMinimizer.cc b/source/src/protocols/ligand_docking/FinalMinimizer.cc index c1e16982c4..9f66c4e861 100644 --- a/source/src/protocols/ligand_docking/FinalMinimizer.cc +++ b/source/src/protocols/ligand_docking/FinalMinimizer.cc @@ -114,15 +114,15 @@ FinalMinimizer::parse_my_tag( core::pose::Pose const & /*pose*/ ) { - if ( tag->getName() != "FinalMinimizer" ) throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + if ( tag->getName() != "FinalMinimizer" ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); /// Score Function /// - if ( ! tag->hasOption("scorefxn") ) throw utility::excn::EXCN_RosettaScriptsOption("'FinalMinimizer' requires 'scorefxn' tag"); + if ( ! tag->hasOption("scorefxn") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'FinalMinimizer' requires 'scorefxn' tag"); std::string scorefxn_name= tag->getOption("scorefxn"); score_fxn_= datamap.get_ptr( "scorefxns", scorefxn_name); /// MoveMapBuilder/// - if ( ! tag->hasOption("movemap_builder") ) throw utility::excn::EXCN_RosettaScriptsOption("'FinalMinimizer' requires 'movemap_builder' tag"); + if ( ! tag->hasOption("movemap_builder") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'FinalMinimizer' requires 'movemap_builder' tag"); std::string movemap_builder_name= tag->getOption("movemap_builder"); movemap_builder_= datamap.get_ptr( "movemap_builders", movemap_builder_name); diff --git a/source/src/protocols/ligand_docking/GrowLigand.cc b/source/src/protocols/ligand_docking/GrowLigand.cc index f5415b32cc..ef2515e656 100644 --- a/source/src/protocols/ligand_docking/GrowLigand.cc +++ b/source/src/protocols/ligand_docking/GrowLigand.cc @@ -135,7 +135,7 @@ GrowLigand::parse_my_tag( if ( tag->hasOption("chain") ) { chain_ = tag->getOption("chain"); } else { - throw utility::excn::EXCN_RosettaScriptsOption("HeavyAtom filter needs a 'chain' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "HeavyAtom filter needs a 'chain' option"); } } diff --git a/source/src/protocols/ligand_docking/HBondAcceptorFilter.cc b/source/src/protocols/ligand_docking/HBondAcceptorFilter.cc index 76b82e4872..d07bab0291 100644 --- a/source/src/protocols/ligand_docking/HBondAcceptorFilter.cc +++ b/source/src/protocols/ligand_docking/HBondAcceptorFilter.cc @@ -60,7 +60,7 @@ void HBondAcceptorFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! (tag->hasOption("chain") && tag->hasOption("hbond_acceptor_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("HBondAcceptor filter needs a 'chain' and an 'hbond_acceptor_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "HBondAcceptor filter needs a 'chain' and an 'hbond_acceptor_limit' option"); } chain_ = tag->getOption("chain"); hbond_acceptor_limit_ = tag->getOption("hbond_acceptor_limit"); diff --git a/source/src/protocols/ligand_docking/HBondDonorFilter.cc b/source/src/protocols/ligand_docking/HBondDonorFilter.cc index 47967a29de..82f6c8039e 100644 --- a/source/src/protocols/ligand_docking/HBondDonorFilter.cc +++ b/source/src/protocols/ligand_docking/HBondDonorFilter.cc @@ -61,7 +61,7 @@ HBondDonorFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::Data { if ( ! (tag->hasOption("chain") && tag->hasOption("hbond_donor_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("HBondDonor filter needs a 'chain' and an 'hbond_donor_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "HBondDonor filter needs a 'chain' and an 'hbond_donor_limit' option"); } chain_ = tag->getOption("chain"); hbond_donor_limit_ = tag->getOption("hbond_donor_limit"); diff --git a/source/src/protocols/ligand_docking/HeavyAtomFilter.cc b/source/src/protocols/ligand_docking/HeavyAtomFilter.cc index a40bc6e360..4610bfcfc0 100644 --- a/source/src/protocols/ligand_docking/HeavyAtomFilter.cc +++ b/source/src/protocols/ligand_docking/HeavyAtomFilter.cc @@ -62,7 +62,7 @@ void HeavyAtomFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! (tag->hasOption("chain") && tag->hasOption("heavy_atom_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("HeavyAtom filter needs a 'chain' and a 'heavy_atom_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "HeavyAtom filter needs a 'chain' and a 'heavy_atom_limit' option"); } chain_ = tag->getOption("chain"); heavy_atom_limit_ = tag->getOption("heavy_atom_limit"); diff --git a/source/src/protocols/ligand_docking/HighResDocker.cc b/source/src/protocols/ligand_docking/HighResDocker.cc index e542616032..f69efad82d 100644 --- a/source/src/protocols/ligand_docking/HighResDocker.cc +++ b/source/src/protocols/ligand_docking/HighResDocker.cc @@ -154,22 +154,22 @@ HighResDocker::parse_my_tag( ) { if ( tag->getName() != "HighResDocker" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } // cycles and repack_every_Nth - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' mover requires cycles tag"); - if ( ! tag->hasOption("repack_every_Nth") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' mover requires repack_every_Nth tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' mover requires cycles tag"); + if ( ! tag->hasOption("repack_every_Nth") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' mover requires repack_every_Nth tag"); num_cycles_= tag->getOption("cycles"); repack_every_Nth_= tag->getOption("repack_every_Nth"); /// Score Function /// - if ( ! tag->hasOption("scorefxn") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' requires 'scorefxn' tag"); + if ( ! tag->hasOption("scorefxn") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' requires 'scorefxn' tag"); std::string scorefxn_name= tag->getOption("scorefxn"); score_fxn_= datamap.get_ptr( "scorefxns", scorefxn_name); /// MoveMapBuilder/// - if ( ! tag->hasOption("movemap_builder") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' requires 'movemap_builder' tag"); + if ( ! tag->hasOption("movemap_builder") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' requires 'movemap_builder' tag"); std::string movemap_builder_name= tag->getOption("movemap_builder"); movemap_builder_= datamap.get_ptr( "movemap_builders", movemap_builder_name); diff --git a/source/src/protocols/ligand_docking/HighResEnsemble.cc b/source/src/protocols/ligand_docking/HighResEnsemble.cc index 1d4cb0be3e..8d605f4579 100644 --- a/source/src/protocols/ligand_docking/HighResEnsemble.cc +++ b/source/src/protocols/ligand_docking/HighResEnsemble.cc @@ -204,7 +204,7 @@ HighResEnsemble::parse_my_tag( std::string movemap_builder_name= tag->getOption("final_move"); final_movemap_builder_= datamap.get_ptr< protocols::ligand_docking::MoveMapBuilder >( "movemap_builders", movemap_builder_name); } else if ( tag->hasOption("final_score") || tag->hasOption("final_move") ) { - throw utility::excn::EXCN_RosettaScriptsOption("FinalMinimzer Step requires final_score and final_map tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "FinalMinimzer Step requires final_score and final_map tag"); } bool use_rosetta; diff --git a/source/src/protocols/ligand_docking/InterfaceBuilder.cc b/source/src/protocols/ligand_docking/InterfaceBuilder.cc index f26d041109..37f1596c52 100644 --- a/source/src/protocols/ligand_docking/InterfaceBuilder.cc +++ b/source/src/protocols/ligand_docking/InterfaceBuilder.cc @@ -78,7 +78,7 @@ InterfaceBuilder::parse_my_tag( if ( tag->hasOption("extension_window") ) { extension_window_= tag->getOption("extension_window"); } - if ( ! tag->hasOption("ligand_areas") ) throw utility::excn::EXCN_RosettaScriptsOption("InterfaceBuilders need at least one ligand area to build around"); + if ( ! tag->hasOption("ligand_areas") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "InterfaceBuilders need at least one ligand area to build around"); std::string ligand_areas_string= tag->getOption("ligand_areas"); utility::vector1 ligand_area_strings= utility::string_split(ligand_areas_string, ','); diff --git a/source/src/protocols/ligand_docking/InterfaceScoreCalculator.cc b/source/src/protocols/ligand_docking/InterfaceScoreCalculator.cc index 809df46c3c..cb14e3595b 100644 --- a/source/src/protocols/ligand_docking/InterfaceScoreCalculator.cc +++ b/source/src/protocols/ligand_docking/InterfaceScoreCalculator.cc @@ -108,13 +108,13 @@ InterfaceScoreCalculator::parse_my_tag( core::pose::Pose const & /*pose*/ ) { - if ( ! tag->hasOption("chains") ) throw utility::excn::EXCN_RosettaScriptsOption("'InterfaceScoreCalculator' requires 'chains' tag (comma separated chains to dock)"); + if ( ! tag->hasOption("chains") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'InterfaceScoreCalculator' requires 'chains' tag (comma separated chains to dock)"); std::string const chains_str = tag->getOption("chains"); chains_= utility::string_split(chains_str, ','); /// Score Function /// - if ( ! tag->hasOption("scorefxn") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' requires 'scorefxn' tag"); + if ( ! tag->hasOption("scorefxn") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' requires 'scorefxn' tag"); std::string scorefxn_name= tag->getOption("scorefxn"); score_fxn_= datamap.get_ptr( "scorefxns", scorefxn_name); debug_assert(score_fxn_); @@ -144,7 +144,7 @@ InterfaceScoreCalculator::parse_my_tag( if ( grid_set_prototype_ == nullptr ) { if ( tag->hasOption("compute_grid_scores") ) { // Explicitly asked for grid scores, but there are none to be had. - utility::excn::EXCN_RosettaScriptsOption("InterfaceScoreCalculator cannot compute Grid Scores as requested, as the appropriate grid set is not present!"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "InterfaceScoreCalculator cannot compute Grid Scores as requested, as the appropriate grid set is not present!"); } else { compute_grid_scores_ = false; // Just ignore it. } diff --git a/source/src/protocols/ligand_docking/LigandArea.cc b/source/src/protocols/ligand_docking/LigandArea.cc index dbddaf8780..cf5c26afb7 100644 --- a/source/src/protocols/ligand_docking/LigandArea.cc +++ b/source/src/protocols/ligand_docking/LigandArea.cc @@ -52,10 +52,10 @@ LigandArea::~LigandArea() = default; void LigandArea::parse_my_tag( utility::tag::TagCOP tag ){ - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'LigandArea' requires 'chain' tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'LigandArea' requires 'chain' tag"); chain_= tag->getOption("chain"); - if ( ! tag->hasOption("cutoff") ) throw utility::excn::EXCN_RosettaScriptsOption("'LigandArea' requires 'cutoff' tag"); + if ( ! tag->hasOption("cutoff") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'LigandArea' requires 'cutoff' tag"); cutoff_= tag->getOption("cutoff"); if ( tag->hasOption("Calpha_restraints") ) { diff --git a/source/src/protocols/ligand_docking/MinimizeBackbone.cc b/source/src/protocols/ligand_docking/MinimizeBackbone.cc index 76aaa85105..399f05c23d 100644 --- a/source/src/protocols/ligand_docking/MinimizeBackbone.cc +++ b/source/src/protocols/ligand_docking/MinimizeBackbone.cc @@ -126,9 +126,9 @@ MinimizeBackbone::parse_my_tag( core::pose::Pose const & /*pose*/ ) { - if ( tag->getName() != "MinimizeBackbone" ) throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + if ( tag->getName() != "MinimizeBackbone" ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); - if ( ! tag->hasOption("interface") ) throw utility::excn::EXCN_RosettaScriptsOption("'HighResDocker' requires 'interface' tag (comma separated chains to dock)"); + if ( ! tag->hasOption("interface") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'HighResDocker' requires 'interface' tag (comma separated chains to dock)"); std::string interface_name= tag->getOption("interface"); interface_builder_= datamap.get_ptr( "interface_builders", interface_name); diff --git a/source/src/protocols/ligand_docking/MolarMassFilter.cc b/source/src/protocols/ligand_docking/MolarMassFilter.cc index 2b603c630d..c922ae1716 100644 --- a/source/src/protocols/ligand_docking/MolarMassFilter.cc +++ b/source/src/protocols/ligand_docking/MolarMassFilter.cc @@ -63,7 +63,7 @@ void MolarMassFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! (tag->hasOption("chain") && tag->hasOption("mass_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("MolarMass filter needs a 'chain' and an 'mass_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MolarMass filter needs a 'chain' and an 'mass_limit' option"); } chain_ = tag->getOption("chain"); mass_limit_ = tag->getOption("mass_limit"); diff --git a/source/src/protocols/ligand_docking/MolecularMassFilter.cc b/source/src/protocols/ligand_docking/MolecularMassFilter.cc index ef58748927..96d71899b0 100644 --- a/source/src/protocols/ligand_docking/MolecularMassFilter.cc +++ b/source/src/protocols/ligand_docking/MolecularMassFilter.cc @@ -63,7 +63,7 @@ void MolecularMassFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, protocols::filters::Filters_map const &, protocols::moves::Movers_map const &, core::pose::Pose const & ) { if ( ! (tag->hasOption("chain") && tag->hasOption("mass_limit") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("MolecularMass filter needs a 'chain' and an 'mass_limit' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MolecularMass filter needs a 'chain' and an 'mass_limit' option"); } chain_ = tag->getOption("chain"); mass_limit_ = tag->getOption("mass_limit"); diff --git a/source/src/protocols/ligand_docking/RandomConformers.cc b/source/src/protocols/ligand_docking/RandomConformers.cc index 6586ca1a7f..b0cf57fa67 100644 --- a/source/src/protocols/ligand_docking/RandomConformers.cc +++ b/source/src/protocols/ligand_docking/RandomConformers.cc @@ -108,9 +108,9 @@ RandomConformers::parse_my_tag( ) { if ( tag->getName() != "RandomConformers" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'RandomConformers' mover requires chain tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'RandomConformers' mover requires chain tag"); chain_ = tag->getOption("chain"); } diff --git a/source/src/protocols/ligand_docking/Rotate.cc b/source/src/protocols/ligand_docking/Rotate.cc index df66749cb0..e6c3763592 100644 --- a/source/src/protocols/ligand_docking/Rotate.cc +++ b/source/src/protocols/ligand_docking/Rotate.cc @@ -128,10 +128,10 @@ Rotate::parse_my_tag( core::pose::Pose const & pose ) { - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover requires 'chain' tag"); - if ( ! tag->hasOption("distribution") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover requires 'distribution' tag"); - if ( ! tag->hasOption("degrees") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover requires 'degrees' tag"); - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover requires 'cycles' tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover requires 'chain' tag"); + if ( ! tag->hasOption("distribution") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover requires 'distribution' tag"); + if ( ! tag->hasOption("degrees") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover requires 'degrees' tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover requires 'cycles' tag"); // Will return a nullptr if this XML didn't define any ScoringGrids grid_set_prototype_ = protocols::qsar::scoring_grid::parse_optional_grid_set_from_tag( tag, data_map ); @@ -139,9 +139,9 @@ Rotate::parse_my_tag( rotate_info_.chain = tag->getOption("chain"); utility::vector1< core::Size > chain_ids( core::pose::get_chain_ids_from_chain(rotate_info_.chain, pose) ); if ( chain_ids.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover: chain '"+rotate_info_.chain+"' does not exist."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover: chain '"+rotate_info_.chain+"' does not exist."); } else if ( chain_ids.size() > 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption("'Rotate' mover: chain letter '"+rotate_info_.chain+"' represents more than one chain. Consider using the 'Rotates' mover (with an 's') instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotate' mover: chain letter '"+rotate_info_.chain+"' represents more than one chain. Consider using the 'Rotates' mover (with an 's') instead."); } rotate_info_.chain_id= chain_ids[1]; rotate_info_.jump_id= core::pose::get_jump_id_from_chain_id(rotate_info_.chain_id, pose); diff --git a/source/src/protocols/ligand_docking/Rotates.cc b/source/src/protocols/ligand_docking/Rotates.cc index 04e63a217a..492ff65d29 100644 --- a/source/src/protocols/ligand_docking/Rotates.cc +++ b/source/src/protocols/ligand_docking/Rotates.cc @@ -96,13 +96,13 @@ Rotates::parse_my_tag( ) { if ( tag->getName() != "Rotates" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } - if ( ! tag->hasOption("distribution") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotates' mover requires 'distribution' tag"); - if ( ! tag->hasOption("degrees") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotates' mover requires 'degrees' tag"); - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotates' mover requires 'cycles' tag"); - if ( tag->hasOption("chain") && tag->hasOption("chains") ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotates' mover cannot have both a 'chain' and a 'chains' tag"); - if ( ! (tag->hasOption("chain") || tag->hasOption("chains") ) ) throw utility::excn::EXCN_RosettaScriptsOption("'Rotates' mover requires either a 'chain' or a 'chains' tag"); + if ( ! tag->hasOption("distribution") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotates' mover requires 'distribution' tag"); + if ( ! tag->hasOption("degrees") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotates' mover requires 'degrees' tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotates' mover requires 'cycles' tag"); + if ( tag->hasOption("chain") && tag->hasOption("chains") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotates' mover cannot have both a 'chain' and a 'chains' tag"); + if ( ! (tag->hasOption("chain") || tag->hasOption("chains") ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Rotates' mover requires either a 'chain' or a 'chains' tag"); utility::vector1 chain_strs; if ( tag->hasOption("chain") ) { diff --git a/source/src/protocols/ligand_docking/SlideTogether.cc b/source/src/protocols/ligand_docking/SlideTogether.cc index 2981e83abc..222cd6ff56 100644 --- a/source/src/protocols/ligand_docking/SlideTogether.cc +++ b/source/src/protocols/ligand_docking/SlideTogether.cc @@ -93,8 +93,8 @@ SlideTogether::parse_my_tag( core::pose::Pose const & pose ) { - if ( tag->getName() != "SlideTogether" ) throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); - if ( ! tag->hasOption("chains") ) throw utility::excn::EXCN_RosettaScriptsOption("'SlideTogether' mover requires chains tag"); + if ( tag->getName() != "SlideTogether" ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); + if ( ! tag->hasOption("chains") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'SlideTogether' mover requires chains tag"); std::string const chains_str = tag->getOption("chains"); utility::vector1 chain_strs= utility::string_split(chains_str, ','); diff --git a/source/src/protocols/ligand_docking/StartFrom.cc b/source/src/protocols/ligand_docking/StartFrom.cc index c7ead14d6a..f115a7d40a 100644 --- a/source/src/protocols/ligand_docking/StartFrom.cc +++ b/source/src/protocols/ligand_docking/StartFrom.cc @@ -120,9 +120,9 @@ StartFrom::parse_my_tag( ) { if ( tag->getName() != "StartFrom" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover requires chain tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover requires chain tag"); std::string const all_chains_str = tag->getOption("chain"); @@ -134,11 +134,11 @@ StartFrom::parse_my_tag( std::string name= child_tag->getName(); if ( name == "features" || name == "Features" ) { TR << "found features tag with type '" << child_tag->getOption("type") << "'" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("The 'Features' sub-tag in the StartFrom mover is not currently supported."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The 'Features' sub-tag in the StartFrom mover is not currently supported."); } else if ( name == "Coordinates" ) { - if ( ! child_tag->hasOption("x") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover Coordinates tag requires 'x' coordinates option"); - if ( ! child_tag->hasOption("y") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover Coordinates tag requires 'y' coordinates option"); - if ( ! child_tag->hasOption("z") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover Coordinates tag requires 'z' coordinates option"); + if ( ! child_tag->hasOption("x") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover Coordinates tag requires 'x' coordinates option"); + if ( ! child_tag->hasOption("y") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover Coordinates tag requires 'y' coordinates option"); + if ( ! child_tag->hasOption("z") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover Coordinates tag requires 'z' coordinates option"); std::string pdb_tag( child_tag->getOption("pdb_tag","default") ); @@ -155,18 +155,18 @@ StartFrom::parse_my_tag( TR.Debug << "No need to specify 'struct_identifier' in tag - pdb_id/hash will now be taken care of automatically." << std::endl; } - if ( !child_tag->hasOption("filename") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover File tag requires 'filename' coordinates option"); + if ( !child_tag->hasOption("filename") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover File tag requires 'filename' coordinates option"); parse_startfrom_file(child_tag->getOption("filename")); } else if ( name == "PDB" ) { - if ( !child_tag->hasOption("filename") ) throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover File tag requires 'filename' coordinates option"); + if ( !child_tag->hasOption("filename") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover File tag requires 'filename' coordinates option"); std::string atom_name = child_tag->getOption("atom_name",""); std::string pdb_tag( child_tag->getOption("pdb_tag","default") ); parse_pdb_file(child_tag->getOption("filename"), atom_name, pdb_tag); } else { - throw utility::excn::EXCN_RosettaScriptsOption("'StartFrom' mover doesn't understand the sub-tag '"+name+"'" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'StartFrom' mover doesn't understand the sub-tag '"+name+"'" ); } } } diff --git a/source/src/protocols/ligand_docking/Transform.cc b/source/src/protocols/ligand_docking/Transform.cc index 71e40156f4..1446671497 100644 --- a/source/src/protocols/ligand_docking/Transform.cc +++ b/source/src/protocols/ligand_docking/Transform.cc @@ -106,14 +106,14 @@ void Transform::parse_my_tag ) { if ( tag->getName() != "Transform" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires chain tag"); - if ( ! tag->hasOption("move_distance") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires move_distance tag"); - if ( ! tag->hasOption("box_size") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires box_size tag"); - if ( ! tag->hasOption("angle") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires angle tag"); - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires cycles tag"); - if ( !tag->hasOption("temperature") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires temperature tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires chain tag"); + if ( ! tag->hasOption("move_distance") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires move_distance tag"); + if ( ! tag->hasOption("box_size") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires box_size tag"); + if ( ! tag->hasOption("angle") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires angle tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires cycles tag"); + if ( !tag->hasOption("temperature") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires temperature tag"); transform_info_.chain = tag->getOption("chain"); @@ -131,12 +131,12 @@ void Transform::parse_my_tag initial_perturb_ = tag->getOption("initial_perturb",0.0); if ( initial_perturb_ < 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("The initial_perturb option to the Transform mover must be positive."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The initial_perturb option to the Transform mover must be positive."); } if ( tag->hasOption("initial_angle_perturb") ) { initial_angle_perturb_ = tag->getOption("initial_angle_perturb",0.0); if ( initial_angle_perturb_ < 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("The initial_angle_perturb option to the Transform mover must be positive."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The initial_angle_perturb option to the Transform mover must be positive."); } } // else leave as default: 360 degree sampling diff --git a/source/src/protocols/ligand_docking/TransformEnsemble.cc b/source/src/protocols/ligand_docking/TransformEnsemble.cc index 6db358a672..c11e31c920 100644 --- a/source/src/protocols/ligand_docking/TransformEnsemble.cc +++ b/source/src/protocols/ligand_docking/TransformEnsemble.cc @@ -112,14 +112,14 @@ void TransformEnsemble::parse_my_tag ) { if ( tag->getName() != "TransformEnsemble" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } - if ( ! tag->hasOption("chains") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires chains tag"); - if ( ! tag->hasOption("move_distance") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires move_distance tag"); - if ( ! tag->hasOption("box_size") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires box_size tag"); - if ( ! tag->hasOption("angle") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires angle tag"); - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires cycles tag"); - if ( !tag->hasOption("temperature") ) throw utility::excn::EXCN_RosettaScriptsOption("'Transform' mover requires temperature tag"); + if ( ! tag->hasOption("chains") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires chains tag"); + if ( ! tag->hasOption("move_distance") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires move_distance tag"); + if ( ! tag->hasOption("box_size") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires box_size tag"); + if ( ! tag->hasOption("angle") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires angle tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires cycles tag"); + if ( !tag->hasOption("temperature") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Transform' mover requires temperature tag"); //Divides by root(3) so the center can only move a total equal to move_distance in each step transform_info_.move_distance = (tag->getOption("move_distance")) /sqrt(3); diff --git a/source/src/protocols/ligand_docking/Translate.cc b/source/src/protocols/ligand_docking/Translate.cc index c4bed13d57..adb1d36300 100644 --- a/source/src/protocols/ligand_docking/Translate.cc +++ b/source/src/protocols/ligand_docking/Translate.cc @@ -118,11 +118,11 @@ Translate::parse_my_tag( core::pose::Pose const & pose ) { - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover requires chain tag"); - if ( ! tag->hasOption("distribution") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover requires distribution tag"); - if ( ! tag->hasOption("angstroms") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover requires angstroms tag"); - if ( ! tag->hasOption("cycles") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover requires cycles tag"); - //if ( ! tag->hasOption("force") ) throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover requires force tag"); optional. default is don't force, meaning ligand stays put if it can't find somewhere to go. + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover requires chain tag"); + if ( ! tag->hasOption("distribution") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover requires distribution tag"); + if ( ! tag->hasOption("angstroms") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover requires angstroms tag"); + if ( ! tag->hasOption("cycles") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover requires cycles tag"); + //if ( ! tag->hasOption("force") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover requires force tag"); optional. default is don't force, meaning ligand stays put if it can't find somewhere to go. // Will return a nullptr if this XML didn't define any ScoringGrids grid_set_prototype_ = protocols::qsar::scoring_grid::parse_optional_grid_set_from_tag( tag, data_map ); @@ -130,9 +130,9 @@ Translate::parse_my_tag( std::string chain = tag->getOption("chain"); utility::vector1< core::Size > chain_ids( core::pose::get_chain_ids_from_chain(chain, pose) ); if ( chain_ids.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover: chain '"+chain+"' does not exist."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover: chain '"+chain+"' does not exist."); } else if ( chain_ids.size() > 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption("'Translate' mover: chain letter '"+chain+"' represents more than one chain. Consider the 'Translates' mover (with an 's') instead."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'Translate' mover: chain letter '"+chain+"' represents more than one chain. Consider the 'Translates' mover (with an 's') instead."); } translate_info_.chain_id = chain_ids[1]; translate_info_.jump_id = core::pose::get_jump_id_from_chain_id(translate_info_.chain_id, pose); @@ -145,7 +145,7 @@ Translate::parse_my_tag( if ( tag->getOption("force") == "true" ) { translate_info_.force= true; } else if ( tag->getOption("force") != "false" ) { - throw utility::excn::EXCN_RosettaScriptsOption("'force' option is true or false"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'force' option is true or false"); } } diff --git a/source/src/protocols/ligand_docking/WriteLigandMolFile.cc b/source/src/protocols/ligand_docking/WriteLigandMolFile.cc index 4a428b3883..3524325714 100644 --- a/source/src/protocols/ligand_docking/WriteLigandMolFile.cc +++ b/source/src/protocols/ligand_docking/WriteLigandMolFile.cc @@ -98,14 +98,14 @@ void WriteLigandMolFile::parse_my_tag( ) { if ( !tag->hasOption("chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'WriteLigandMolFile' requires the option 'chain'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'WriteLigandMolFile' requires the option 'chain'"); } if ( !tag->hasOption("directory") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'WriteLigandMolFile' requires the option 'directory'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'WriteLigandMolFile' requires the option 'directory'"); } if ( !tag->hasOption("prefix") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'WriteLigandMolFile' requires the option 'prefix'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'WriteLigandMolFile' requires the option 'prefix'"); } std::string hash_status = tag->getOption("hash_file_names","false"); diff --git a/source/src/protocols/ligand_docking/rdf/RDFFunctionFactory.cc b/source/src/protocols/ligand_docking/rdf/RDFFunctionFactory.cc index 9fb995d063..fafd9d4769 100644 --- a/source/src/protocols/ligand_docking/rdf/RDFFunctionFactory.cc +++ b/source/src/protocols/ligand_docking/rdf/RDFFunctionFactory.cc @@ -125,8 +125,8 @@ RDFFunctionFactory::define_rdf_function_group( utility::tag::XMLSchemaDefinition rdf_function_group_name(), & rdf_function_ct_namer, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for RDFFunction from RDFFunctionFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for RDFFunction from RDFFunctionFactory; offending class" " must call protocols::ligand_docking::rdf::rdf_function_ct_namer when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/ligand_docking/rdf/StandardRDFFunctions.cc b/source/src/protocols/ligand_docking/rdf/StandardRDFFunctions.cc index 37e8ee0357..c47fe5b71e 100644 --- a/source/src/protocols/ligand_docking/rdf/StandardRDFFunctions.cc +++ b/source/src/protocols/ligand_docking/rdf/StandardRDFFunctions.cc @@ -73,7 +73,7 @@ std::string RDFEtableFunction::class_name(){ void RDFEtableFunction::parse_my_tag(utility::tag::TagCOP tag, basic::datacache::DataMap & data_map) { if ( !tag->hasOption("scorefxn") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'RDFEtableFunction' requires 'scorefxn' tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'RDFEtableFunction' requires 'scorefxn' tag"); } std::string scorefxn_name = tag->getOption("scorefxn"); @@ -157,7 +157,7 @@ void RDFElecFunction::parse_my_tag( basic::datacache::DataMap & data_map) { if ( !tag->hasOption("scorefxn") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'RDFEtableFunction' requires 'scorefxn' tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'RDFEtableFunction' requires 'scorefxn' tag"); } std::string scorefxn_name = tag->getOption("scorefxn"); @@ -238,7 +238,7 @@ void RDFChargeFunction::parse_my_tag( function_sign_ = SameSign; function_name_ = "charge_unsigned"; } else { - utility::excn::EXCN_RosettaScriptsOption("RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor"); } this->add_function_name(function_name_); } @@ -344,7 +344,7 @@ void RDFHbondFunction::parse_my_tag( function_sign_ = SameSign; function_name_ = "hbond_unsigned"; } else { - utility::excn::EXCN_RosettaScriptsOption("RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor"); } this->add_function_name(function_name_); } @@ -455,7 +455,7 @@ void RDFBinaryHbondFunction::parse_my_tag(utility::tag::TagCOP tag,basic::dataca function_sign_ = SameSign; function_name_ = "hbond_matching_pair"; } else { - utility::excn::EXCN_RosettaScriptsOption("RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor or matching pair"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RDFHbondFunction sign_mode can only be ligand_acceptor or ligand_donor or matching pair"); } this->add_function_name(function_name_); } diff --git a/source/src/protocols/loop_build/LoopBuildMover.cc b/source/src/protocols/loop_build/LoopBuildMover.cc index f5cd6fee01..3458bbafed 100644 --- a/source/src/protocols/loop_build/LoopBuildMover.cc +++ b/source/src/protocols/loop_build/LoopBuildMover.cc @@ -218,7 +218,7 @@ void LoopBuildMover::setup_loop_definition() using namespace basic::resource_manager; // load loopfile if ( ! ResourceManager::get_instance()->has_resource_with_description( "LoopsFile" ) ) { - throw utility::excn::EXCN_Msg_Exception( "No loop file specified." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "No loop file specified." ); } protocols::loops::LoopsFileDataOP loops_from_file = get_resource< protocols::loops::LoopsFileData >( "LoopsFile" ); loop_relax_mover_.loops_file_data( *loops_from_file ); diff --git a/source/src/protocols/loop_modeler/LoopModeler.cc b/source/src/protocols/loop_modeler/LoopModeler.cc index 72590c8f81..0f416a7dd6 100644 --- a/source/src/protocols/loop_modeler/LoopModeler.cc +++ b/source/src/protocols/loop_modeler/LoopModeler.cc @@ -188,7 +188,7 @@ void LoopModeler::parse_my_tag( // {{{1 } else { stringstream message; message << "Unknown config option: '" << config << "'"; - throw utility::excn::EXCN_Msg_Exception(message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, message.str()); } // Parse the 'auto_refine' option. @@ -407,7 +407,7 @@ void LoopModeler::setup_kic_with_fragments_config() { // {{{1 stringstream message; message << "Must specify the -loops:frag_sizes and -loops:frag_files "; message << "options in order to use the FragmentPerturber." << endl; - throw utility::excn::EXCN_Msg_Exception(message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, message.str()); } // Enable fragments during the build stage. @@ -450,7 +450,7 @@ void LoopModeler::setup_loophash_kic_config(bool perturb_sequence, std::string s std::stringstream message; message << "Must specify the -lh:loopsizes and -lh:db_path "; message << "options in order to use the LoopHashPerturber." << std::endl; - throw utility::excn::EXCN_Msg_Exception(message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, message.str()); } utility::vector1 loop_sizes = option[ OptionKeys::lh::loopsizes ].value(); diff --git a/source/src/protocols/loop_modeling/LoopProtocol.cc b/source/src/protocols/loop_modeling/LoopProtocol.cc index 007c743c34..768cda8e75 100644 --- a/source/src/protocols/loop_modeling/LoopProtocol.cc +++ b/source/src/protocols/loop_modeling/LoopProtocol.cc @@ -145,7 +145,7 @@ void LoopProtocol::parse_my_tag( // {{{1 stringstream message; message << "getOption: key = temp_cycles stream extraction failed! "; message << "Tried to parse '" << cycles << "'\n"; - throw utility::excn::EXCN_Msg_Exception(message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, message.str()); } } diff --git a/source/src/protocols/loop_modeling/utilities/rosetta_scripts.cc b/source/src/protocols/loop_modeling/utilities/rosetta_scripts.cc index 97429a9bc8..a0f521d03b 100644 --- a/source/src/protocols/loop_modeling/utilities/rosetta_scripts.cc +++ b/source/src/protocols/loop_modeling/utilities/rosetta_scripts.cc @@ -58,7 +58,7 @@ LoopMoverOP loop_mover_from_tag( stringstream message; message << "<" << tag->getName() << "> is not a loop mover, so "; message << "cannot be used in the protocol." << endl; - throw utility::excn::EXCN_Msg_Exception(message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, message.str()); } return loop_mover; diff --git a/source/src/protocols/loophash/BackboneDB.cc b/source/src/protocols/loophash/BackboneDB.cc index 0e49e72a87..54ec64d1e5 100644 --- a/source/src/protocols/loophash/BackboneDB.cc +++ b/source/src/protocols/loophash/BackboneDB.cc @@ -304,12 +304,12 @@ BackboneDB::get_backbone_segment( void BackboneDB::write_db( std::string filename ) { std::ofstream file( filename.c_str() ); - if ( !file ) throw EXCN_DB_IO_Failed( filename, "write" ); + if ( !file ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "write" ); if ( data_.size() == 0 ) { file.close(); return; } - if ( ! extra_ ) throw EXCN_No_Extra_Data_To_Write(); + if ( ! extra_ ) throw CREATE_EXCEPTION(EXCN_No_Extra_Data_To_Write, ""); for ( auto & i : data_ ) { file << "pdb " << extra_data_[ i.extra_key ].pdb_id << std::endl; file << "seq " << extra_data_[ i.extra_key ].sequence << std::endl; @@ -332,7 +332,7 @@ BackboneDB::read_legacydb( std::string filename ) { // use basic C input - C++ are too memory hungry to deal with these potentially v large files FILE *file = fopen( filename.c_str(), "r" ); - if ( file == nullptr ) throw EXCN_DB_IO_Failed( filename, "read" ); + if ( file == nullptr ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "read" ); data_.clear(); BBData new_protein; @@ -359,7 +359,7 @@ BackboneDB::read_db( std::string filename, bool load_extra, std::map< core::Size, bool > & homolog_index ) { std::ifstream file( filename.c_str() ); - if ( !file ) throw EXCN_DB_IO_Failed( filename, "read" ); + if ( !file ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "read" ); if ( option[ lh::exclude_homo ]() ) { TR << "Reading in homolog file" << std::endl; @@ -400,7 +400,7 @@ BackboneDB::read_db( std::string filename, bool load_extra, if ( line_counter / 4 >= int(end) && int(end) != 0 ) continue; command = line.substr(0,3); - if ( command == "" ) throw EXCN_Wrong_DB_Format( filename ); + if ( command == "" ) throw CREATE_EXCEPTION(EXCN_Wrong_DB_Format, filename ); // Even if we're not loading extra, still process pdb line // So we can use the pdb to filter homologs if ( command == "pdb" ) { @@ -451,7 +451,7 @@ BackboneDB::read_db( std::string filename, bool load_extra, void BackboneDB::read_homologs() { std::ifstream file( option[ lh::homo_file ]().c_str() ); - if ( !file ) throw EXCN_DB_IO_Failed( option[ lh::homo_file ](), "read" ); + if ( !file ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, option[ lh::homo_file ](), "read" ); std::string line; while ( getline( file, line) ) { utility::vector1< std::string > tokens ( utility::split( line ) ); @@ -476,5 +476,3 @@ void BackboneDB::read_homologs() } // namespace loops } // namespace protocols - - diff --git a/source/src/protocols/loophash/Exceptions.hh b/source/src/protocols/loophash/Exceptions.hh index 58b2f695fe..491fc79331 100644 --- a/source/src/protocols/loophash/Exceptions.hh +++ b/source/src/protocols/loophash/Exceptions.hh @@ -30,10 +30,10 @@ namespace protocols { namespace loophash { -class EXCN_DB_IO_Failed: public utility::excn::EXCN_Msg_Exception { +class EXCN_DB_IO_Failed: public utility::excn::Exception { public: - EXCN_DB_IO_Failed( std::string filename, std::string action ) : - utility::excn::EXCN_Msg_Exception( "Error in opening File='" + filename + "' for operation='" + action + "'" ), + EXCN_DB_IO_Failed(char const *file, int line, std::string filename, std::string action ) : + utility::excn::Exception(file, line, "Error in opening File='" + filename + "' for operation='" + action + "'" ), filename_( filename ), action_( action ) {}; private: @@ -41,10 +41,10 @@ private: std::string action_; }; -class EXCN_Invalid_Hashmap: public utility::excn::EXCN_Msg_Exception { +class EXCN_Invalid_Hashmap: public utility::excn::Exception { public: - EXCN_Invalid_Hashmap( core::Size size ) : - utility::excn::EXCN_Msg_Exception( "Invalid hashmap of size " + utility::to_string( size ) + " requested." ) + EXCN_Invalid_Hashmap(char const *file, int line, core::Size size ) : + utility::excn::Exception(file, line, "Invalid hashmap of size " + utility::to_string( size ) + " requested." ) // size_( size ) {}; @@ -53,29 +53,29 @@ private: // core::Size size_; }; -class EXCN_No_Extra_Data_To_Write: public utility::excn::EXCN_Msg_Exception { +class EXCN_No_Extra_Data_To_Write: public utility::excn::Exception { public: - EXCN_No_Extra_Data_To_Write(): - utility::excn::EXCN_Msg_Exception( "Cannot write DB with extras if extra data is nonexistent." ) {}; + EXCN_No_Extra_Data_To_Write(char const *file, int line, std::string const & m=""): + utility::excn::Exception(file, line, m + "\nCannot write DB with extras if extra data is nonexistent." ) {}; }; -class EXCN_Wrong_DB_Format: public utility::excn::EXCN_Msg_Exception { +class EXCN_Wrong_DB_Format: public utility::excn::Exception { public: - EXCN_Wrong_DB_Format( std::string filename ): - utility::excn::EXCN_Msg_Exception( filename + " does not have the correct format." ), + EXCN_Wrong_DB_Format(char const *file, int line, std::string filename ): + utility::excn::Exception(file, line, filename + " does not have the correct format." ), filename_( filename ) {}; private: std::string filename_; }; -class EXCN_bbdb_Merge_Failed: public utility::excn::EXCN_Msg_Exception { +class EXCN_bbdb_Merge_Failed: public utility::excn::Exception { public: - EXCN_bbdb_Merge_Failed( std::string reason ): - utility::excn::EXCN_Msg_Exception( reason ) {}; + EXCN_bbdb_Merge_Failed(char const *file, int line, std::string reason ): + utility::excn::Exception(file, line, reason ) {}; - EXCN_bbdb_Merge_Failed( bool /*masterlib_extra*/, bool /*secondlib_extra*/ ): - utility::excn::EXCN_Msg_Exception( "LoopHashLibrary.extra_'s not equal" ) + EXCN_bbdb_Merge_Failed(char const *file, int line, bool /*masterlib_extra*/, bool /*secondlib_extra*/ ): + utility::excn::Exception(file, line, "LoopHashLibrary.extra_'s not equal" ) // masterlib_extra_( masterlib_extra ), // secondlib_extra_( secondlib_extra ) {}; diff --git a/source/src/protocols/loophash/LoopHashLibrary.cc b/source/src/protocols/loophash/LoopHashLibrary.cc index c282dc9338..c45d3baeb8 100644 --- a/source/src/protocols/loophash/LoopHashLibrary.cc +++ b/source/src/protocols/loophash/LoopHashLibrary.cc @@ -132,7 +132,7 @@ LoopHashLibrary::gethash( core::Size size ) { if ( hash_.count( size ) == 1 ) return hash_[ size ]; // and if that's not true something is wrong - throw EXCN_Invalid_Hashmap( size ); + throw CREATE_EXCEPTION(EXCN_Invalid_Hashmap, size ); // We should never get here -this is just to satisfy the compiler. return hash_[ 0 ]; @@ -165,11 +165,11 @@ LoopHashLibrary::delete_db() long starttime = time(nullptr); TR.Info << "Deleting database files " << assigned_string_ << std::endl; std::string dbstring = db_path_ + "backbone" + assigned_string_ + ".db"; - if ( remove( dbstring.c_str() ) != 0 ) throw EXCN_DB_IO_Failed( dbstring , "delete" ); + if ( remove( dbstring.c_str() ) != 0 ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, dbstring , "delete" ); TR.Info << "bbdb deletion successful" << std::endl; for ( std::vector< core::Size >::const_iterator it = hash_sizes_.begin(); it != hash_sizes_.end(); ++it ) { std::string dbstring = db_path_ + "loopdb." + utility::to_string( *it ) + assigned_string_ + ".db" ; - if ( remove( dbstring.c_str() ) != 0 ) throw EXCN_DB_IO_Failed( dbstring, "delete" ); + if ( remove( dbstring.c_str() ) != 0 ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, dbstring, "delete" ); TR.Info << "loopdb size " << utility::to_string( *it ) << " deletion successful" << std::endl; } long endtime = time(nullptr); @@ -230,10 +230,10 @@ LoopHashLibrary::merge( // Can later add a removal step, where proteins who aren't referenced can be removed core::Size index_offset; if ( extra_ != second_lib->get_extra() ) { - throw EXCN_bbdb_Merge_Failed( extra_, second_lib->get_extra() ); + throw CREATE_EXCEPTION(EXCN_bbdb_Merge_Failed, extra_, second_lib->get_extra() ); } if ( ! merge_bbdb( second_lib->backbone_database(), index_offset ) ) { - throw EXCN_bbdb_Merge_Failed( "bbdb merge failed for unknown reasons" ); + throw CREATE_EXCEPTION(EXCN_bbdb_Merge_Failed, "bbdb merge failed for unknown reasons" ); } TR.Debug << "BBDB concated" << std::endl; diff --git a/source/src/protocols/loophash/LoopHashLibraryLoader.cc b/source/src/protocols/loophash/LoopHashLibraryLoader.cc index f848232df1..7404d10616 100644 --- a/source/src/protocols/loophash/LoopHashLibraryLoader.cc +++ b/source/src/protocols/loophash/LoopHashLibraryLoader.cc @@ -53,7 +53,7 @@ LoopHashLibraryLoader::create_resource( std::istream & ) const { if ( ! dynamic_cast< LoopHashLibraryOptions const * > ( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( "LoopHashLibraryLoader expected to be given a LoopHashLibraryOptions object, " \ + throw CREATE_EXCEPTION(utility::excn::Exception, "LoopHashLibraryLoader expected to be given a LoopHashLibraryOptions object, " \ "but was given a non-LoopHashLibraryOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." ); } LoopHashLibraryOptions const & lh_opts = static_cast< LoopHashLibraryOptions const & > ( options ); diff --git a/source/src/protocols/loophash/LoopHashMap.cc b/source/src/protocols/loophash/LoopHashMap.cc index d7e85d6b4e..f23d703b37 100644 --- a/source/src/protocols/loophash/LoopHashMap.cc +++ b/source/src/protocols/loophash/LoopHashMap.cc @@ -601,7 +601,7 @@ void LoopHashMap::read_legacydb(std::string filename ) { // use basic C input - C++ are too memory hungry to deal with these potentially v large files FILE *file = fopen( filename.c_str(), "r" ); - if ( file == nullptr ) throw EXCN_DB_IO_Failed( filename, "read" ); + if ( file == nullptr ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "read" ); loopdb_.clear(); while ( !feof( file ) ) { @@ -621,7 +621,7 @@ void LoopHashMap::read_legacydb(std::string filename ) void LoopHashMap::write_db( std::string filename ){ std::ofstream file( filename.c_str() ); - if ( !file ) throw EXCN_DB_IO_Failed( filename, "write" ); + if ( !file ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "write" ); for ( auto & i : loopdb_ ) { file << i.index << " " << i.offset << " " << i.key << std::endl; } @@ -634,14 +634,14 @@ LoopHashMap::read_db( std::map< core::Size, bool > & homolog_index ){ std::ifstream file( filename.c_str() ); - if ( !file ) throw EXCN_DB_IO_Failed( filename, "read" ); + if ( !file ) throw CREATE_EXCEPTION(EXCN_DB_IO_Failed, filename, "read" ); std::string line; LeapIndex leap_index; while ( getline( file, line ) ) { std::vector output; std::string t; std::istringstream sline(line); while ( sline >> t ) { output.push_back(t); } - if ( output.size() != 3 ) throw EXCN_Wrong_DB_Format( filename ); + if ( output.size() != 3 ) throw CREATE_EXCEPTION(EXCN_Wrong_DB_Format, filename ); leap_index.index = boost::lexical_cast< core::Size > ( output[0] ); if ( leap_index.index < loopdb_range.first ) continue; if ( leap_index.index >= loopdb_range.second && loopdb_range.second != 0 ) continue; diff --git a/source/src/protocols/loophash/LoopHashRelaxProtocol.cc b/source/src/protocols/loophash/LoopHashRelaxProtocol.cc index af2a52cc96..8834186053 100644 --- a/source/src/protocols/loophash/LoopHashRelaxProtocol.cc +++ b/source/src/protocols/loophash/LoopHashRelaxProtocol.cc @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include diff --git a/source/src/protocols/loophash/Mover_LoopHashRefine.cc b/source/src/protocols/loophash/Mover_LoopHashRefine.cc index 9ba024f946..aeaabb563a 100644 --- a/source/src/protocols/loophash/Mover_LoopHashRefine.cc +++ b/source/src/protocols/loophash/Mover_LoopHashRefine.cc @@ -70,7 +70,7 @@ #include #include #include -#include +#include // Numeric Headers #include @@ -264,7 +264,7 @@ int loophash_main(){ loop_hash_library->load_db(); try{ protocols::jd2::JobDistributor::get_instance()->go( lh_sampler ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { std::cerr << "Exception: " << std::endl; excn.show( std::cerr ); std::cout << "Exception: " << std::endl; diff --git a/source/src/protocols/loophash/WorkUnit_LoopHash.cc b/source/src/protocols/loophash/WorkUnit_LoopHash.cc index 1836534c5a..1945f1c73a 100644 --- a/source/src/protocols/loophash/WorkUnit_LoopHash.cc +++ b/source/src/protocols/loophash/WorkUnit_LoopHash.cc @@ -83,7 +83,7 @@ WorkUnit_LoopHash::init_from_cmd( const core::Size mpi_rank ) // load initial library from disk library_->load_mergeddb(); } -catch( utility::excn::EXCN_Msg_Exception & e ){ +catch( utility::excn::Exception & e ){ e.show( std::cout ); e.show( std::cerr ); throw; diff --git a/source/src/protocols/loops/Exceptions.hh b/source/src/protocols/loops/Exceptions.hh index 24a6b487e9..bc70ef2398 100644 --- a/source/src/protocols/loops/Exceptions.hh +++ b/source/src/protocols/loops/Exceptions.hh @@ -24,10 +24,9 @@ namespace protocols { namespace loops { -class EXCN_Loop_not_closed : public utility::excn::EXCN_Msg_Exception { - typedef EXCN_Msg_Exception Parent; +class EXCN_Loop_not_closed : public utility::excn::Exception { public: - EXCN_Loop_not_closed( std::string msg = "") : EXCN_Msg_Exception( "failed to close loop " + msg ){}; + EXCN_Loop_not_closed(char const *file, int line, std::string msg = "") : Exception(file, line, "failed to close loop " + msg ) {}; }; } // namespace loops diff --git a/source/src/protocols/loops/LoopsFileFallbackConfiguration.cc b/source/src/protocols/loops/LoopsFileFallbackConfiguration.cc index 56f1ad9880..e7deb4c903 100644 --- a/source/src/protocols/loops/LoopsFileFallbackConfiguration.cc +++ b/source/src/protocols/loops/LoopsFileFallbackConfiguration.cc @@ -102,7 +102,7 @@ LoopsFileFallbackConfiguration::get_loops_filename_from_options() const // the next line uses value_or to avoid a call to std::exit in the options class. I can test things that throw exceptions. Just sayin'. utility::vector1< std::string > loops_files = basic::options::option[ basic::options::OptionKeys::loops::loop_file ].value_or( utility::vector1< std::string >() ); if ( ! loops_files.size() ) { - throw utility::excn::EXCN_Msg_Exception("The fallback LoopsFile resource option has no loops files associated with it! Was the option omitted from the command line?"); + throw CREATE_EXCEPTION(utility::excn::Exception, "The fallback LoopsFile resource option has no loops files associated with it! Was the option omitted from the command line?"); } core::Size const which_loops_file( loops_files.size() == 1 ? 1 : core::Size( numeric::random::rg().random_range(1,( loops_files.size() )))); return loops_files[ which_loops_file ]; diff --git a/source/src/protocols/loops/LoopsFileLoader.cc b/source/src/protocols/loops/LoopsFileLoader.cc index 68d2e75b6c..617c41dec9 100644 --- a/source/src/protocols/loops/LoopsFileLoader.cc +++ b/source/src/protocols/loops/LoopsFileLoader.cc @@ -44,7 +44,7 @@ LoopsFileLoader::create_resource( ) const { if ( ! dynamic_cast< LoopsFileOptions const * > ( &options ) ) { - throw utility::excn::EXCN_Msg_Exception( "LoopsFileLoader expected to be given a LoopsFileOptions object, " \ + throw CREATE_EXCEPTION(utility::excn::Exception, "LoopsFileLoader expected to be given a LoopsFileOptions object, " \ "but was given a non-LoopsFileOptions object of type '" + options.type() + "', which has the name '" + options.name() + "'." ); } LoopsFileOptions const & loops_opts = static_cast< LoopsFileOptions const & > ( options ); diff --git a/source/src/protocols/loops/loop_closure/ccd/CCDLoopClosureMover.cc b/source/src/protocols/loops/loop_closure/ccd/CCDLoopClosureMover.cc index 204359dfee..a393fd3138 100644 --- a/source/src/protocols/loops/loop_closure/ccd/CCDLoopClosureMover.cc +++ b/source/src/protocols/loops/loop_closure/ccd/CCDLoopClosureMover.cc @@ -329,8 +329,6 @@ CCDLoopClosureMover::movemap( kinematics::MoveMapCOP new_movemap ) Angle CCDLoopClosureMover::max_per_move_torsion_delta_per_residue( char secstruct ) const { - using utility::excn::EXCN_KeyError; - if ( ! sec_struc_char_to_enum_map().count( secstruct ) ) { std::stringstream msg; msg << "CCDLoopClosureMover::max_per_move_delta_per_residue( char secstruct ): secstruct must be 'H', 'E', or 'L'. '"; @@ -338,7 +336,7 @@ CCDLoopClosureMover::max_per_move_torsion_delta_per_residue( char secstruct ) co // Can python catch exceptions thrown from C++? If not, we had better keep this PyAssert! PyAssert( ( secstruct == 'H' ) || ( secstruct == 'E' ) || ( secstruct == 'L' ), msg.str() ); - throw EXCN_KeyError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::KeyError, msg.str() ); } return max_per_move_torsion_delta_per_residue( sec_struc_char_to_enum_map().find( secstruct )->second ); @@ -349,8 +347,6 @@ CCDLoopClosureMover::max_per_move_torsion_delta_per_residue( char secstruct ) co Angle CCDLoopClosureMover::max_total_torsion_delta_per_residue( char secstruct ) const { - using utility::excn::EXCN_KeyError; - if ( ! sec_struc_char_to_enum_map().count( secstruct ) ) { std::stringstream msg; msg << "CCDLoopClosureMover::max_total_delta_per_residue( char secstruct ): secstruct must be 'H', 'E', or 'L'. '"; @@ -358,7 +354,7 @@ CCDLoopClosureMover::max_total_torsion_delta_per_residue( char secstruct ) const // Can python catch exceptions thrown from C++? If not, we had better keep this PyAssert! PyAssert( ( secstruct == 'H' ) || ( secstruct == 'E' ) || ( secstruct == 'L' ), msg.str() ); - throw EXCN_KeyError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::KeyError, msg.str() ); } return max_total_torsion_delta_per_residue( sec_struc_char_to_enum_map().find( secstruct )->second ); } @@ -502,7 +498,7 @@ CCDLoopClosureMover::get_anchors( conformation::Residue const & residue ) const #ifdef PYROSETTA PyAssert( false, msg ); #endif - throw utility::excn::EXCN_BadInput( msg ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg ); } return anchors; @@ -520,7 +516,7 @@ CCDLoopClosureMover::index_pair_in_range( while ( atom < 1 ) { atom += n_mainchain_atoms; if ( pos == 0 ) { - throw utility::excn::EXCN_RangeError( "pos is unsigned. Cannot make it negative!" ); + throw CREATE_EXCEPTION(utility::excn::RangeError, "pos is unsigned. Cannot make it negative!" ); } pos -= 1; } diff --git a/source/src/protocols/loops/loop_closure/ccd/FASelectSlidingWindowLoopClosure.cc b/source/src/protocols/loops/loop_closure/ccd/FASelectSlidingWindowLoopClosure.cc index a6905c11dc..13fbc71e59 100644 --- a/source/src/protocols/loops/loop_closure/ccd/FASelectSlidingWindowLoopClosure.cc +++ b/source/src/protocols/loops/loop_closure/ccd/FASelectSlidingWindowLoopClosure.cc @@ -225,7 +225,7 @@ FASelectSlidingWindowLoopClosure::select_final_loop( Pose& more_cut, Pose& less_ if ( ! best_fragment_.frame().is_valid() ) { - throw( loops::EXCN_Loop_not_closed() ); + throw CREATE_EXCEPTION(loops::EXCN_Loop_not_closed, ""); } //* apply winner and generate output, --- essentially copy from Parent class best_fragment_.apply( movemap(), less_cut ); diff --git a/source/src/protocols/loops/loop_closure/ccd/SlidingWindowLoopClosure.cc b/source/src/protocols/loops/loop_closure/ccd/SlidingWindowLoopClosure.cc index 72f85b2d4b..f9354014a0 100644 --- a/source/src/protocols/loops/loop_closure/ccd/SlidingWindowLoopClosure.cc +++ b/source/src/protocols/loops/loop_closure/ccd/SlidingWindowLoopClosure.cc @@ -441,7 +441,7 @@ SlidingWindowLoopClosure::sample_loops( Pose& more_cut, Pose& less_cut ) { } } // loop_size tr.Warning << "no good loop found !" << std::endl; - throw( loops::EXCN_Loop_not_closed() ); + throw CREATE_EXCEPTION(loops::EXCN_Loop_not_closed, ""); } //apply @@ -636,7 +636,7 @@ SlidingWindowLoopClosure::set_loop( Loop const& loop_in ) { ss << this->get_name() << " was given a loop to close (" << loop_ << ") for which it does not have any fragments (residues: " << fragset_->min_pos() << "-" << fragset_->max_pos() << ")."; - throw utility::excn::EXCN_Msg_Exception( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, ss.str() ); } } diff --git a/source/src/protocols/loops/loop_closure/ccd/WidthFirstSlidingWindowLoopClosure.cc b/source/src/protocols/loops/loop_closure/ccd/WidthFirstSlidingWindowLoopClosure.cc index 7ffb0ac98a..4986da2bc4 100644 --- a/source/src/protocols/loops/loop_closure/ccd/WidthFirstSlidingWindowLoopClosure.cc +++ b/source/src/protocols/loops/loop_closure/ccd/WidthFirstSlidingWindowLoopClosure.cc @@ -288,7 +288,7 @@ WidthFirstSlidingWindowLoopClosure::sample_loops( Pose& more_cut, Pose& less_cut if ( !best_fragment_.is_valid() || ( good_loop_count < min_good_loops_ && (fast_loop_count + good_loop_count) < min_fast_loops_ ) ) { tr.Warning << "no good loop found! There were " << good_loop_count << " good loops (" << min_good_loops_ << " are required) and there were " << fast_loop_count << " fast loops ( fast loops + good loops must be at least " << min_fast_loops_ << ")." << std::endl; - throw( EXCN_Loop_not_closed(utility::to_string(loop_)) ); + throw CREATE_EXCEPTION(EXCN_Loop_not_closed, utility::to_string(loop_)); } } //sample_loops diff --git a/source/src/protocols/loops/loop_mover/LoopCM.cc b/source/src/protocols/loops/loop_mover/LoopCM.cc index f4f70786c0..d79415606b 100644 --- a/source/src/protocols/loops/loop_mover/LoopCM.cc +++ b/source/src/protocols/loops/loop_mover/LoopCM.cc @@ -99,7 +99,7 @@ void LoopCM::parse_my_tag( TagCOP const tag, std::ostringstream ss; ss << "In '" << this->get_name() << "', the value '" << algorithm << "' of the option 'algorithm' is not valid. " << "Valid options are '" << KIC << "' and '" << CCD << "'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } std::string const style = tag->getOption< std::string >( "style" ); @@ -111,7 +111,7 @@ void LoopCM::parse_my_tag( TagCOP const tag, std::ostringstream ss; ss << "In '" << this->get_name() << "', the value '" << style << "' of the option 'style' is not valid. " << "Valid options are '" << PERTURB << "' and '" << REFINE << "'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } std::string const selector = tag->getOption< std::string >( "selector" ); @@ -121,9 +121,9 @@ void LoopCM::parse_my_tag( TagCOP const tag, void LoopCM::build_mover( LoopsOP loops ) { if ( algorithm_ == UNSET ) { - throw utility::excn::EXCN_BadInput( "Value of algorithm was unset in '" + get_name() + "'." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Value of algorithm was unset in '" + get_name() + "'." ); } else if ( style_ == UNSET ) { - throw utility::excn::EXCN_BadInput( "Value of style was unset in '" + get_name() + "'." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Value of style was unset in '" + get_name() + "'." ); } if ( algorithm_ == KIC ) { @@ -172,7 +172,7 @@ environment::claims::EnvClaims LoopCM::yield_claims( core::pose::Pose const& pos if ( loops->empty() ) { std::ostringstream ss; ss << "The mover " << get_name() << " couldn't build a loops object from the selection it was given." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } build_mover( loops ); diff --git a/source/src/protocols/loops/loop_mover/perturb/LoopMover_KIC.cc b/source/src/protocols/loops/loop_mover/perturb/LoopMover_KIC.cc index d4855f7b5d..ef4c4585c3 100644 --- a/source/src/protocols/loops/loop_mover/perturb/LoopMover_KIC.cc +++ b/source/src/protocols/loops/loop_mover/perturb/LoopMover_KIC.cc @@ -317,8 +317,8 @@ loop_mover::LoopResult LoopMover_Perturb_KIC::model_loop( try { std::string user_torbin_string = basic::options::option[ basic::options::OptionKeys::loops::restrict_kic_sampling_to_torsion_string ](); torsion_bins = core::conformation::map_string_to_torsion_bin_string( user_torbin_string ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Error in converting the string given in the option loops::restrict_kic_sampling_to_torsion_string\n" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Error in converting the string given in the option loops::restrict_kic_sampling_to_torsion_string\n" "into a valid torsion set of torsion bins. Check your inputs\n" + e.msg() ); } @@ -335,7 +335,7 @@ loop_mover::LoopResult LoopMover_Perturb_KIC::model_loop( // to the torsion bins in the perturber would also be implemented // runtime_assert(torsion_bins.size() == loop_end - loop_begin + 1); if ( torsion_bins.size() != ( loop_end - loop_begin + 1 ) ) { - throw utility::excn::EXCN_Msg_Exception( "Error taking the torsion bins in the construction of the" + throw CREATE_EXCEPTION(utility::excn::Exception, "Error taking the torsion bins in the construction of the" "TorsionRestrictedKinematicPerturber;\ntorsion_bins.size() = " + utility::to_string( torsion_bins.size() ) + " vs. the loop length " + utility::to_string( loop_end - loop_begin + 1 ) + "\n" ); } diff --git a/source/src/protocols/loops/loop_mover/refine/LoopMover_KIC.cc b/source/src/protocols/loops/loop_mover/refine/LoopMover_KIC.cc index 5c643770a2..b2e998e73f 100644 --- a/source/src/protocols/loops/loop_mover/refine/LoopMover_KIC.cc +++ b/source/src/protocols/loops/loop_mover/refine/LoopMover_KIC.cc @@ -375,8 +375,8 @@ void LoopMover_Refine_KIC::apply( if ( ! user_torbin_string.empty() ) { torsion_bins = core::conformation::map_string_to_torsion_bin_string( user_torbin_string ); } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Error in converting the string given in the option loops::restrict_kic_sampling_to_torsion_string\n" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Error in converting the string given in the option loops::restrict_kic_sampling_to_torsion_string\n" "into a valid torsion set of torsion bins. Check your inputs\n" + e.msg() ); } diff --git a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycle.cc b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycle.cc index 53fdb3286c..c1f1f62dc2 100644 --- a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycle.cc +++ b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycle.cc @@ -110,22 +110,22 @@ void LoopRefineInnerCycle::setup_objects( Pose const & /* pose */ ) TR << "Setting up data for " + get_name() + "." << std::endl; /// Perform some sanity checks to ensure the data integrity before moving forward - using utility::excn::EXCN_Msg_Exception; + using utility::excn::Exception; if ( !scorefxn_ ) { - throw EXCN_Msg_Exception( "No ScoreFunction available in " + get_name() + "." ); + throw CREATE_EXCEPTION(Exception, "No ScoreFunction available in " + get_name() + "." ); } if ( !tf_ ) { - throw EXCN_Msg_Exception( "No TaskFactory available in " + get_name() + "." ); + throw CREATE_EXCEPTION(Exception, "No TaskFactory available in " + get_name() + "." ); } if ( !mc_ ) { - throw EXCN_Msg_Exception( "No MonteCarlo instance available in " + get_name() + "." ); + throw CREATE_EXCEPTION(Exception, "No MonteCarlo instance available in " + get_name() + "." ); } if ( loop_mover_that_owns_me_.expired() ) { - throw EXCN_Msg_Exception( "No parent LoopMover available in " + get_name() + ". This is needed to provide information on the progress of the simulation." ); + throw CREATE_EXCEPTION(Exception, "No parent LoopMover available in " + get_name() + ". This is needed to provide information on the progress of the simulation." ); } } diff --git a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleContainer.cc b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleContainer.cc index b8c7ba9b64..d1d43be56f 100644 --- a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleContainer.cc +++ b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleContainer.cc @@ -44,7 +44,7 @@ namespace loops { namespace loop_mover { namespace refine { -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; /////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////// BOILER PLATE CODE ////////////////////////////////////// diff --git a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleFactory.cc b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleFactory.cc index 03e4f1fb4e..6fc45b6d1e 100644 --- a/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleFactory.cc +++ b/source/src/protocols/loops/loop_mover/refine/LoopRefineInnerCycleFactory.cc @@ -121,8 +121,8 @@ LoopRefineInnerCycleOP LoopRefineInnerCycleFactory::make_inner_cycle_from_string LoopRefineInnerCycleOP inner_cycle = utility::pointer::dynamic_pointer_cast< protocols::loops::loop_mover::refine::LoopRefineInnerCycle > ( ( moves::MoverFactory::get_instance()->newMover( name ) ) ); if ( ! inner_cycle ) { - using utility::excn::EXCN_Msg_Exception; - throw EXCN_Msg_Exception( "Attempting to create Mover '" + name + \ + using utility::excn::Exception; + throw CREATE_EXCEPTION(Exception, "Attempting to create Mover '" + name + \ "' that cannot be casted to a LoopRefineInnerCycle. Check your spelling and/or confirm this mover has been " +\ "registered to the MoverFactory." ); } diff --git a/source/src/protocols/loops/loops_definers/LoopsDatabaseDefiner.cc b/source/src/protocols/loops/loops_definers/LoopsDatabaseDefiner.cc index 1bead5dbf9..646f67e94f 100644 --- a/source/src/protocols/loops/loops_definers/LoopsDatabaseDefiner.cc +++ b/source/src/protocols/loops/loops_definers/LoopsDatabaseDefiner.cc @@ -92,7 +92,7 @@ LoopsDatabaseDefiner::parse_my_tag( // not needed by this class, but rather, by the LoopDefinerLoader. The following // code could be reasonably removed. if ( !tag->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unable to create unnamed LoopsDefiner (type: " + tag->getName() + ")" ); } string const loops_name(tag->getOption("name")); diff --git a/source/src/protocols/loops/loops_definers/LoopsDefinerFactory.cc b/source/src/protocols/loops/loops_definers/LoopsDefinerFactory.cc index 398a108d0c..f1b4ad76bc 100644 --- a/source/src/protocols/loops/loops_definers/LoopsDefinerFactory.cc +++ b/source/src/protocols/loops/loops_definers/LoopsDefinerFactory.cc @@ -116,8 +116,8 @@ void LoopsDefinerFactory::define_loop_definer_xml_schema( utility::tag::XMLSchem loop_definer_xml_schema_group_name(), & complex_type_name_for_loop_definer, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for LoopDefiner from LoopDefinerFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for LoopDefiner from LoopDefinerFactory; offending class" " must call protocols::loops::loop_definers::complex_type_name_for_loop_definer when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/loops/loops_definers/LoopsExplicitDefiner.cc b/source/src/protocols/loops/loops_definers/LoopsExplicitDefiner.cc index f7ea8ff4a6..1e949dc437 100644 --- a/source/src/protocols/loops/loops_definers/LoopsExplicitDefiner.cc +++ b/source/src/protocols/loops/loops_definers/LoopsExplicitDefiner.cc @@ -120,7 +120,7 @@ LoopsExplicitDefiner::parse_my_tag( ) { if ( !tag->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unable to create unnamed LoopsDefiner (type: Loops)" ); } string const loops_name(tag->getOption("name")); @@ -137,7 +137,7 @@ LoopsExplicitDefiner::parse_my_tag( << "Please include only tags with name 'loop' " << "as subtags of a 'Loops' tag" << endl << "Tag with name '" << loop_tag->getName() << "' is invalid" << endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } SerializedLoop loop = parse_loop_tag(loop_tag, loops_name); diff --git a/source/src/protocols/loops/loops_definers/LoopsFileDefiner.cc b/source/src/protocols/loops/loops_definers/LoopsFileDefiner.cc index 219ceb7aff..371454fba2 100644 --- a/source/src/protocols/loops/loops_definers/LoopsFileDefiner.cc +++ b/source/src/protocols/loops/loops_definers/LoopsFileDefiner.cc @@ -71,7 +71,7 @@ LoopsFileDefiner::parse_my_tag( ) { if ( !tag->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unable to create unnamed LoopsDefiner (type: LoopsFile)" ); } string const loops_name(tag->getOption("name")); @@ -83,7 +83,7 @@ LoopsFileDefiner::parse_my_tag( } else { stringstream err_msg; err_msg << "Tag with name '" << loops_name << "' does not have the expected 'filename' field." << endl; - throw utility::excn::EXCN_RosettaScriptsOption(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, err_msg.str()); } LoopsFileIO loops_file_io; diff --git a/source/src/protocols/loops/loops_main.cc b/source/src/protocols/loops/loops_main.cc index e1f404bb53..c2b82aeb63 100644 --- a/source/src/protocols/loops/loops_main.cc +++ b/source/src/protocols/loops/loops_main.cc @@ -314,7 +314,7 @@ fold_tree_from_loops( // Test for successful reordering. if ( !f.reorder(root) ) { - throw utility::excn::EXCN_Msg_Exception("Unable to reorder the FoldTree for this loops set!"); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to reorder the FoldTree for this loops set!"); } } diff --git a/source/src/protocols/match/Matcher.cc b/source/src/protocols/match/Matcher.cc index 53a1ba85cb..69f873d46a 100644 --- a/source/src/protocols/match/Matcher.cc +++ b/source/src/protocols/match/Matcher.cc @@ -505,7 +505,7 @@ void Matcher::set_hash_euler_bin_width( Real width ) //std::fill( euler_bin_widths_.begin(), euler_bin_widths_.end(), width ); core::Size ndiv = static_cast< Size > ( 180 / width ); if ( std::abs( ndiv * width - 180.0 ) > 1e-6 ) { - throw utility::excn::EXCN_Msg_Exception( "Please use a eulerian bin width that evenly divides 180, e.g. 10, 9, or 4.5" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Please use a eulerian bin width that evenly divides 180, e.g. 10, 9, or 4.5" ); } euler_bin_widths_ = width; } @@ -530,7 +530,7 @@ void Matcher::set_hash_euler_bin_widths( Vector widths ) } } if ( any_error ) { - throw utility::excn::EXCN_Msg_Exception( err_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_message.str() ); } euler_bin_widths_ = widths; } diff --git a/source/src/protocols/match/MatcherMover.cc b/source/src/protocols/match/MatcherMover.cc index b19637de6f..0f057fd2fd 100644 --- a/source/src/protocols/match/MatcherMover.cc +++ b/source/src/protocols/match/MatcherMover.cc @@ -301,11 +301,11 @@ MatcherMover::parse_my_tag( core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_str ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_str << "' from the Datamap from MatcherMover::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_RosettaScriptsOption( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, error_msg.str() ); } debug_assert( selector ); selectors_.push_back( selector ); @@ -346,7 +346,7 @@ MatcherMover::parse_my_tag( } if ( bad_options ) { msg << "." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } diff --git a/source/src/protocols/matdes/MatDesGreedyOptMutationMover.cc b/source/src/protocols/matdes/MatDesGreedyOptMutationMover.cc index 34bcc16081..72704a6fb3 100644 --- a/source/src/protocols/matdes/MatDesGreedyOptMutationMover.cc +++ b/source/src/protocols/matdes/MatDesGreedyOptMutationMover.cc @@ -942,7 +942,7 @@ MatDesGreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, std::string const relax_mover_name( tag->getOption< std::string >( "relax_mover", "null" ) ); auto mover_it( movers.find( relax_mover_name ) ); if ( mover_it == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Relax mover "+relax_mover_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Relax mover "+relax_mover_name+" not found" ); } relax_mover( mover_it->second ); //XRW TO DO: what does this mean? do I need to add something? //load scorefxn @@ -977,7 +977,7 @@ MatDesGreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, add_filter( find_filt->second->clone(), samp_type, filter_delta ); } //foreach ftag } else { // fi Filters - throw utility::excn::EXCN_RosettaScriptsOption( "tag name " + btag->getName() + " unrecognized." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "tag name " + btag->getName() + " unrecognized." ); } }//foreach btag //load single filter @@ -986,7 +986,7 @@ MatDesGreedyOptMutationMover::parse_my_tag( utility::tag::TagCOP tag, if ( filter_name != "true_filter" || filters_.size() < 1 ) { auto find_filt( filters.find( filter_name ) ); if ( find_filt == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Filter "+filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter "+filter_name+" not found" ); } std::string const samp_type( tag->getOption< std::string >( "sample_type", "low" ) ); core::Real filter_delta( tag->getOption< core::Real >( "filter_delta", core::Real( 0. ) ) ); diff --git a/source/src/protocols/mean_field/AAMatrix.cc b/source/src/protocols/mean_field/AAMatrix.cc index 8a12345fa3..0806adb60f 100644 --- a/source/src/protocols/mean_field/AAMatrix.cc +++ b/source/src/protocols/mean_field/AAMatrix.cc @@ -437,7 +437,7 @@ AAMatrix::parse_aa_matrix_line( utility::vector1 < std::string > const & tokens, std::stringstream error_message; error_message << "Error parsing specificity profile (AAMatrix): expected numeric value." << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } utility::vector1 < AAProb > probs( core::chemical::num_canonical_aas ); @@ -451,7 +451,7 @@ AAMatrix::parse_aa_matrix_line( utility::vector1 < std::string > const & tokens, std::stringstream error_message; error_message << "Error parsing specificity profile (AAMatrix): expected numeric value." << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } core::chemical::AA aa = aa_names[ which_token - 1 ]; diff --git a/source/src/protocols/mean_field/FlexBBMeanField.cc b/source/src/protocols/mean_field/FlexBBMeanField.cc index 132170e5ef..3e7d95e8db 100644 --- a/source/src/protocols/mean_field/FlexBBMeanField.cc +++ b/source/src/protocols/mean_field/FlexBBMeanField.cc @@ -115,7 +115,7 @@ FlexBBMeanField::process() converge(); rot_matrices_[ bb ] = *( MeanField::rot_matrix() ); energy_matrices_[ bb ] = energies_matrix(); - } catch ( utility::excn::EXCN_Msg_Exception &excn ) + } catch ( utility::excn::Exception &excn ) { TR.Info << "Pose did not converge, deleted." << std::endl; delete_pose( bb ); @@ -127,7 +127,7 @@ FlexBBMeanField::process() std::stringstream error_message; error_message << "No poses reached convergence." << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } TR.Info << "Total number of final poses " << num_poses() << std::endl; diff --git a/source/src/protocols/mean_field/GenMeanFieldMover.cc b/source/src/protocols/mean_field/GenMeanFieldMover.cc index b60fbc9d88..37e99364f1 100644 --- a/source/src/protocols/mean_field/GenMeanFieldMover.cc +++ b/source/src/protocols/mean_field/GenMeanFieldMover.cc @@ -293,7 +293,7 @@ GenMeanFieldMover::read_input_pdbs() std::stringstream error_message; error_message << "bb_list specified but no files found." << std::endl; - throw excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(excn::Exception, error_message.str() ); } } else if ( basic::options::option[ basic::options::OptionKeys::in::file::s ].active() ) { @@ -324,7 +324,7 @@ GenMeanFieldMover::prepare_task_poses( pose::Pose const & pose ) std::stringstream error_message; error_message << "Task does not pack anything." << std::endl; - throw excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(excn::Exception, error_message.str() ); } diff --git a/source/src/protocols/mean_field/MeanField.cc b/source/src/protocols/mean_field/MeanField.cc index 89e1d1ef3f..5f60174ec0 100644 --- a/source/src/protocols/mean_field/MeanField.cc +++ b/source/src/protocols/mean_field/MeanField.cc @@ -154,7 +154,7 @@ MeanField::converge () std::stringstream error_message; error_message << "Unable to converge after " << counter << " rounds of convergence." << std::endl; - throw utility::excn::EXCN_Msg_Exception(error_message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str()); } diff --git a/source/src/protocols/medal/MedalMain.cc b/source/src/protocols/medal/MedalMain.cc index 96dd824c55..fc0f2462e7 100644 --- a/source/src/protocols/medal/MedalMain.cc +++ b/source/src/protocols/medal/MedalMain.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include // Project headers #include @@ -75,7 +75,7 @@ void* graphics_main(protocols::moves::MoverOP mover) { try { JobDistributor::get_instance()->go(mover); - } catch (utility::excn::EXCN_Base& e) { + } catch (utility::excn::Exception& e) { std::cerr << "Exception: " << std::endl; e.show(std::cerr); } diff --git a/source/src/protocols/membrane/util.cc b/source/src/protocols/membrane/util.cc index ab8bbe4cfc..75579b39af 100644 --- a/source/src/protocols/membrane/util.cc +++ b/source/src/protocols/membrane/util.cc @@ -1620,7 +1620,7 @@ void check_vector( core::Vector const vector ) { vector.y() < -1000 || vector.y() > 1000 || vector.z() < -1000 || vector.z() > 1000 ) { - throw new core::conformation::membrane::EXCN_Illegal_Arguments("Unreasonable range for center or normal! Check your input vectors!"); + throw CREATE_EXCEPTION(core::conformation::membrane::EXCN_Illegal_Arguments, "Unreasonable range for center or normal! Check your input vectors!"); } }// check_vector diff --git a/source/src/protocols/motif_grafting/movers/MotifGraftMover.cc b/source/src/protocols/motif_grafting/movers/MotifGraftMover.cc index 2368cbbcbd..6a6e284e14 100644 --- a/source/src/protocols/motif_grafting/movers/MotifGraftMover.cc +++ b/source/src/protocols/motif_grafting/movers/MotifGraftMover.cc @@ -340,7 +340,7 @@ void MotifGraftMover::get_matching_fragments( false); //If we do not have enough fragments to satisfise the restrictions then DIE with exception. if ( !enough_fragments ) { - //throw utility::excn::EXCN_Msg_Exception("For this scaffold I couldn't find suitable fragments that match the size of your motifs."); + //throw CREATE_EXCEPTION(utility::excn::Exception, "For this scaffold I couldn't find suitable fragments that match the size of your motifs."); TR.Warning << "For this scaffold & fragment/size combination there are not fragments that match the size of your motifs."<< std::endl; continue; } @@ -354,7 +354,7 @@ void MotifGraftMover::get_matching_fragments( TR.Debug << "Num of Fragments so far: " << v_m2s_data.size() << std::endl; //If we do not have enough fragments to satisfise the restrictions DIE with exception. if ( v_m2s_data.size() == 0 ) { - //throw utility::excn::EXCN_Msg_Exception("For this scaffold I couldn't find any suitable fragment combination that match your motif's geometric restrictions."); + //throw CREATE_EXCEPTION(utility::excn::Exception, "For this scaffold I couldn't find any suitable fragment combination that match your motif's geometric restrictions."); TR.Warning << "For this scaffold & fragment combination there are not fragments combinations that match the geometric restrictions of your motifs."<< std::endl; continue; } @@ -365,7 +365,7 @@ void MotifGraftMover::get_matching_fragments( TR.Debug << "Num of Fragments so far: " << v_m2s_data.size() << std::endl; //If we do not have enough fragments to satisfise the restrictions DIE with exception. if ( v_m2s_data.size() == 0 ) { - //throw utility::excn::EXCN_Msg_Exception("For this scaffold I couldn't find any suitable fragment combination that pass the RMSD test."); + //throw CREATE_EXCEPTION(utility::excn::Exception, "For this scaffold I couldn't find any suitable fragment combination that pass the RMSD test."); TR.Warning << "For this scaffold & fragment combination there are not fragments that pass the RMSD test."<< std::endl; continue; } @@ -387,7 +387,7 @@ void MotifGraftMover::get_matching_fragments( p_scaffold_mono_aa = MotifGraftMover::get_mono_aa_pose_copy( p_scaffold , clash_test_residue); p_motif_mono_aa = MotifGraftMover::get_mono_aa_pose_copy( *p_motif_ , clash_test_residue); } else { - throw utility::excn::EXCN_Msg_Exception("The aminoacid selected for the clash test is not valid. Valid selections are: \"GLY, ALA, VAL, NATIVE\""); + throw CREATE_EXCEPTION(utility::excn::Exception, "The aminoacid selected for the clash test is not valid. Valid selections are: \"GLY, ALA, VAL, NATIVE\""); } //p_scaffold_mono_aa.dump_pdb( "test_x"+utility::to_string(numPermutation)+".pdb"); //p_motif_mono_aa.dump_pdb( "test_y"+utility::to_string(numPermutation)+".pdb"); @@ -396,7 +396,7 @@ void MotifGraftMover::get_matching_fragments( MotifGraftMover::test_epigraft_and_contextStructure_clashes( p_scaffold_mono_aa, p_motif_mono_aa, *p_contextStructure_, clash_cutoff, v_m2s_data); TR.Debug << "Num of Fragments so far: " << v_m2s_data.size() << std::endl; if ( v_m2s_data.size() == 0 ) { - //throw utility::excn::EXCN_Msg_Exception("For this scaffold I couldn't find any suitable fragment combination that pass the clash_score test."); + //throw CREATE_EXCEPTION(utility::excn::Exception, "For this scaffold I couldn't find any suitable fragment combination that pass the clash_score test."); TR.Warning << "For this scaffold & fragment combination there are not fragments that pass the clash_score test."<< std::endl; continue; } @@ -410,7 +410,7 @@ void MotifGraftMover::get_matching_fragments( }//END Test combinations of fragments (outer loop) //return if ( pq.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception("For this scaffold there are not suitable scaffold grafts within your constrains"); + throw CREATE_EXCEPTION(utility::excn::Exception, "For this scaffold there are not suitable scaffold grafts within your constrains"); } else { TR.Info << "After all the iterations there are a total of: " << pq.size() << " fragments in the priority queue"<< std::endl; } @@ -903,7 +903,7 @@ void MotifGraftMover::get_motif_scaffold_superposition_and_RMSD( if ( b_full_motif_bb_alignment ) { TR.Debug << "Using full fragment BB alignment" << std::endl; if ( ((*it_fragments).v_indexes[i].motifHigh-(*it_fragments).v_indexes[i].motifLow) != ((*it_fragments).v_indexes[i].scaffoldHigh - (*it_fragments).v_indexes[i].scaffoldLow ) ) { - throw utility::excn::EXCN_Msg_Exception("Something is WRONG, most likely this is a BUG. You are using full Back Bone alignment but the size of the fragments in the motif and scaffold are different, THIS alignment can't be performed. Please contact the authors of the program and cite this legend."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Something is WRONG, most likely this is a BUG. You are using full Back Bone alignment but the size of the fragments in the motif and scaffold are different, THIS alignment can't be performed. Please contact the authors of the program and cite this legend."); } //ToDo: Add a check for the same size of fragments, this alignment can't happen otherwise for ( core::Size j = (*it_fragments).v_indexes[i].motifLow; j<= (*it_fragments).v_indexes[i].motifHigh; ++j ) { @@ -1573,14 +1573,14 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa TR.Info << "Parsed combinatory size delta for fragment #"<< i << " = " << tmpPairParser.first <<"," << tmpPairParser.second << std::endl; gp_vp_combinatory_fragment_size_delta_.push_back(tmpPairParser); if ( tmpPairParser.first < 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption(" The left term [ x: ] of the combinatory fragment size delta for fragment cannot be < 0"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " The left term [ x: ] of the combinatory fragment size delta for fragment cannot be < 0"); } else if ( tmpPairParser.second < 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption(" The right term [ :x ] of the combinatory fragment size delta for fragment cannot be < 0"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " The right term [ :x ] of the combinatory fragment size delta for fragment cannot be < 0"); } } //Die if the number of delta deffinitions is different to the number of motif fragments if ( gp_vp_combinatory_fragment_size_delta_.size() != gp_p_motif_->conformation().num_chains() ) { - throw utility::excn::EXCN_RosettaScriptsOption("The number of deffined combinatory_fragment_size_delta pairs (:) must match the number of fragments in your motif"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The number of deffined combinatory_fragment_size_delta pairs (:) must match the number of fragments in your motif"); } } else { TR.Warning << "No combinatory_fragment_size_delta, assuming that you dont want to test several combinations of your motif's length" << std::endl; @@ -1607,15 +1607,15 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa tmpPairParser.second=(long int) std::atoi(tmpSplitParser2[2].c_str()); TR.Info << "Parsed replacement size delta for fragment #"<< i << " = " << tmpPairParser.first <<"," << tmpPairParser.second << std::endl; if ( tmpPairParser.first > 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("The left term [ x: ] of the replacement size delta for fragment cannot be > 0"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The left term [ x: ] of the replacement size delta for fragment cannot be > 0"); } else if ( tmpPairParser.second < 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("The right term [ :x ] of the replacement size delta for fragment cannot be < 0"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The right term [ :x ] of the replacement size delta for fragment cannot be < 0"); } gp_vp_max_fragment_replacement_size_delta_.push_back(tmpPairParser); } //Die if the number of delta deffinitions is different to the number of motif fragments if ( gp_vp_max_fragment_replacement_size_delta_.size() != gp_p_motif_->conformation().num_chains() ) { - throw utility::excn::EXCN_RosettaScriptsOption("The number of deffined max_fragment_replacement_size_delta pairs (:) must match the number of fragments in your motif"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The number of deffined max_fragment_replacement_size_delta pairs (:) must match the number of fragments in your motif"); } } else { TR.Warning << "No max_fragment_replacement_size defined, assuming that each motif fragment can replace " @@ -1646,7 +1646,7 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa tmpRealParser.push_back(std::atoi(tmpSplitParser2[j].c_str())); TR.Info << "Parsed hotspot at position: " << tmpRealParser[j] << ", for fragment #"<< i << std::endl; if ( tmpRealParser[j] < 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption("A hotspot index cannot be 0 or a negative number." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "A hotspot index cannot be 0 or a negative number." ); } } } @@ -1654,7 +1654,7 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa } //Die if the number of hotspot deffinitions is different to the number of motif fragments if ( gp_vvr_hotspots_.size() != gp_p_motif_->conformation().num_chains() ) { - throw utility::excn::EXCN_RosettaScriptsOption("If used, the hotspots have to be defined for all the fragments in your motif.\n Note: use an empty definition for any fragment without hotspots (e.g. 1:3:4,,2:4 ) "); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "If used, the hotspots have to be defined for all the fragments in your motif.\n Note: use an empty definition for any fragment without hotspots (e.g. 1:3:4,,2:4 ) "); } //Check that the hotspots are inside of the chain lenght for ( core::Size i = 1; i <= gp_p_motif_->conformation().num_chains() ; ++i ) { @@ -1662,7 +1662,7 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa for ( core::Size j = 1; j <= gp_vvr_hotspots_[i].size() ; ++j ) { if ( gp_vvr_hotspots_[i][j] > chainSize ) { TR.Warning << "The hotspot: " << gp_vvr_hotspots_[i][j] << ", for chain: " << i << " is outside of the motif!!!" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("A hotspot has to be inside of its motif" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "A hotspot has to be inside of its motif" ); } } } @@ -1739,7 +1739,7 @@ void MotifGraftMover::parse_my_string_arguments_and_cast_to_globalPrivateSpaceVa if ( b_revert_graft_to_native_sequence && gp_b_full_motif_bb_alignment_ ) { TR.Warning << "revert_graft_to_native_sequence is Active. After grafting the output will be reverted to the native sequence of the target scaffold" << std::endl; } else if ( b_revert_graft_to_native_sequence && !gp_b_full_motif_bb_alignment_ ) { - throw utility::excn::EXCN_RosettaScriptsOption("ERROR: revert_graft_to_native_sequence=true only can be used in conjuction with full_motif_bb_alignment=true" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ERROR: revert_graft_to_native_sequence=true only can be used in conjuction with full_motif_bb_alignment=true" ); } //OPTIONAL: allow multiple outputs of the same graft? @@ -1785,21 +1785,21 @@ void MotifGraftMover::parse_my_tag( if ( tag->hasOption("context_structure") ) { s_contextStructure = tag->getOption< std::string >( "context_structure"); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify the context_structure."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify the context_structure."); } //REQUIRED: motif structure if ( tag->hasOption("motif_structure") ) { s_motif = tag->getOption< std::string >( "motif_structure" ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify the motif_structure."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify the motif_structure."); } //REQUIRED: RMSD_tolerance if ( tag->hasOption("RMSD_tolerance") ) { r_RMSD_tolerance = tag->getOption( "RMSD_tolerance" ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify the RMSD_tolerance."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify the RMSD_tolerance."); } //OPTIONAL: NC_points_RMSD_tolerance @@ -1814,7 +1814,7 @@ void MotifGraftMover::parse_my_tag( if ( tag->hasOption("clash_score_cutoff") ) { i_clash_score_cutoff = tag->getOption( "clash_score_cutoff" ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify the clash_score_cutoff."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify the clash_score_cutoff."); } //OPTIONAL: combinatory_fragment_size_delta diff --git a/source/src/protocols/moves/FilterReportAsPoseExtraScoresMover.cc b/source/src/protocols/moves/FilterReportAsPoseExtraScoresMover.cc index f7a8536ab5..84c67f1718 100644 --- a/source/src/protocols/moves/FilterReportAsPoseExtraScoresMover.cc +++ b/source/src/protocols/moves/FilterReportAsPoseExtraScoresMover.cc @@ -76,7 +76,7 @@ FilterReportAsPoseExtraScoresMover::parse_my_tag( if ( tag->hasOption( "report_as" ) ) { set_report_as(tag->getOption< std::string >( "report_as" )); } else { - throw utility::excn::EXCN_BadInput(mover_name() + " requires report_as to know what to report its value to"); + throw CREATE_EXCEPTION(utility::excn::BadInput, mover_name() + " requires report_as to know what to report its value to"); } } @@ -122,7 +122,7 @@ FilterReportAsPoseExtraScoresMover::apply( core::pose::Pose & pose) { //ensure filter exists if ( !filter_ ) { - throw utility::excn::EXCN_NullPointer(mover_name() + " has no Filter."); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, mover_name() + " has no Filter."); } //extract report_sm from filter to setPoseExtraScores diff --git a/source/src/protocols/moves/MonteCarloExceptionConverge.hh b/source/src/protocols/moves/MonteCarloExceptionConverge.hh index 0d5196fd45..127dd1b5c7 100644 --- a/source/src/protocols/moves/MonteCarloExceptionConverge.hh +++ b/source/src/protocols/moves/MonteCarloExceptionConverge.hh @@ -41,9 +41,9 @@ namespace protocols { namespace moves { -class EXCN_Converged : public utility::excn::EXCN_Msg_Exception { +class EXCN_Converged : public utility::excn::Exception { public: - EXCN_Converged() : EXCN_Msg_Exception( "exit protocol because structure is converged" ) {}; + EXCN_Converged(char const *file, int line, std::string const & m) : Exception(file, line, m + "\nexit protocol because structure is converged" ) {}; }; class MonteCarloExceptionConverge : public utility::pointer::ReferenceCount { diff --git a/source/src/protocols/moves/MoverFactory.cc b/source/src/protocols/moves/MoverFactory.cc index d25488d817..9ccf7925e2 100644 --- a/source/src/protocols/moves/MoverFactory.cc +++ b/source/src/protocols/moves/MoverFactory.cc @@ -64,13 +64,13 @@ MoverFactory::factory_register( MoverCreatorOP creator ) runtime_assert( creator != nullptr ); std::string const mover_type( creator->keyname() ); if ( mover_type == "UNDEFINED NAME" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't map derived Mover with undefined type name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't map derived Mover with undefined type name."); } if ( forbidden_names_.find( mover_type ) != forbidden_names_.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Name "+mover_type+" is not an allowed mover name, probably because it has historical meaning."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Name "+mover_type+" is not an allowed mover name, probably because it has historical meaning."); } if ( mover_creator_map_.find( mover_type ) != mover_creator_map_.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("MoverFactory::factory_register already has a mover creator with name \"" + mover_type + "\". Conflicting Mover names" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MoverFactory::factory_register already has a mover creator with name \"" + mover_type + "\". Conflicting Mover names" ); } mover_creator_map_[ mover_type ] = creator; } @@ -115,7 +115,7 @@ MoverFactory::newMover( std::string const & mover_type ) MoverMap::const_iterator iter( mover_creator_map_.find( mover_type ) ); if ( iter != mover_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: MoverCreatorOP prototype for " + mover_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: MoverCreatorOP prototype for " + mover_type + " is NULL!" ); } // use of cloning method would be faithful to pre-initialized prototypes //return iter->second->clone(); @@ -127,7 +127,7 @@ MoverFactory::newMover( std::string const & mover_type ) TR << mover_it->first << ", "; } TR << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( mover_type + " is not known to the MoverFactory. Was it registered via a MoverRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, mover_type + " is not known to the MoverFactory. Was it registered via a MoverRegistrator in one of the init.cc files (devel/init.cc or protocols/init.cc)?" ); return nullptr; } } @@ -157,8 +157,8 @@ void MoverFactory::define_mover_xml_schema( utility::tag::XMLSchemaDefinition & mover_xml_schema_group_name(), & complex_type_name_for_mover, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for Movers from MoverFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for Movers from MoverFactory; offending class" " must call protocols::moves::complex_type_name_for_mover when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/moves/RampingMover.cc b/source/src/protocols/moves/RampingMover.cc index bc0c8d84da..38baf10b06 100644 --- a/source/src/protocols/moves/RampingMover.cc +++ b/source/src/protocols/moves/RampingMover.cc @@ -221,13 +221,13 @@ RampingMover::parse_my_tag( { if ( !tag->hasOption("outer_cycles") ) { - throw utility::excn::EXCN_RosettaScriptsOption("You must specify the option outer_cycles in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "You must specify the option outer_cycles in RampingMover"); } if ( !tag->hasOption("inner_cycles") ) { - throw utility::excn::EXCN_RosettaScriptsOption("You must specify the option inner_cycles in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "You must specify the option inner_cycles in RampingMover"); } if ( !tag->hasOption("mover") ) { - throw utility::excn::EXCN_RosettaScriptsOption("You must specify the option mover in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "You must specify the option mover in RampingMover"); } //Get options values out of the tag @@ -238,7 +238,7 @@ RampingMover::parse_my_tag( core::scoring::ScoreFunctionOP sfxn( protocols::rosetta_scripts::parse_score_function( tag, datamap ) ); if ( sfxn == nullptr ) { - throw utility::excn::EXCN_RosettaScriptsOption("scorefxn required to create a RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "scorefxn required to create a RampingMover"); } scorefxn_ = sfxn; @@ -246,7 +246,7 @@ RampingMover::parse_my_tag( //get the mover to ramp out of the movemap auto find_mover(movers.find(mover_name)); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("cannot find "+mover_name+" in mover map."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "cannot find "+mover_name+" in mover map."); } mover_ = find_mover->second; @@ -268,16 +268,16 @@ RampingMover::parse_my_tag( // 1st: Make sure all the required options have been provided. if ( !tag->hasOption("start_weight") ) { - throw utility::excn::EXCN_RosettaScriptsOption("One-weight ramping mode: you must specify the option start_weight in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "One-weight ramping mode: you must specify the option start_weight in RampingMover"); } if ( !tag->hasOption("end_weight") ) { - throw utility::excn::EXCN_RosettaScriptsOption("One-weight ramping mode: you must specify the option end_weight in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "One-weight ramping mode: you must specify the option end_weight in RampingMover"); } if ( !tag->hasOption("score_type") ) { - throw utility::excn::EXCN_RosettaScriptsOption("One-weight ramping mode: you must specify the option score_type in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "One-weight ramping mode: you must specify the option score_type in RampingMover"); } if ( !tag->hasOption("ramp_func") ) { - throw utility::excn::EXCN_RosettaScriptsOption("One-weight ramping mode: you must specify the option ramp_func in RampingMover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "One-weight ramping mode: you must specify the option ramp_func in RampingMover"); } ramp_one_weight_ = true; @@ -293,7 +293,7 @@ RampingMover::parse_my_tag( //set up the score type if ( ! core::scoring::ScoreTypeManager::is_score_type( score_type ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "The value for option score_type \"" + score_type + "\" is not a valid name for a score_type" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The value for option score_type \"" + score_type + "\" is not a valid name for a score_type" ); } score_type_ = core::scoring::ScoreTypeManager::score_type_from_name(score_type); ramping_funcs_for_weights_[score_type_] = instantiate_rampfunc( ramping_func, tag ); @@ -303,7 +303,7 @@ RampingMover::parse_my_tag( if ( tag->hasOption("unramped_weights_from_sfxn") ) { std::string const scorefxn_key( tag->getOption("unramped_weights_from_sfxn") ); if ( ! datamap.has( "scorefxns", scorefxn_key ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); } core::scoring::ScoreFunctionCOP sfxn = datamap.get_ptr< core::scoring::ScoreFunction >( "scorefxns", scorefxn_key ); start_weights_ = end_weights_ = sfxn->weights(); @@ -314,16 +314,16 @@ RampingMover::parse_my_tag( utility::vector0< TagCOP > const & rampterm_tags( tag->getTags() ); for ( auto tag_ptr : rampterm_tags ) { if ( ! tag_ptr->hasOption("score_type") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Ramping mover Add statement requires the score_type option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Ramping mover Add statement requires the score_type option"); } if ( ! tag_ptr->hasOption("start_weight") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Ramping mover Add statement requires the start_weight option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Ramping mover Add statement requires the start_weight option"); } if ( ! tag_ptr->hasOption("end_weight") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Ramping mover Add statement requires the end_weight option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Ramping mover Add statement requires the end_weight option"); } if ( ! tag_ptr->hasOption("ramp_func") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Ramping mover Add statement requires the ramp_func option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Ramping mover Add statement requires the ramp_func option"); } core::Real start_weight(tag_ptr->getOption("start_weight")); core::Real end_weight(tag_ptr->getOption("end_weight")); @@ -332,7 +332,7 @@ RampingMover::parse_my_tag( //read the score type if ( ! core::scoring::ScoreTypeManager::is_score_type( score_type ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "The value for option score_type \"" + score_type + "\" is not a valid name for a score_type" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "The value for option score_type \"" + score_type + "\" is not a valid name for a score_type" ); } core::scoring::ScoreType st = core::scoring::ScoreTypeManager::score_type_from_name(score_type); start_weights_[ st ] = start_weight; diff --git a/source/src/protocols/moves/TrialMover.cc b/source/src/protocols/moves/TrialMover.cc index ae546443a8..41b82485bf 100644 --- a/source/src/protocols/moves/TrialMover.cc +++ b/source/src/protocols/moves/TrialMover.cc @@ -73,17 +73,17 @@ void MonteCarloUtil::parse_my_tag( core::pose::Pose const & /* pose */) { if ( !tag->hasOption("mode") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you must specify option mode in MonteCarloUtil"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you must specify option mode in MonteCarloUtil"); } if ( !tag->hasOption("montecarlo") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you must specify the option montecarlo in MonteCarloUtil"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you must specify the option montecarlo in MonteCarloUtil"); } mode_ = tag->getOption("mode"); std::string const mc_name(tag->getOption("montecarlo")); if ( mode_ != "reset" && mode_ != "recover_low" ) { - throw utility::excn::EXCN_RosettaScriptsOption("the option mode must be set to either reset or recover_low in MonteCarloUtil"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "the option mode must be set to either reset or recover_low in MonteCarloUtil"); } mc_ = data.get_ptr( "montecarlos",mc_name); @@ -255,17 +255,17 @@ void TrialMover::parse_my_tag( // 1. MonteCarlo object's name std::string const mc_name( tag->getOption< std::string > ( "montecarlo", "" )); if ( mc_name == "" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "TrialMover requires the 'montecarlo' option which was not provided" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TrialMover requires the 'montecarlo' option which was not provided" ); } // 2. Mover std::string const movername( tag->getOption< std::string > ( "mover", "" )); if ( movername == "" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "TrialMover requires the 'mover' option which was not provided" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TrialMover requires the 'mover' option which was not provided" ); } auto find_mover ( movers.find( movername )); if ( find_mover == movers.end() && movername != "" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "TrialMover was not able to find the mover named '" + movername + "' in the Movers_map" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TrialMover was not able to find the mover named '" + movername + "' in the Movers_map" ); } mover_ = find_mover->second; mc_ = data.get_ptr< protocols::moves::MonteCarlo>( "montecarlos", mc_name ); @@ -273,7 +273,7 @@ void TrialMover::parse_my_tag( // 3. stats_type. std::string const statstype( tag->getOption< std::string > ( "keep_stats", "no_stats" )); if ( statstype != "no_stats" && statstype != "accept_reject" && statstype != "all_stats" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "TrialMover keep_stats may only be given the values:\n'no_stats', 'accept_reject', and 'all_stats'.\nRead value '" + statstype + "'" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TrialMover keep_stats may only be given the values:\n'no_stats', 'accept_reject', and 'all_stats'.\nRead value '" + statstype + "'" ); } if ( statstype == "no_stats" ) { stats_type_ = no_stats; diff --git a/source/src/protocols/mpi_refinement/WorkUnit_Loop.cc b/source/src/protocols/mpi_refinement/WorkUnit_Loop.cc index b7c24af535..a237f7fe7c 100644 --- a/source/src/protocols/mpi_refinement/WorkUnit_Loop.cc +++ b/source/src/protocols/mpi_refinement/WorkUnit_Loop.cc @@ -129,7 +129,7 @@ WorkUnit_LoopHash::init_from_cmd( const core::Size mpi_rank ) // load initial library from disk library_->load_mergeddb(); } -catch( utility::excn::EXCN_Msg_Exception & e ){ +catch( utility::excn::Exception & e ){ e.show( std::cout ); e.show( std::cerr ); throw; diff --git a/source/src/protocols/multistate_design/PackingState.cc b/source/src/protocols/multistate_design/PackingState.cc index 805a451f3f..50f64c67d3 100644 --- a/source/src/protocols/multistate_design/PackingState.cc +++ b/source/src/protocols/multistate_design/PackingState.cc @@ -73,7 +73,7 @@ PackingState::create_packer_data( ig_p_ = utility::pointer::dynamic_pointer_cast( ig ); if ( ! ig_p_ ) { - throw utility::excn::EXCN_Msg_Exception( "Interaction graph returned by pack_rotamers_setup is not a two-body interaction graph." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Interaction graph returned by pack_rotamers_setup is not a two-body interaction graph." ); } } diff --git a/source/src/protocols/ncbb/SecStructMinimizeMover.cc b/source/src/protocols/ncbb/SecStructMinimizeMover.cc index b47d58f694..7143fb3cc9 100644 --- a/source/src/protocols/ncbb/SecStructMinimizeMover.cc +++ b/source/src/protocols/ncbb/SecStructMinimizeMover.cc @@ -211,7 +211,7 @@ SecStructMinimizeMover::parse_my_tag( try { score_fxn_ = protocols::rosetta_scripts::parse_score_function( tag, "score_fxn", data )->clone(); - } catch ( utility::excn::EXCN_RosettaScriptsOption const & e ) { + } catch (utility::excn::RosettaScriptsOptionError const & e ) { TR << "kill me " << e.msg() << std::endl; } } diff --git a/source/src/protocols/ncbb/util.cc b/source/src/protocols/ncbb/util.cc index b3fdc07bec..a4f0833097 100644 --- a/source/src/protocols/ncbb/util.cc +++ b/source/src/protocols/ncbb/util.cc @@ -462,7 +462,7 @@ init_common_options( utility::tag::TagCOP tag, basic::datacache::DataMap &data, if ( tag->hasOption( "scorefxn" ) ) { std::string const scorefxn_key( tag->getOption< std::string >( "scorefxn" ) ); if ( ! data.has( "scorefxns", scorefxn_key ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); } score_fxn_ = data.get_ptr< ScoreFunction >( "scorefxns", scorefxn_key ); } diff --git a/source/src/protocols/noesy_assign/CrossPeak.cc b/source/src/protocols/noesy_assign/CrossPeak.cc index 791c7fc052..6a97565682 100644 --- a/source/src/protocols/noesy_assign/CrossPeak.cc +++ b/source/src/protocols/noesy_assign/CrossPeak.cc @@ -531,7 +531,7 @@ void CrossPeak::calibrate( PeakCalibrator const& calibrator, PeakCalibrator::Typ PeakAssignmentParameters const& params( *PeakAssignmentParameters::get_instance() ); Real sum( 0.0 ); Size ct( 0 ); - // if ( volume_ <= 0.0 ) throw utility::excn::EXCN_BadInput("Peak intensity negative or zero for "+ObjexxFCL::string_of( peak_id_ ) ); + // if ( volume_ <= 0.0 ) throw CREATE_EXCEPTION(utility::excn::BadInput, "Peak intensity negative or zero for "+ObjexxFCL::string_of( peak_id_ ) ); for ( PeakAssignments::const_iterator it = begin(); it != end(); ++it ) { CALIBRATION_ATOM_TYPE type1, type2; type1 = (*it)->calibration_atom_type( 1 ); @@ -610,7 +610,7 @@ void CrossPeak3D::assign_labelled_spin( Size iproton ) { proton( iproton ).add_assignment( (*rit)->label() ); //we have found a proton that can be attached to our label } - } catch ( EXCN_UnknownAtomname& exception ) { + } catch (EXCN_UnknownAtomname& exception ) { continue; } } // if rit is proton @@ -632,7 +632,7 @@ void CrossPeak3D::assign_labelled_spin( Size iproton ) { proton( iproton ).add_assignment( it->first ); label( iproton ).add_assignment( label_reso.label() ); } - } catch ( EXCN_UnknownResonance& exception ) { + } catch (EXCN_UnknownResonance& exception ) { if ( !unknown_resonances_.count( exception.atom() ) ) { unknown_resonances_.insert( exception.atom() ); exception.show( tr.Warning ); @@ -640,7 +640,7 @@ void CrossPeak3D::assign_labelled_spin( Size iproton ) { // if ( tr.Debug.visible() ) exception.show( tr.Debug ); } continue; //if no label is known we don't assign this proton - } catch ( EXCN_UnknownAtomname& exception ) { //this happens if we try to assign a proton that can't have a label: i.e., a H in a HCH spectrum + } catch (EXCN_UnknownAtomname& exception ) { //this happens if we try to assign a proton that can't have a label: i.e., a H in a HCH spectrum if ( tr_labels.Trace.visible() ) { tr_labels.Trace << "cannot find label atom for resid: " + it->second->atom().atom() + " " + ObjexxFCL::string_of( resid ) + " --- ignore proton assignment" << std::endl; } diff --git a/source/src/protocols/noesy_assign/CrossPeakInfo.cc b/source/src/protocols/noesy_assign/CrossPeakInfo.cc index 43e33c0c81..9d98578a9d 100644 --- a/source/src/protocols/noesy_assign/CrossPeakInfo.cc +++ b/source/src/protocols/noesy_assign/CrossPeakInfo.cc @@ -148,7 +148,7 @@ std::string CrossPeakInfo::label_atom_name( std::string const& proton_name, core if ( tr_labels.Trace.visible() ) { tr_labels.Trace << "proton_name " + proton_name + " not recognized for " + label_atom_type_ + " label on " + name_from_aa( aa ) << std::endl; } - throw EXCN_UnknownAtomname(""); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, ""); return "no_atom"; } diff --git a/source/src/protocols/noesy_assign/Exceptions.hh b/source/src/protocols/noesy_assign/Exceptions.hh index 54f3ed46c7..41701a9a3c 100644 --- a/source/src/protocols/noesy_assign/Exceptions.hh +++ b/source/src/protocols/noesy_assign/Exceptions.hh @@ -17,9 +17,6 @@ #define INCLUDED_protocols_noesy_assign_Exceptions_hh -// Unit Headers -//#include - // Utility Headers #include #include @@ -31,48 +28,37 @@ namespace protocols { namespace noesy_assign { -class EXCN_NoesyAssign : public virtual utility::excn::EXCN_Msg_Exception { - typedef EXCN_Msg_Exception Parent; -protected: - EXCN_NoesyAssign() : EXCN_Msg_Exception( "" ){}; +class EXCN_NoesyAssign : public utility::excn::Exception { public: - void show( std::ostream& os ) const override { - os << "\n[NOE Exception]: "; - Parent::show( os ); - } + EXCN_NoesyAssign(char const *file, int line, std::string const& msg) : utility::excn::Exception(file, line, "\n[NOE Exception]: " + msg) {} }; class EXCN_UnknownAtomname : public EXCN_NoesyAssign { public: - EXCN_UnknownAtomname( std::string const& msg ) - : utility::excn::EXCN_Msg_Exception( msg ) {}; + using EXCN_NoesyAssign::EXCN_NoesyAssign; }; class EXCN_UnknownResonance : public EXCN_NoesyAssign { public: - EXCN_UnknownResonance( core::id::NamedAtomID atom, std::string const& msg ) - : utility::excn::EXCN_Msg_Exception( msg ), atom_( atom ) {}; + EXCN_UnknownResonance(char const *file, int line, core::id::NamedAtomID atom, std::string const& msg ) : EXCN_NoesyAssign(file, line, msg), atom_( atom ) { + utility::excn::Exception::add_msg("Resonance for atom " + atom_.to_string() +" not found!"); + } core::id::NamedAtomID const& atom() { return atom_; } - void show( std::ostream& os ) const override { - utility::excn::EXCN_Msg_Exception::show( os ); - os << "Resonance for atom " << atom_ << " not found "; - } private: core::id::NamedAtomID atom_; }; class EXCN_AssignmentNotFound : public EXCN_NoesyAssign { public: - EXCN_AssignmentNotFound( PeakAssignment const& assignment, std::string const& msg ) - : utility::excn::EXCN_Msg_Exception( msg ), assignment_( assignment ) {}; + EXCN_AssignmentNotFound(char const *file, int line, PeakAssignment const& assignment, std::string const& msg ) : EXCN_NoesyAssign(file, line, msg), assignment_(assignment) {}; PeakAssignment assignment_; }; class EXCN_FileFormat : public EXCN_NoesyAssign { public: - EXCN_FileFormat( std::string msg ) : utility::excn::EXCN_Msg_Exception( msg ) {}; + using EXCN_NoesyAssign::EXCN_NoesyAssign; }; } //namespace diff --git a/source/src/protocols/noesy_assign/MethylNames.cc b/source/src/protocols/noesy_assign/MethylNames.cc index 398b165b6c..c754447008 100644 --- a/source/src/protocols/noesy_assign/MethylNames.cc +++ b/source/src/protocols/noesy_assign/MethylNames.cc @@ -123,7 +123,7 @@ std::string MethylNames::aa_name() const { std::string const& MethylNames::rosetta2nmr( std::string const& proton ) const { auto it = rosetta2nmr_.find( proton ); if ( it == rosetta2nmr_.end() ) { - throw EXCN_UnknownAtomname("proton_name " + proton + " not recognized for aminoacid " + aa_name() ); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, "proton_name " + proton + " not recognized for aminoacid " + aa_name() ); } return it->second; } @@ -131,7 +131,7 @@ std::string const& MethylNames::rosetta2nmr( std::string const& proton ) const { MethylNames::AtomList const& MethylNames::nmr2rosetta( std::string const& proton ) const { auto it = nmr2rosetta_.find( proton ); if ( it == nmr2rosetta_.end() ) { - throw EXCN_UnknownAtomname("proton_name " + proton + " not recognized for aminoacid " + aa_name() ); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, "proton_name " + proton + " not recognized for aminoacid " + aa_name() ); } return it->second; } @@ -139,7 +139,7 @@ MethylNames::AtomList const& MethylNames::nmr2rosetta( std::string const& proton MethylNames::AtomList const& MethylNames::rosetta2methyl( std::string const& proton ) const { auto it = rosetta2methyl_.find( proton ); if ( it == rosetta2methyl_.end() ) { - throw EXCN_UnknownAtomname("proton_name " + proton + " not recognized for aminoacid " + aa_name() ); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, "proton_name " + proton + " not recognized for aminoacid " + aa_name() ); } return it->second; } @@ -149,7 +149,7 @@ core::Size MethylNames::proton_index( std::string const& proton ) const { for ( auto it = begin(); it != end(); ++it, ++ct ) { if ( it->first == proton ) return ct; } - throw EXCN_UnknownAtomname("proton_name " + proton + " not recognized for aminoacid " + aa_name() ); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, "proton_name " + proton + " not recognized for aminoacid " + aa_name() ); return 0; } diff --git a/source/src/protocols/noesy_assign/NoesyModule.cc b/source/src/protocols/noesy_assign/NoesyModule.cc index d0fbe7d297..8671cf00bf 100644 --- a/source/src/protocols/noesy_assign/NoesyModule.cc +++ b/source/src/protocols/noesy_assign/NoesyModule.cc @@ -180,7 +180,7 @@ void NoesyModule::read_input_files() { } } else { tr.Error << "cannot read " << input_file << std::endl; - throw utility::excn::EXCN_FileNotFound( option[ OptionKeys::noesy::in::resonances ]() ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, option[ OptionKeys::noesy::in::resonances ]() ); } } @@ -195,7 +195,7 @@ void NoesyModule::read_input_files() { utility::io::izstream input_file( file ); if ( input_file.good() ) { if ( main_resonances->size() < 1 ) { - throw utility::excn::EXCN_BadInput( "attempt to read Peak-Files with option -noesy:in:peaks without a global resonance file: -noesy:in:resonances" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "attempt to read Peak-Files with option -noesy:in:peaks without a global resonance file: -noesy:in:resonances" ); } PeakFileFormat_xeasy format; format.set_filename( option[ OptionKeys::noesy::in::peaks ]()[ ifile ].base() ); @@ -212,7 +212,7 @@ void NoesyModule::read_input_files() { if ( option[ OptionKeys::noesy::in::peak_resonance_pairs ].user() ) { //scope Size n_pair_files( option[ OptionKeys::noesy::in::peak_resonance_pairs ]().size() ); if ( n_pair_files % 2 != 0 ) { - throw utility::excn::EXCN_BadInput( "odd number of entries in option -noesy:in:peak_resonance_pairs, always provide pairs of files <*.peaks> <*.prot>" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "odd number of entries in option -noesy:in:peak_resonance_pairs, always provide pairs of files <*.peaks> <*.prot>" ); } for ( core::Size ifile = 1; ifile <= n_pair_files; ifile += 2 ) { ResonanceListOP resonances( new ResonanceList( sequence() ) ); @@ -225,7 +225,7 @@ void NoesyModule::read_input_files() { } } else { tr.Error << "cannot read " << res_input_file << std::endl; - throw utility::excn::EXCN_FileNotFound( option[ OptionKeys::noesy::in::resonances ]() ); + throw CREATE_EXCEPTION(utility::excn::FileNotFound, option[ OptionKeys::noesy::in::resonances ]() ); } std::string file( option[ OptionKeys::noesy::in::peak_resonance_pairs ]()[ ifile ] ); utility::io::izstream input_file( file ); diff --git a/source/src/protocols/noesy_assign/PeakAssignmentResidueMap.cc b/source/src/protocols/noesy_assign/PeakAssignmentResidueMap.cc index 72028126b3..d5f26545cf 100644 --- a/source/src/protocols/noesy_assign/PeakAssignmentResidueMap.cc +++ b/source/src/protocols/noesy_assign/PeakAssignmentResidueMap.cc @@ -117,18 +117,18 @@ void PeakAssignmentResidueMap::remove( PeakAssignment const& assignment ) { } } if ( !success ) { - throw EXCN_AssignmentNotFound( assignment, "remove: PeakAssignment not found -- no entry with exact assignment" ); + throw CREATE_EXCEPTION(EXCN_AssignmentNotFound, assignment, "remove: PeakAssignment not found -- no entry with exact assignment" ); } } PeakAssignmentResidueMap::PeakAssignments const& PeakAssignmentResidueMap::assignments( core::Size res1, core::Size res2 ) const { basic::ProfileThis doit( basic::NOESY_ASSIGN_NETWORK_FIND_RAW_ASSIGN ); if ( residues_.size() < res1 || res1 <= 0 ) { - throw EXCN_AssignmentNotFound( BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res1 " + ObjexxFCL::string_of( res1 ) ); + throw CREATE_EXCEPTION(EXCN_AssignmentNotFound, BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res1 " + ObjexxFCL::string_of( res1 ) ); } auto res2_entry( residues_[ res1 ].find( res2 ) ); if ( res2_entry == residues_[ res1 ].end() ) { - throw EXCN_AssignmentNotFound( BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res2 " + ObjexxFCL::string_of( res2 ) ); + throw CREATE_EXCEPTION(EXCN_AssignmentNotFound, BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res2 " + ObjexxFCL::string_of( res2 ) ); } return res2_entry->second; } @@ -136,11 +136,11 @@ PeakAssignmentResidueMap::PeakAssignments const& PeakAssignmentResidueMap::assig PeakAssignmentResidueMap::PeakAssignments& PeakAssignmentResidueMap::assignments( core::Size res1, core::Size res2 ) { basic::ProfileThis doit( basic::NOESY_ASSIGN_NETWORK_FIND_RAW_ASSIGN ); if ( residues_.size() < res1 || res1 <= 0 ) { - throw EXCN_AssignmentNotFound( BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res1 " + ObjexxFCL::string_of( res1 ) ); + throw CREATE_EXCEPTION(EXCN_AssignmentNotFound, BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res1 " + ObjexxFCL::string_of( res1 ) ); } auto res2_entry( residues_[ res1 ].find( res2 ) ); if ( res2_entry == residues_[ res1 ].end() ) { - throw EXCN_AssignmentNotFound( BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res2 " + ObjexxFCL::string_of( res2 ) ); + throw CREATE_EXCEPTION(EXCN_AssignmentNotFound, BOGUS_ASSIGNMENT, "PeakAssignment not found -- no entry with res2 " + ObjexxFCL::string_of( res2 ) ); } return res2_entry->second; } @@ -322,7 +322,7 @@ void PeakAssignmentResidueMap::fill_covalent_gammas( Size alpha_resid, std::map< // if ( new_resid == alpha_resid || new_resid == alpha_resid - 1 || new_resid == alpha_resid + 1 ) { // collector[ ind ] = false; // } - // } catch ( EXCN_UnknownResonance& ) { + // } catch (EXCN_UnknownResonance& ) { // continue; // } // } @@ -476,7 +476,7 @@ void PeakAssignmentResidueMap::network_analysis2() { // ResonanceList const& res ResonanceList::Resonances const& retrieved( first_assignment.resonances().resonances_at_residue( neighbor_residue ) ); // tr.Debug << resi << " " << resj << " resonance k @ " << *sit << std::endl; copy( retrieved.begin(), retrieved.end(), back_inserter( resK ) ); - } catch ( EXCN_UnknownResonance const & excn ) { + } catch (EXCN_UnknownResonance const & excn ) { } } // for ( ResonanceList::Resonances::const_iterator itK = resK.begin(); itK != resK.end(); ++itK ) { diff --git a/source/src/protocols/noesy_assign/PeakFileFormat.cc b/source/src/protocols/noesy_assign/PeakFileFormat.cc index 6cd6ce677b..7189406362 100644 --- a/source/src/protocols/noesy_assign/PeakFileFormat.cc +++ b/source/src/protocols/noesy_assign/PeakFileFormat.cc @@ -257,7 +257,7 @@ void PeakFileFormat::read_header( std::istream& is, std::string& next_line ) { std::string name; line_stream >> index; if ( !line_stream.good() ) { - throw utility::excn::EXCN_BadInput(" problem reading peak file, column index and atom-name expected after key-word #INAME "); + throw CREATE_EXCEPTION(utility::excn::BadInput, " problem reading peak file, column index and atom-name expected after key-word #INAME "); } line_stream >> name; if ( name == "HN" || name =="HC" || name =="H1" || name =="1H" ) HN_column_labels = true; @@ -328,7 +328,7 @@ void PeakFileFormat::read_header( std::istream& is, std::string& next_line ) { option[ noesy_weights::tolerances ][ TOL_H_DIRECT ] ); if ( dim < 2 ) { - throw utility::excn::EXCN_BadInput(" problem reading peak file, no or incomplete header "); + throw CREATE_EXCEPTION(utility::excn::BadInput, " problem reading peak file, no or incomplete header "); } // info2_ = new CrossPeakInfo( "N", 0.03, 0.5 ); @@ -339,7 +339,7 @@ void PeakFileFormat::read_header( std::istream& is, std::string& next_line ) { } for ( Size i = 1; i<=dim; i++ ) { if ( HN_column_labels && cyana_string != "none" ) { - if ( simnoesy ) throw utility::excn::EXCN_BadInput("cannot use HN for protons when SimNOESY ( i.e., NC for label atom name"); + if ( simnoesy ) throw CREATE_EXCEPTION(utility::excn::BadInput, "cannot use HN for protons when SimNOESY ( i.e., NC for label atom name"); atom_names[ i ]=cyana_string[ i-1 ]; } if ( atom_names[ i ] == "h" @@ -388,7 +388,7 @@ void PeakFileFormat::read_header( std::istream& is, std::string& next_line ) { } if ( !info2_ || !info1_ ) { - throw utility::excn::EXCN_BadInput(" problem reading peak file, no or errorenous header "); + throw CREATE_EXCEPTION(utility::excn::BadInput, " problem reading peak file, no or errorenous header "); } tr.Debug << " cross-peak infos: " << *info1_ << " and " << *info2_ << std::endl; @@ -467,7 +467,7 @@ void PeakFileFormat::read_resonances( std::istream& is, CrossPeak &cp ) const { bool is_label( col2islabel_[ icol ] ); is >> val; if ( !is.good() ) { - throw EXCN_FileFormat( "expected resonance value" ); + throw CREATE_EXCEPTION(EXCN_FileFormat, "expected resonance value" ); } if ( !is_label ) cp.proton( iproton ).set_freq( val ); else { @@ -525,7 +525,7 @@ void PeakFileFormat::read_assignments( std::istream& is, std::istream& rest_is, if ( first ) return; std::ostringstream errstr; errstr << cp; - throw EXCN_FileFormat( "expected assignment value for " + errstr.str() ); + throw CREATE_EXCEPTION(EXCN_FileFormat, "expected assignment value for " + errstr.str() ); } } rest = false; @@ -566,7 +566,7 @@ void PeakFileFormat::read_assignments( std::istream& is, std::istream& rest_is, std::ostringstream errstr; errstr << cp; delete [] vals; - throw EXCN_FileFormat( "expected assignment value for " + errstr.str() ); + throw CREATE_EXCEPTION(EXCN_FileFormat, "expected assignment value for " + errstr.str() ); } else { if ( first ) tr.Trace << " read assignments: "; } @@ -607,13 +607,13 @@ void PeakFileFormat::read_assignments( std::istream& is, std::istream& rest_is, } else weight += 1.0; if ( !line_stream.good() ) break; // if ( tag != "#QU" ) { - // throw EXCN_FileFormat( "expected #QU " ); + // throw CREATE_EXCEPTION(EXCN_FileFormat, "expected #QU " ); // } // core::Real qu, sup; // line_stream >> qu; // line_stream >> tag; // if ( line_stream.good() && tag != "#SUP" ) { - // throw EXCN_FileFormat( "expected #SUP" ); + // throw CREATE_EXCEPTION(EXCN_FileFormat, "expected #SUP" ); // } // line_stream >> sup; } diff --git a/source/src/protocols/noesy_assign/ResonanceList.cc b/source/src/protocols/noesy_assign/ResonanceList.cc index a0a5ebb27b..662edb0bce 100644 --- a/source/src/protocols/noesy_assign/ResonanceList.cc +++ b/source/src/protocols/noesy_assign/ResonanceList.cc @@ -171,7 +171,7 @@ void ResonanceList::read_from_stream( std::istream& is ) { } else if ( aa_name.size() == 3 ) { aa = aa_from_name( aa_name ); } else { - throw utility::excn::EXCN_BadInput( "did not recognize aminoacid: " + aa_name); + throw CREATE_EXCEPTION(utility::excn::BadInput, "did not recognize aminoacid: " + aa_name); } if ( sequence_.size() < resn ) { while ( sequence_.size() < resn-1 ) sequence_.push_back('X'); @@ -200,7 +200,7 @@ void ResonanceList::read_from_stream( std::istream& is ) { if ( line_stream ) { if ( fl_tag!="None" ) { if ( fl_tag[0]!='#' && fl_tag[0]!='[' ) { - throw utility::excn::EXCN_BadInput( "did not recognize item " +fl_tag + " in line " + line ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "did not recognize item " +fl_tag + " in line " + line ); } else { //that means fl_tag[0]=='[' || fl_tag[0]=='#' std::stringstream float_info; fl_tag[0]=' '; @@ -219,7 +219,7 @@ void ResonanceList::read_from_stream( std::istream& is ) { float_info << fl_tag; } if ( !closed ) { - throw utility::excn::EXCN_BadInput( "expect closing ] in line " + line ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "expect closing ] in line " + line ); } char cstr[100]; while ( float_info.getline(cstr, 50, ',' ) ) { @@ -299,7 +299,7 @@ void ResonanceList::read_from_stream( std::istream& is ) { if ( sequence_[ i ] == 'X' ) { sequence_[ i ] = sequence_from_header[ i ]; } else if ( sequence_[ i ] != sequence_from_header[ i ] ) { - throw utility::excn::EXCN_BadInput( std::string("sequence information in header is not consistent with sequence letter ")+ + throw CREATE_EXCEPTION(utility::excn::BadInput, std::string("sequence information in header is not consistent with sequence letter ")+ "in resonance lines at residue "+ObjexxFCL::string_of( i+1 ) ); } } @@ -389,7 +389,7 @@ Resonance const& ResonanceList::operator[] ( core::id::NamedAtomID const& atom ) if ( it->atom() == atom ) return *it; } } - throw EXCN_UnknownResonance( atom, "can't find atom "); + throw CREATE_EXCEPTION(EXCN_UnknownResonance, atom, "can't find atom "); return *(map_.begin()->second); //to make compiler happy } @@ -397,7 +397,7 @@ Resonance const& ResonanceList::operator[] ( core::id::NamedAtomID const& atom ) Resonance const& ResonanceList::operator[] ( core::Size key ) const { auto iter = map_.find( key ); if ( iter == map_.end() ) { - throw EXCN_UnknownResonance( id::NamedAtomID::BOGUS_NAMED_ATOM_ID(), "can't find resonance " + ObjexxFCL::string_of( key ) ); + throw CREATE_EXCEPTION(EXCN_UnknownResonance, id::NamedAtomID::BOGUS_NAMED_ATOM_ID(), "can't find resonance " + ObjexxFCL::string_of( key ) ); } return *(iter->second); } @@ -417,7 +417,7 @@ ResonanceList::Resonances const& ResonanceList::resonances_at_residue( core::Siz if ( it_res != by_resid_.end() ) { return it_res->second; } - throw EXCN_UnknownResonance( id::NamedAtomID::BOGUS_NAMED_ATOM_ID(), "can't find resonance with residue " + ObjexxFCL::string_of( resid ) ); + throw CREATE_EXCEPTION(EXCN_UnknownResonance, id::NamedAtomID::BOGUS_NAMED_ATOM_ID(), "can't find resonance with residue " + ObjexxFCL::string_of( resid ) ); return by_resid_.begin()->second; //to make compile happy } @@ -483,7 +483,7 @@ std::string label_atom_name( std::string const& proton_name, core::chemical::AA if ( tr.Trace.visible() ) { tr.Trace << "no label for proton_name " + proton_name + " on " + name_from_aa( aa ) << std::endl; } - throw EXCN_UnknownAtomname(""); + throw CREATE_EXCEPTION(EXCN_UnknownAtomname, ""); return "no_atom"; } @@ -505,14 +505,14 @@ void ResonanceList::update_bond_connections() { ResonanceOP label_reso_ptr( map_[ label_reso.label() ] ); proton->add_connected_resonance( ResonanceAP( label_reso_ptr ) ); label_reso_ptr->add_connected_resonance( proton ); - } catch ( EXCN_UnknownResonance& exception ) { + } catch (EXCN_UnknownResonance& exception ) { if ( !unknown_resonances_.count( exception.atom() ) ) { unknown_resonances_.insert( exception.atom() ); exception.show( tr.Warning ); tr.Warning << " as label for atom " << it->second->atom().atom() << " " << aa_from_resid( resid ) << std::endl; } continue; - } catch ( EXCN_UnknownAtomname& exception ) { //this happens if we try to assign a proton that can't have a label: i.e., a H in a HCH spectrum + } catch (EXCN_UnknownAtomname& exception ) { //this happens if we try to assign a proton that can't have a label: i.e., a H in a HCH spectrum utility_exit_with_message( "cannot find label atom for resid: " + it->second->atom().atom() + " " + ObjexxFCL::string_of( resid ) ); } } diff --git a/source/src/protocols/pack_daemon/DynamicAggregateFunction.cc b/source/src/protocols/pack_daemon/DynamicAggregateFunction.cc index 36a9f6006d..afe12e3429 100644 --- a/source/src/protocols/pack_daemon/DynamicAggregateFunction.cc +++ b/source/src/protocols/pack_daemon/DynamicAggregateFunction.cc @@ -590,11 +590,11 @@ DynamicAggregateFunction::~DynamicAggregateFunction() = default; void DynamicAggregateFunction::set_num_entity_elements( Size setting ) { if ( setting == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "DynamicAggregateFunction::set_num_entity_elements may not be" + throw CREATE_EXCEPTION(utility::excn::Exception, "DynamicAggregateFunction::set_num_entity_elements may not be" "passed a number of entity elements == 0" ); } if ( num_entity_elements_ != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "DynamicAggregateFunction::set_num_entity_elements may only" + throw CREATE_EXCEPTION(utility::excn::Exception, "DynamicAggregateFunction::set_num_entity_elements may only" "be called once" ); } @@ -740,7 +740,7 @@ DynamicAggregateFunction::variable_expression( ArithmeticASTValue const & var_no return entity_funcs_iter->second.second; } - throw utility::excn::EXCN_Msg_Exception( "Unexpected variable expression encountered while " + throw CREATE_EXCEPTION(utility::excn::Exception, "Unexpected variable expression encountered while " "forming an expression from an ExpressionAST (after scanning/parsing completed!): " + var_node.variable_name() ); return nullptr; @@ -775,66 +775,66 @@ DynamicAggregateFunction::function_expression( return ExpressionCOP( ExpressionOP( new VMinBy( vector_expressions[1], vector_expressions[2] ) ) ); } else if ( fname == "exp" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "exp expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "exp expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new ExpExpression( args[ 1 ] ) ) ); } else if ( fname == "ln" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "ln expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ln expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LnExpression( args[ 1 ] ) ) ); } else if ( fname == "pow" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "pow expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "pow expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new PowExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "ite" ) { if ( args.size() != 3 ) { - throw utility::excn::EXCN_Msg_Exception( "ite expression construction requested with nargs != 3. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ite expression construction requested with nargs != 3. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new ITEExpression( args[ 1 ], args[ 2 ], args[ 3 ] ) ) ); } else if ( fname == "abs" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "abs expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "abs expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new AbsoluteValueExpression( args[ 1 ] ) ) ); } else if ( fname == "gt" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "gt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "gt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new GT_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "lt" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "lt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "lt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LT_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "gte" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "gte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "gte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new GTE_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "lte" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "lte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "lte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LTE_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "and" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "and expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "and expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new AndExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "or" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "or expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "or expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new OrExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "not" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "not expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "not expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new NotExpression( args[ 1 ] ) ) ); } - throw utility::excn::EXCN_Msg_Exception( "Unrecognized function requested of DynamicAggregateFunction: " + fname ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unrecognized function requested of DynamicAggregateFunction: " + fname ); return nullptr; } @@ -929,12 +929,12 @@ void DynamicAggregateFunction::read_all_variables_from_input_file( std::istream } else if ( command == "FITNESS" ) { process_FITNESS_line( line, count_line, input_line, fitness_expression_ast ); } else { - throw utility::excn::EXCN_Msg_Exception( "Unable to recognize command '" + command + "' while reading DynamicAggregateFunction file" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to recognize command '" + command + "' while reading DynamicAggregateFunction file" ); } } if ( ! fitness_expression_ast ) { - throw utility::excn::EXCN_Msg_Exception( "Unable to find FITNESS command in the file describing the DynamicAggretateFunction.\n" + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find FITNESS command in the file describing the DynamicAggretateFunction.\n" "The FITNESS command must exist " ); } @@ -1033,16 +1033,16 @@ DynamicAggregateFunction::process_STATE_line( { std::string state_name, structure_file, correspondence_file, secondary_resfile; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state name in the DynamicAggregateFunction" " input file after reading STATE on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> state_name; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state variable name in the DynamicAggregateFunction" " input file after reading STATE name on line " + utility::to_string( line_number ) + "\n" + line ); } if ( state_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state variable name in the DynamicAggregateFunction" " input file after reading STATE on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1050,25 +1050,25 @@ DynamicAggregateFunction::process_STATE_line( input_line >> structure_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read pdb file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read pdb file name in the DynamicAggregateFunction" " input file after reading STATE pdb file on line " + utility::to_string( line_number ) + "\n" + line ); } if ( structure_file.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read pdb file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read pdb file name in the DynamicAggregateFunction" " input file after reading STATE name on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> correspondence_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read secondary resfile name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read secondary resfile name in the DynamicAggregateFunction" " input file after reading STATE correspondence file on line " + utility::to_string( line_number ) + "\n" + line ); } if ( correspondence_file.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read correspondence file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read correspondence file name in the DynamicAggregateFunction" " input file after reading STATE pdb file on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> secondary_resfile; if ( secondary_resfile.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read secondary resfile name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read secondary resfile name in the DynamicAggregateFunction" " input file after reading STATE correspondence file on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1108,16 +1108,16 @@ DynamicAggregateFunction::process_STATE_VECTOR_line( { std::string state_vector_variable_name, state_vector_filename; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state-vector variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state-vector variable name in the DynamicAggregateFunction" " input file after reading STATE_VECTOR on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> state_vector_variable_name; if ( state_vector_variable_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state-vector variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state-vector variable name in the DynamicAggregateFunction" " input file after reading STATE_VECTOR on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state-vector file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state-vector file name in the DynamicAggregateFunction" " input file after reading STATE_VECTOR variable name on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1125,7 +1125,7 @@ DynamicAggregateFunction::process_STATE_VECTOR_line( input_line >> state_vector_filename; if ( state_vector_filename.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state-vector file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state-vector file name in the DynamicAggregateFunction" " input file after reading STATE_VECTOR variable name on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1147,18 +1147,18 @@ DynamicAggregateFunction::process_POSE_ENERGY_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading POSE_ENERGY on line " + utility::to_string( line_number ) + "\n" + line ); } // 1. read the new variable name that's being declared on this line std::string varname; input_line >> varname; if ( varname.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading POSE_ENERGY on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a PDB name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a PDB name in the DynamicAggregateFunction" " input file after reading the variable name '" + varname + "' on line " + utility::to_string( line_number ) + "\n" + line ); } verify_variable_name_or_throw( varname, "POSE_ENERGY", line, line_number ); @@ -1171,8 +1171,8 @@ DynamicAggregateFunction::process_POSE_ENERGY_line( std::string pdb_string; try { pdb_string = file_contents_->get_file_contents( pdb_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to open pdb file named '" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to open pdb file named '" + pdb_name + "' given in the POSE_ENERGY command on line " + utility::to_string( line_number) + "of the DynamicAggregateFunction fitness file" ); } @@ -1181,7 +1181,7 @@ DynamicAggregateFunction::process_POSE_ENERGY_line( core::import_pose::pose_from_pdbstring( pose, pdb_string, pdb_name ); if ( pose.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Input pose given in file '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Input pose given in file '" + pdb_name + "' has zero residues. Encountered while processing the '" + varname + "' variable in the DynamicAggregateFunction" " input file on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1203,18 +1203,18 @@ DynamicAggregateFunction::process_POSE_ENERGY_VECTOR_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading POSE_ENERGY_VECTOR on line " + utility::to_string( line_number ) + "\n" + line ); } // 1. read the new variable name that's being declared on this line std::string varname; input_line >> varname; if ( varname.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading POSE_ENERGY_VECTOR on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read the name of a list file in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read the name of a list file in the DynamicAggregateFunction" " input file after reading the variable name '" + varname + "' on line " + utility::to_string( line_number ) + "\n" + line ); } verify_variable_name_or_throw( varname, "POSE_ENERGY_VECTOR", line, line_number ); @@ -1226,8 +1226,8 @@ DynamicAggregateFunction::process_POSE_ENERGY_VECTOR_line( try { std::string fc = file_contents_->get_file_contents( fname ); pdbvec_file.str( fc ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to open pdb list file named '" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to open pdb list file named '" + fname + "' given in the POSE_ENERGY_VECTOR command on line " + utility::to_string( line_number) + "of the DynamicAggregateFunction fitness file" ); } @@ -1259,8 +1259,8 @@ DynamicAggregateFunction::process_POSE_ENERGY_VECTOR_line( std::string pdb_string; try { pdb_string = file_contents_->get_file_contents( *iter ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to open pdb file named '" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to open pdb file named '" + *iter + "' given in the POSE_ENERGY_VECTOR command on line " + utility::to_string( line_number) + "of the DynamicAggregateFunction fitness file" ); } @@ -1268,7 +1268,7 @@ DynamicAggregateFunction::process_POSE_ENERGY_VECTOR_line( core::import_pose::pose_from_pdbstring( pose, pdb_string, *iter ); if ( pose.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Input pose given in file '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Input pose given in file '" + *iter + "' has zero residues. Encountered while processing the '" + varname + "' variable in the DynamicAggregateFunction" " input file on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1295,18 +1295,18 @@ DynamicAggregateFunction::process_NPD_PROPERTY_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading NPD_PROPERTY on line " + utility::to_string( line_number ) + "\n" + line ); } // 1. read the new variable name that's being declared on this line std::string varname; input_line >> varname; if ( varname.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading NPD_PROPERTY on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an existing state- or state-vector " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an existing state- or state-vector " " variable name in the DynamicAggregateFunction" " input file after reading NPD_PROPERTY on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1316,7 +1316,7 @@ DynamicAggregateFunction::process_NPD_PROPERTY_line( std::string original_varname; input_line >> original_varname; if ( original_varname.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an existing state- or state-vector" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an existing state- or state-vector" " variable in the DynamicAggregateFunction" " input file after reading the new variable name on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1330,13 +1330,13 @@ DynamicAggregateFunction::process_NPD_PROPERTY_line( /// Error condition: the user has given a variable name that does not correspond to /// either a state or a state vector. if ( variable_names_dec_line_.find( original_varname ) != variable_names_dec_line_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read the name for the existing state or state vector" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read the name for the existing state or state vector" " in the DynamicAggregateFunction input file, but instead was given the name of a non-state variable, " + original_varname + " that had previously been declared on line " + utility::to_string( variable_names_dec_line_[ original_varname ] ) + ".\n Error while processing line " + utility::to_string( line_number ) + "\n" + line ); } else { - throw utility::excn::EXCN_Msg_Exception( "Read the name '" + original_varname + "' but " + throw CREATE_EXCEPTION(utility::excn::Exception, "Read the name '" + original_varname + "' but " " expected to read the variable name for the existing state- or state-vector" " variable in the DynamicAggregateFunction" " input file after reading the new variable name on line " + utility::to_string( line_number ) + "\n" + line ); @@ -1346,14 +1346,14 @@ DynamicAggregateFunction::process_NPD_PROPERTY_line( // 3. Read the NPD property that will be calculated std::string npd_property; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a non-pairwise decomposable property" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a non-pairwise decomposable property" " name after reading the existing state- or state-vector" " variable name in the DynamicAggregateFunction" " input file on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> npd_property; if ( npd_property.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a non-pairwise decomposable property" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a non-pairwise decomposable property" " name after reading the existing state- or state-vector" " variable name in the DynamicAggregateFunction" " input file on line " + utility::to_string( line_number ) + "\n" + line ); @@ -1379,24 +1379,24 @@ DynamicAggregateFunction::process_VECTOR_VARIABLE_line( { std::string vector_variable_name, equals_sign, scalar_variable_name; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read vector variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read vector variable name in the DynamicAggregateFunction" " input file after reading VECTOR_VARIABLE on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> vector_variable_name; if ( vector_variable_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read vector variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read vector variable name in the DynamicAggregateFunction" " input file after reading VECTOR_VARIABLE on line " + utility::to_string( line_number ) + "\n" + line ); } verify_variable_name_or_throw( vector_variable_name, "VECTOR_VARIABLE", line, line_number ); if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read equals sign in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read equals sign in the DynamicAggregateFunction" " input file after reading " + vector_variable_name + " varname in the VECTOR_VARIABLE command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> equals_sign; if ( equals_sign != "=" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read equals sign in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read equals sign in the DynamicAggregateFunction" " input file after reading " + vector_variable_name + " varname, but found '" + equals_sign + "' instead in the VECTOR_VARIABLE command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1406,12 +1406,12 @@ DynamicAggregateFunction::process_VECTOR_VARIABLE_line( if ( !input_line ) continue; if ( scalar_variable_names_dec_line_.find( scalar_variable_name ) == scalar_variable_names_dec_line_.end() ) { if ( vector_variable_names_dec_line_.find( scalar_variable_name ) != vector_variable_names_dec_line_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Variable '" + scalar_variable_name + "' is a vector variable and" + throw CREATE_EXCEPTION(utility::excn::Exception, "Variable '" + scalar_variable_name + "' is a vector variable and" " cannot be listed in the scalar-variable list in a VECTOR_VARIABLE command.\n" "Error processing VECTOR_VARIABLE command on line " + utility::to_string( line_number ) + "\n" + line ); } else { - throw utility::excn::EXCN_Msg_Exception( "Unknown variable '" + scalar_variable_name + "' requested" + throw CREATE_EXCEPTION(utility::excn::Exception, "Unknown variable '" + scalar_variable_name + "' requested" " in the VECTOR_VARIABLE command on line " + utility::to_string( line_number ) + "\n" + line ); } } else { @@ -1445,12 +1445,12 @@ DynamicAggregateFunction::process_SCALAR_EXPRESSION_line( { std::string vname, equals_sign;//, restofline; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read variable name in the DynamicAggregateFunction" " input file after reading SCALAR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> vname; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read equals sign in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read equals sign in the DynamicAggregateFunction" " input file after reading SCALAR_EXPRESSION variable name on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1458,12 +1458,12 @@ DynamicAggregateFunction::process_SCALAR_EXPRESSION_line( input_line >> equals_sign; if ( equals_sign != "=" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read equals sign in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read equals sign in the DynamicAggregateFunction" " input file after reading SCALAR_EXPRESSION variable name on line " + utility::to_string( line_number ) + "\n" + line + "\nbut encountered " + equals_sign + " instead." ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an expression in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an expression in the DynamicAggregateFunction" " input file after reading SCALAR_EXPRESSION equals sign on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1500,24 +1500,24 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( ArithmeticScanner local_scanner( *scanner_ ); if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read FOR in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read FOR in the DynamicAggregateFunction" " input file after reading VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> for_string; if ( for_string != "FOR" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read FOR in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read FOR in the DynamicAggregateFunction" " input file after reading VECTOR_EXPRESSION command, but read '" + for_string + "' on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read local variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read local variable name in the DynamicAggregateFunction" " input file after reading FOR on a VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } bool colon_found = false; while ( ! colon_found ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read local variable name in the DynamicAggregateFunction input file" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read local variable name in the DynamicAggregateFunction input file" " while processing multiple local variables on a VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1526,30 +1526,30 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( verify_variable_name_or_throw( local_var, "VECTOR_EXPRESSION", line, line_number ); if ( localvar_map.find( local_var ) != localvar_map.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Local variable, '" + local_var + "' in VECTOR_EXPRESSION command appears multiple times on line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Local variable, '" + local_var + "' in VECTOR_EXPRESSION command appears multiple times on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read 'IN' in the DynamicAggregateFunction input file" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read 'IN' in the DynamicAggregateFunction input file" " following the declaration of local variable '" + local_var + "' on a VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> in_string; if ( in_string != "IN" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read 'IN' in the DynamicAggregateFunction input file" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read 'IN' in the DynamicAggregateFunction input file" " following the declaration of local variable '" + local_var + "', but read '" + in_string + "' in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a vector-variable name in the DynamicAggregateFunction input file" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a vector-variable name in the DynamicAggregateFunction input file" " following '" + local_var + " IN' in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> existing_vector_varname; if ( vector_variable_names_dec_line_.find( existing_vector_varname ) == vector_variable_names_dec_line_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "The vector-variable name '" + existing_vector_varname + throw CREATE_EXCEPTION(utility::excn::Exception, "The vector-variable name '" + existing_vector_varname + "' given for local-variable '" + local_var + "' does not belong to an already-declared vector variable" + ". Error in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); @@ -1557,7 +1557,7 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( localvar_map[ local_var ] = existing_vector_varname; local_scanner.add_variable( local_var ); if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a colon or a comma following" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a colon or a comma following" " the declaration of local variable " + local_var + " in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1568,7 +1568,7 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( if ( comma_or_colon_string == ":" ) { break; } - throw utility::excn::EXCN_Msg_Exception( "Expected to read a colon or a comma following" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a colon or a comma following" " the declaration of local variable " + local_var + ", but found '" + comma_or_colon_string + "' instead." "\nError in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); @@ -1577,7 +1577,7 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( /// rest of the expression describing how to compute that vector variable. if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a variable name" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a variable name" " following the colon in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1586,20 +1586,20 @@ DynamicAggregateFunction::process_VECTOR_EXPRESSION_line( /// Now check, do we have a valid variable name? verify_variable_name_or_throw( vector_varname, "VECTOR_EXPRESSION", line, line_number ); if ( localvar_map.find( vector_varname ) != localvar_map.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Vector variable, '" + vector_varname + "' in VECTOR_EXPRESSION command appears first as a local variable\n.Line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Vector variable, '" + vector_varname + "' in VECTOR_EXPRESSION command appears first as a local variable\n.Line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading variable-vector name '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading variable-vector name '" + vector_varname + "' in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> equals_sign; if ( equals_sign != "=" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading variable-vector name '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading variable-vector name '" + vector_varname + "' in the VECTOR_EXPRESSION command on line " + utility::to_string( line_number ) + " but found '" + equals_sign + "' instead\n" + line ); } @@ -1625,16 +1625,16 @@ DynamicAggregateFunction::process_ENTITY_FUNCTION_line( { std::string entityfunc_name, entityfunc_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read state name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read state name in the DynamicAggregateFunction" " input file after reading ENTITY_FUNCTION command on line " + utility::to_string( line_number ) + "\n" + line ); } input_line >> entityfunc_name; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to EnitytFunc file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to EnitytFunc file name in the DynamicAggregateFunction" " input file after reading ENTITY_FUNCTION command on line " + utility::to_string( line_number ) + "\n" + line ); } if ( entityfunc_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read EntityFunc variable name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read EntityFunc variable name in the DynamicAggregateFunction" " input file after reading ENTITY_FUNCTION command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -1642,18 +1642,18 @@ DynamicAggregateFunction::process_ENTITY_FUNCTION_line( input_line >> entityfunc_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read correspondence file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read correspondence file name in the DynamicAggregateFunction" " input file after reading ENTITY_FUNCTION pdb file on line " + utility::to_string( line_number ) + "\n" + line ); } if ( entityfunc_file.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read pdb file name in the DynamicAggregateFunction" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read pdb file name in the DynamicAggregateFunction" " input file after reading ENTITY_FUNCTION variable named " + entityfunc_name + " on line " + utility::to_string( line_number ) + "\n" + line ); } /// Double check that the number of entity elements has been set if ( num_entity_elements_ == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "DynamicAggregateFunction::set_num_entity_elements must be called before EntityFuncs may be created" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "DynamicAggregateFunction::set_num_entity_elements must be called before EntityFuncs may be created" ); } @@ -1663,8 +1663,8 @@ DynamicAggregateFunction::process_ENTITY_FUNCTION_line( try { entfunc_contents = file_contents_->get_file_contents( entityfunc_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to open the entity function file file named '" + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to open the entity function file file named '" + entityfunc_file + "' given in the ENTITY_FUNCTION command on line " + utility::to_string( line_number) + "of the DynamicAggregateFunction fitness file" ); } @@ -1695,7 +1695,7 @@ DynamicAggregateFunction::process_FITNESS_line( ) { if ( fitness_expression_ast ) { - throw utility::excn::EXCN_Msg_Exception( "FITNESS command appears multiple" + throw CREATE_EXCEPTION(utility::excn::Exception, "FITNESS command appears multiple" " times in the DynamicAggregateFunction file.\nSecond occurrance found while reading\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -1751,8 +1751,8 @@ DynamicAggregateFunction::read_state_vector_file( try { std::string fc = file_contents_->get_file_contents( fname ); strucvec_file.str( fc ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to open state vector file named '" + fname + "' which was listed on line " + utility::to_string( variable_names_dec_line_[ vec_varname ] ) ); + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to open state vector file named '" + fname + "' which was listed on line " + utility::to_string( variable_names_dec_line_[ vec_varname ] ) ); } Size svline_num( 0 ); utility::vector1< StructureFileNames > state_triples; @@ -1767,17 +1767,17 @@ DynamicAggregateFunction::read_state_vector_file( std::string structure_file, correspondence_file, secondary_resfile; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read pdb file name as the first argument on line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read pdb file name as the first argument on line " + utility::to_string( svline_num ) + " of the state-vector file" + fname + "\n" + line ); } input_line >> structure_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read correspondence file name as the second argument on line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read correspondence file name as the second argument on line " + utility::to_string( svline_num ) + " of the state-vector file" + fname + "\n" + line ); } input_line >> correspondence_file; if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read secondary resfile name as the third argument on line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read secondary resfile name as the third argument on line " + utility::to_string( svline_num ) + " of the state-vector file" + fname + "\n" + line ); } input_line >> secondary_resfile; @@ -1792,7 +1792,7 @@ DynamicAggregateFunction::read_state_vector_file( ++n_vector_states; } if ( state_triples.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find any states in state-vector file " + fname ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find any states in state-vector file " + fname ); } state_vector_data_file_names_[ vec_varname ] = state_triples; @@ -1946,7 +1946,7 @@ DynamicAggregateFunction::create_scalar_and_vector_expression_variable_expressio scalvar_iter != scalvar_iter_end; ++scalvar_iter ) { std::map< std::string, VariableExpressionCOP >::const_iterator scvar = scalar_expression_map_.find( *scalvar_iter ); if ( scvar == scalar_expression_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Internal error: could not locate requested scalar variable '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Internal error: could not locate requested scalar variable '" + *scalvar_iter + "' when constructing the VECTOR_VARIABLE '" + vector_variable.first ); } variables.push_back( scvar->second ); @@ -1986,7 +1986,7 @@ DynamicAggregateFunction::turn_expression_ASTs_into_expressions( TR << "Creating scalar expression for " << iter->second << std::endl; auto ast_iter = scalar_expression_asts.find( iter->second ); if ( ast_iter == scalar_expression_asts.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Internal error. Unable to find scalar expression named '" + iter->second + "' in the scalar_expression_asts map" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Internal error. Unable to find scalar expression named '" + iter->second + "' in the scalar_expression_asts map" ); } TR << "Creating expression from AST:\n" << printer.ast_string( *(ast_iter->second) ) << std::endl; @@ -2000,7 +2000,7 @@ DynamicAggregateFunction::turn_expression_ASTs_into_expressions( auto ast_iter = vector_expression_asts.find( iter->second ); if ( ast_iter == vector_expression_asts.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Internal error. Unable to find vector expression named '" + iter->second + "' in the vector_expression_asts map" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Internal error. Unable to find vector expression named '" + iter->second + "' in the vector_expression_asts map" ); } std::pair< std::map< std::string, std::string >, ArithmeticASTExpressionOP > const & itvecexp_data = @@ -2012,7 +2012,7 @@ DynamicAggregateFunction::turn_expression_ASTs_into_expressions( for ( auto const & vec_iter : itvecexp_data.first ) { //std::cout << "VectorExpression map: " << vec_iter->first << " " << vec_iter->second << std::endl; if ( vector_expression_map_.find( vec_iter.second ) == vector_expression_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Variable " + vec_iter.second + " absent from the IterativeVectorExpression name map" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Variable " + vec_iter.second + " absent from the IterativeVectorExpression name map" ); } vector_varnames[ vec_iter.first ] = vector_expression_map_[ vec_iter.second ]; } @@ -2048,7 +2048,7 @@ DynamicAggregateFunction::verify_vector_arguments( ) const { if ( args.size() != expected_nargs ) { - throw utility::excn::EXCN_Msg_Exception( "vector function expression " + fname + " construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "vector function expression " + fname + " construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); } utility::vector1< VectorExpressionCOP > vector_expressions( expected_nargs ); for ( Size ii = 1; ii <= expected_nargs; ++ii ) { @@ -2056,10 +2056,10 @@ DynamicAggregateFunction::verify_vector_arguments( if ( ! vec_ptr ) { VariableExpressionCOP var_ptr = utility::pointer::dynamic_pointer_cast< VariableExpression const > ( args[ ii ] ); if ( var_ptr ) { - throw utility::excn::EXCN_Msg_Exception( "vector function expression " + fname + " can only be constructed from a vector expression.\n" + throw CREATE_EXCEPTION(utility::excn::Exception, "vector function expression " + fname + " can only be constructed from a vector expression.\n" "Variable " + var_ptr->name() + " is not a vector variable." ); } else { - throw utility::excn::EXCN_Msg_Exception( "vector function expression " + fname + " can only be constructed from a vector expression." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "vector function expression " + fname + " can only be constructed from a vector expression." ); } } vector_expressions[ ii ] = vec_ptr; @@ -2076,23 +2076,23 @@ DynamicAggregateFunction::verify_variable_name_or_throw( ) { if ( variable_names_dec_line_.find( vname ) != variable_names_dec_line_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Variable name " + vname + " appears multiple" + throw CREATE_EXCEPTION(utility::excn::Exception, "Variable name " + vname + " appears multiple" " times in the DynamicAggregateFunction file.\nSecond occurrance found while reading a " + command_name + " command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } if ( function_names_.find( vname ) != function_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Declaration of variable '" + vname + "' in " + command_name + " command conflicts with a function name. Line " + throw CREATE_EXCEPTION(utility::excn::Exception, "Declaration of variable '" + vname + "' in " + command_name + " command conflicts with a function name. Line " + utility::to_string( line_number ) + "\n" + line ); } if ( entity_funcs_.find( vname ) != entity_funcs_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Declaration of variable '" + vname + "' in " + command_name + " command conflicts" + throw CREATE_EXCEPTION(utility::excn::Exception, "Declaration of variable '" + vname + "' in " + command_name + " command conflicts" " with a previously declared EntityFunc variable.\nPrevious declaration was on line " + utility::to_string( entity_funcs_dec_line_[ vname ] ) + ".\nLine " + utility::to_string( line_number ) + "\n" + line ); } if ( illegal_variable_names_.find( vname ) != illegal_variable_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal name for variable, '" + vname + "' in the " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal name for variable, '" + vname + "' in the " + command_name + " command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -2206,7 +2206,7 @@ void DynamicAggregateFunctionDriver::initialize_from_input_file( { try { read_all_variables_from_input_file( input ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { send_error_message_to_remote_daemon_sets(); TR << "Initialization from input file failed with exception: " << e.msg() << std::endl; TR << "Remote daemon sets are spinning down" << std::endl; @@ -2284,7 +2284,7 @@ DynamicAggregateFunctionDriver::distribute_jobs_to_remote_daemons( try { assign_jobs_to_local_daemon_set( job_assignments[ 0 ], daemon_set ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { error_message += "Error from node 0\n"; error_message += e.msg(); TR << e.msg() << std::endl; @@ -2384,7 +2384,7 @@ bool DynamicAggregateFunctionDriver::verify_remote_daemon_set_initialization_suc if ( message == success_message ) return true; if ( message == error_message ) return false; - throw utility::excn::EXCN_Msg_Exception( "Expected either a success_message or an error_message " + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected either a success_message or an error_message " "after initializing remote daemon sets from process " + utility::to_string( proc_id ) + " but received " + utility::to_string( message ) ); return false; @@ -2415,7 +2415,7 @@ DynamicAggregateFunctionDriver::initialize_daemon_with_all_states( try { assign_jobs_to_local_daemon_set( joblist, daemon_set ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { TR << "Error from daemon-set initialization \n"; TR << e.msg(); TR << std::endl; @@ -2474,7 +2474,7 @@ void EntityFunc::set_num_entity_elements( Size num_ees ) void EntityFunc::initialize_from_input_file( std::istream & input ) { if ( num_entity_elements_ == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "EntityFunc::initialize_from_input_file cannot be called without EntityFunc::set_num_entity_elements having first been called." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "EntityFunc::initialize_from_input_file cannot be called without EntityFunc::set_num_entity_elements having first been called." ); } initialize_scanner_and_function_names(); @@ -2501,12 +2501,12 @@ void EntityFunc::initialize_from_input_file( std::istream & input ) } else if ( command == "SCORE" ) { process_SCORE_line( line, count_line, input_line, score_expression_ast ); } else { - throw utility::excn::EXCN_Msg_Exception( "Unable to recognize command '" + command + "' while reading EntityFunc file" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to recognize command '" + command + "' while reading EntityFunc file" ); } } if ( ! score_expression_ast ) { - throw utility::excn::EXCN_Msg_Exception( "SCORE command was not found in EntityFunc file." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SCORE command was not found in EntityFunc file." ); } turn_expression_ASTs_into_expressions( expression_asts, score_expression_ast ); @@ -2540,7 +2540,7 @@ EntityFunc::variable_expression( ArithmeticASTValue const & var_node ) const return var_iter->second; } - throw utility::excn::EXCN_Msg_Exception( "Unable to find variable with name " + var_node.variable_name() + " in" + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find variable with name " + var_node.variable_name() + " in" " EntityFunc while trying to build expression trees for the expressions already tokenized and parsed.\n" "Cannot continue. Contact Andrew Leaver-Fay (aleaverfay@gmail.com)" ); return nullptr; @@ -2559,72 +2559,72 @@ EntityFunc::function_expression( return ExpressionCOP( ExpressionOP( new MinExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "exp" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "exp expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "exp expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new ExpExpression( args[ 1 ] ) ) ); } else if ( fname == "ln" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "ln expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ln expression construction requested with more than one argument: " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LnExpression( args[ 1 ] ) ) ); } else if ( fname == "pow" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "pow expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "pow expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new PowExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "ite" ) { if ( args.size() != 3 ) { - throw utility::excn::EXCN_Msg_Exception( "ite expression construction requested with nargs != 3. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "ite expression construction requested with nargs != 3. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new ITEExpression( args[ 1 ], args[ 2 ], args[ 3 ] ) ) ); } else if ( fname == "abs" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "abs expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "abs expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new AbsoluteValueExpression( args[ 1 ] ) ) ); } else if ( fname == "gt" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "gt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "gt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new GT_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "lt" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "lt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "lt expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LT_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "gte" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "gte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "gte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new GTE_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "lte" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "lte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "lte expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new LTE_Expression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "eq" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "eq expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "eq expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new EqualsExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "and" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "and expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "and expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new AndExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "or" ) { if ( args.size() != 2 ) { - throw utility::excn::EXCN_Msg_Exception( "or expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "or expression construction requested with nargs != 2. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new OrExpression( args[ 1 ], args[ 2 ] ) ) ); } else if ( fname == "not" ) { if ( args.size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( "not expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "not expression construction requested with nargs != 1. Nargs= " + utility::to_string( args.size() ) ); } return ExpressionCOP( ExpressionOP( new NotExpression( args[ 1 ] ) ) ); } - throw utility::excn::EXCN_Msg_Exception( "Unable to find function with name " + fname + " in" + throw CREATE_EXCEPTION(utility::excn::Exception, "Unable to find function with name " + fname + " in" " EntityFunc while trying to build expression trees for the expressions already tokenized and parsed.\n" "Cannot continue. Contact Andrew Leaver-Fay (aleaverfay@gmail.com)" ); return nullptr; @@ -2695,17 +2695,17 @@ EntityFunc::process_AA_SET_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read amino acid set name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read amino acid set name in the EntityFunc" " input file after reading AA_SET on line " + utility::to_string( line_number ) + "\n" + line ); } std::string aa_setname; input_line >> aa_setname; if ( aa_setname.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read amino acid set name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read amino acid set name in the EntityFunc" " input file after reading AA_SET on line " + utility::to_string( line_number ) + "\n" + line ); } if ( aa_sets_name_map_.find( aa_setname ) != aa_sets_name_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Amino-acid-set name '" + aa_setname + "' appears multiple" + throw CREATE_EXCEPTION(utility::excn::Exception, "Amino-acid-set name '" + aa_setname + "' appears multiple" " times in the EntityFunc file.\nFirst occurrance was found on line " + utility::to_string( aa_sets_dec_line_[ aa_setname ] ) + ". Second occurrance found while reading" @@ -2714,26 +2714,26 @@ EntityFunc::process_AA_SET_line( if ( subexpression_name_map_.find( aa_setname ) != subexpression_name_map_.end() ) { if ( subexpression_name_dec_line_[ aa_setname ] != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal amino-acid-set name '" + aa_setname + "' which was previously" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal amino-acid-set name '" + aa_setname + "' which was previously" " declared in the EntityFunc file as a sub-expression.\nFirst occurrance was found on line " + utility::to_string( subexpression_name_dec_line_[ aa_setname ] ) + ". Second occurrance found while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } else { - throw utility::excn::EXCN_Msg_Exception( "Illegal amino-acid-set name '" + aa_setname + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal amino-acid-set name '" + aa_setname + "' which is reserved" " as a name for an entity-element variable.\nError found while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } } if ( function_names_.find( aa_setname ) != function_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal amino-acid-set name '" + aa_setname + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal amino-acid-set name '" + aa_setname + "' which is reserved" " as a name for an funcion.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } if ( illegal_variable_names_.find( aa_setname ) != illegal_variable_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal amino-acid-set name '" + aa_setname + "' which is a reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal amino-acid-set name '" + aa_setname + "' which is a reserved" " word for this input file format.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2742,14 +2742,14 @@ EntityFunc::process_AA_SET_line( char equals_sign( ' ' ); while ( equals_sign == ' ' || equals_sign == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading amino-acid-set name'" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading amino-acid-set name'" + aa_setname + "' but found an end-of-line.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } input_line.get( equals_sign ); } if ( equals_sign != '=' ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading amino-acid-set name'" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading amino-acid-set name'" + aa_setname + "' but found '" + equals_sign + "'\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2758,14 +2758,14 @@ EntityFunc::process_AA_SET_line( char lcurly = ' '; while ( lcurly == ' ' || lcurly == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a left curly bracket ('{') after reading" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a left curly bracket ('{') after reading" " an equals sign, but found an end-of-line.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } input_line.get( lcurly ); } if ( lcurly != '{' ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a left curly bracket ('{') after reading" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a left curly bracket ('{') after reading" " an equals sign, but found '" + utility::to_string( lcurly ) + "'\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2776,7 +2776,7 @@ EntityFunc::process_AA_SET_line( while ( next_aa != '}' ) { while ( next_aa == ' ' || next_aa == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a right curly bracket ('}') or a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a right curly bracket ('}') or a 1-letter" " amino acid code, but found an end-of-line.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2788,7 +2788,7 @@ EntityFunc::process_AA_SET_line( } else { /// maybe later, if we want to include ncaa's then they're parsing will happen right here. /// but for now, no go. - throw utility::excn::EXCN_Msg_Exception( "Expected to read a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a 1-letter" " amino acid code or a right curly brace, but found '" + utility::to_string( next_aa ) + "'.\n" "Error encountered while reading AA_SET command\n" + line + "\n" "Line # " + utility::to_string( line_number ) ); @@ -2796,7 +2796,7 @@ EntityFunc::process_AA_SET_line( next_aa = ' '; while ( next_aa == ' ' || next_aa == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a right curly bracket ('}') or a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a right curly bracket ('}') or a 1-letter" " amino acid code, but found an end-of-line.\nError encountered while reading" " AA_SET command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2807,7 +2807,7 @@ EntityFunc::process_AA_SET_line( next_aa = ' '; continue; } - throw utility::excn::EXCN_Msg_Exception( "Expected to read comma" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read comma" " or a right curly brace, but found '" + utility::to_string( next_aa ) + "'.\n" "Error encountered while reading AA_SET command\n" + line + "\n" "Line # " + utility::to_string( line_number ) ); @@ -2828,17 +2828,17 @@ EntityFunc::process_SET_CONDITION_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a set-condition name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a set-condition name in the EntityFunc" " input file after reading SET_CONDITION on line " + utility::to_string( line_number ) + "\n" + line ); } std::string condition_name; input_line >> condition_name; if ( condition_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a set-condition name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a set-condition name in the EntityFunc" " input file after reading SET_CONDITION on line " + utility::to_string( line_number ) + "\n" + line ); } if ( aa_sets_name_map_.find( condition_name ) != aa_sets_name_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Set-condition name '" + condition_name + "' appears multiple" + throw CREATE_EXCEPTION(utility::excn::Exception, "Set-condition name '" + condition_name + "' appears multiple" " times in the EntityFunc file.\nFirst occurrance was found on line " + utility::to_string( aa_sets_dec_line_[ condition_name ] ) + ". Second occurrance found while reading" @@ -2847,26 +2847,26 @@ EntityFunc::process_SET_CONDITION_line( if ( subexpression_name_map_.find( condition_name ) != subexpression_name_map_.end() ) { if ( subexpression_name_dec_line_[ condition_name ] != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal set-condition name '" + condition_name + "' which was previously" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal set-condition name '" + condition_name + "' which was previously" " declared in the EntityFunc file as a sub-expression.\nFirst occurrance was found on line " + utility::to_string( subexpression_name_dec_line_[ condition_name ] ) + ". Second occurrance found while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } else { - throw utility::excn::EXCN_Msg_Exception( "Illegal set-condition name '" + condition_name + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal set-condition name '" + condition_name + "' which is reserved" " as a name for an entity-element variable.\nError found while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } } if ( function_names_.find( condition_name ) != function_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal set-condition name '" + condition_name + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal set-condition name '" + condition_name + "' which is reserved" " as a name for an funcion.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } if ( illegal_variable_names_.find( condition_name ) != illegal_variable_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal set-condition name '" + condition_name + "' which is a reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal set-condition name '" + condition_name + "' which is a reserved" " word for this input file format.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2875,28 +2875,28 @@ EntityFunc::process_SET_CONDITION_line( char equals_sign( ' ' ); while ( equals_sign == ' ' || equals_sign == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading the set-condition name'" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading the set-condition name'" + condition_name + "' but found an end-of-line.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } input_line >> equals_sign; } if ( equals_sign != '=' ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading amino-acid-set name'" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading amino-acid-set name'" + condition_name + "' but found '" + utility::to_string( equals_sign ) + "'\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } /// now read the name of the entity-element that we're going to be examining. if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read the entity-element name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read the entity-element name in the EntityFunc" " input file after reading the set condition name, \"" + condition_name + ",\" but found an end-of-line.\n" "Error encountered while reading SET_CONDITION command on line " + utility::to_string( line_number ) + "\n" + line ); } std::string eename; input_line >> eename; if ( subexpression_name_dec_line_.find( eename ) == subexpression_name_dec_line_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an entity-element name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an entity-element name in the EntityFunc" " input file after reading an equals sign, while processing the set-condition named \"" + condition_name + ",\" but" " found \"" + eename +"\" which is not a valid entity element name.\n" "There are " + utility::to_string( num_entity_elements_ ) + " defined for this EntityFunc.\n" @@ -2904,14 +2904,14 @@ EntityFunc::process_SET_CONDITION_line( "Error encountered while reading SET_CONDITION command on line " + utility::to_string( line_number ) + "\n" + line ); } if ( subexpression_name_dec_line_[ eename ] != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an entity-element name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an entity-element name in the EntityFunc" " input file after reading an equals sign, while processing the set-condition named \"" + condition_name + ",\" but" " found the named subexpression \"" + eename +"\" instead.\n" "Error encountered while reading SET_CONDITION command on line " + utility::to_string( line_number ) + "\n" + line ); } if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read the string \"in\" in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read the string \"in\" in the EntityFunc" " input file after reading the set condition name, \"" + condition_name + ",\" but found an end-of-line.\n" "Error encountered while reading SET_CONDITION command on line " + utility::to_string( line_number ) + "\n" + line ); } @@ -2920,7 +2920,7 @@ EntityFunc::process_SET_CONDITION_line( std::string in_string; input_line >> in_string; if ( in_string != "in" ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read the string \"in\" in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read the string \"in\" in the EntityFunc" " input file after reading the set condition name, \"" + condition_name + ",\" but found \"" + in_string + "\" instead.\n" "Error encountered while reading SET_CONDITION command on line " + utility::to_string( line_number ) + "\n" + line ); @@ -2929,7 +2929,7 @@ EntityFunc::process_SET_CONDITION_line( char next_char = ' '; while ( input_line.peek() == ' ' || input_line.peek() == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a left curly bracket ('}') or an" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a left curly bracket ('}') or an" " amino acid set name, but found an end-of-line.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2946,7 +2946,7 @@ EntityFunc::process_SET_CONDITION_line( while ( next_aa != '}' ) { while ( next_aa == ' ' || next_aa == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a right curly bracket ('}') or a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a right curly bracket ('}') or a 1-letter" " amino acid code, but found an end-of-line.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2958,7 +2958,7 @@ EntityFunc::process_SET_CONDITION_line( } else { /// maybe later, if we want to include ncaa's then they're parsing will happen right here. /// but for now, no go. - throw utility::excn::EXCN_Msg_Exception( "Expected to read a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a 1-letter" " amino acid code or a right curly brace, but found '" + utility::to_string( next_aa ) + "'.\n" "Error encountered while reading SET_CONDITION command\n" + line + "\n" "Line # " + utility::to_string( line_number ) ); @@ -2966,7 +2966,7 @@ EntityFunc::process_SET_CONDITION_line( next_aa = ' '; while ( next_aa == ' ' || next_aa == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a right curly bracket ('}') or a 1-letter" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a right curly bracket ('}') or a 1-letter" " amino acid code, but found an end-of-line.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -2978,7 +2978,7 @@ EntityFunc::process_SET_CONDITION_line( continue; } - throw utility::excn::EXCN_Msg_Exception( "Expected to read comma" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read comma" " or a right curly brace, but found '" + utility::to_string( next_aa ) + "'.\n" "Error encountered while reading SET_CONDITION command\n" + line + "\n" "Line # " + utility::to_string( line_number ) ); @@ -2988,7 +2988,7 @@ EntityFunc::process_SET_CONDITION_line( std::string aa_setname; input_line >> aa_setname; if ( aa_sets_name_map_.find( aa_setname ) == aa_sets_name_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Amino-acid-set name '" + aa_setname + + throw CREATE_EXCEPTION(utility::excn::Exception, "Amino-acid-set name '" + aa_setname + "' has not previously been declared.\nError encountered while reading" " SET_CONDITION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -3018,17 +3018,17 @@ EntityFunc::process_SUB_EXPRESSION_line( ) { if ( ! input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a sub-expression name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a sub-expression name in the EntityFunc" " input file after reading SUB_EXPRESSION on line " + utility::to_string( line_number ) + "\n" + line ); } std::string subexpression_name; input_line >> subexpression_name; if ( subexpression_name.size() == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read a sub-expression name in the EntityFunc" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read a sub-expression name in the EntityFunc" " input file after reading SUB_EXPRESSION on line " + utility::to_string( line_number ) + "\n" + line ); } if ( aa_sets_name_map_.find( subexpression_name ) != aa_sets_name_map_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Sub-expression name '" + subexpression_name + "' appears multiple" + throw CREATE_EXCEPTION(utility::excn::Exception, "Sub-expression name '" + subexpression_name + "' appears multiple" " times in the EntityFunc file.\nFirst occurrance was found on line " + utility::to_string( aa_sets_dec_line_[ subexpression_name ] ) + ". Second occurrance found while reading" @@ -3037,26 +3037,26 @@ EntityFunc::process_SUB_EXPRESSION_line( if ( subexpression_name_map_.find( subexpression_name ) != subexpression_name_map_.end() ) { if ( subexpression_name_dec_line_[ subexpression_name ] != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal sub-expression name '" + subexpression_name + "' which was previously" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal sub-expression name '" + subexpression_name + "' which was previously" " declared in the EntityFunc file as a sub-expression.\nFirst occurrance was found on line " + utility::to_string( subexpression_name_dec_line_[ subexpression_name ] ) + ". Second occurrance found while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } else { - throw utility::excn::EXCN_Msg_Exception( "Illegal sub-expression name '" + subexpression_name + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal sub-expression name '" + subexpression_name + "' which is reserved" " as a name for an entity-element variable.\nError found while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } } if ( function_names_.find( subexpression_name ) != function_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal sub-expression name '" + subexpression_name + "' which is reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal sub-expression name '" + subexpression_name + "' which is reserved" " as a name for an funcion.\nError encountered while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } if ( illegal_variable_names_.find( subexpression_name ) != illegal_variable_names_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Illegal sub-expression name '" + subexpression_name + "' which is a reserved" + throw CREATE_EXCEPTION(utility::excn::Exception, "Illegal sub-expression name '" + subexpression_name + "' which is a reserved" " word for this input file format.\nError encountered while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -3065,14 +3065,14 @@ EntityFunc::process_SUB_EXPRESSION_line( char equals_sign( ' ' ); while ( equals_sign == ' ' || equals_sign == '\t' ) { if ( !input_line ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading the sub-expression name '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading the sub-expression name '" + subexpression_name + "' but found an end-of-line.\nError encountered while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } input_line >> equals_sign; } if ( equals_sign != '=' ) { - throw utility::excn::EXCN_Msg_Exception( "Expected to read an equals sign after reading the sub-expression name '" + throw CREATE_EXCEPTION(utility::excn::Exception, "Expected to read an equals sign after reading the sub-expression name '" + subexpression_name + "' but found '" + utility::to_string( equals_sign ) + "'\nError encountered while reading" " SUB_EXPRESSION command\n" + line + "\nLine # " + utility::to_string( line_number ) ); } @@ -3106,7 +3106,7 @@ EntityFunc::process_SCORE_line( ) { if ( score_expression_ast ) { - throw utility::excn::EXCN_Msg_Exception( "Encountered a second SCORE line" + throw CREATE_EXCEPTION(utility::excn::Exception, "Encountered a second SCORE line" "while processing the EntityFunc file\n" + line + "\nLine # " + utility::to_string( line_number ) ); } diff --git a/source/src/protocols/pack_daemon/EntityCorrespondence.cc b/source/src/protocols/pack_daemon/EntityCorrespondence.cc index f65707f798..bcd259ee6c 100644 --- a/source/src/protocols/pack_daemon/EntityCorrespondence.cc +++ b/source/src/protocols/pack_daemon/EntityCorrespondence.cc @@ -118,20 +118,20 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre std::istringstream linestream( line ); if ( ( linestream >> entity_id ).fail() ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to read entity id on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file:\n" + line ); } ++count_correspondences; if ( entity_id > num_entities() ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Entity ID read on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file exceeds the number of entities: " + utility::to_string( entity_id ) + " vs " + utility::to_string( num_entities() ) ); } if ( ( linestream >> PDBnum_string ).fail() ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to read PDB id for a residue on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file:\n" + line ); } @@ -146,7 +146,7 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre /// The last character is the insertion code. for ( Size ch = 0; ch < PDBnum_string.length()-1; ++ch ) { if ( ! isdigit( PDBnum_string[ ch ] ) && ( ch != 0 || PDBnum_string[ ch ] != '-' ) ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to read PDB residue id on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file:\n" + line +"\nCharacter" + utility::to_string( ch + 1 ) + " of '" + PDBnum_string + "' is not a digit"); @@ -157,7 +157,7 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre } else { // no insertion code for ( Size ch = 0; ch < PDBnum_string.length(); ++ch ) { if ( ! isdigit( PDBnum_string[ ch ] ) && ( ch != 0 || PDBnum_string[ ch ] != '-' ) ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to read PDB residue id on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file:\n" + line +"\nCharacter" + utility::to_string( ch + 1 ) + " of '" + PDBnum_string + "' is not a digit"); @@ -166,7 +166,7 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre PDBnum = atoi( PDBnum_string.c_str() ); } if ( (linestream >> chain ).fail() ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to read a chain id for a PDB residue on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file:\n" + line ); } @@ -175,7 +175,7 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre /* end resfile code */ if ( residue_index == 0 ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Residue ID read on line " + utility::to_string( line_count ) + " of the EntityCorrespondence file is not present in the pose: " + PDBnum_string + " ch: " + chain + " vs pose.size()= " + utility::to_string( num_residues() ) ); @@ -184,7 +184,7 @@ EntityCorrespondence::initialize_from_correspondence_file( std::istream & instre } /*if ( count_correspondences == 0 ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find any correspondences while reading from EntityCorrespondence file" ); }*/ } @@ -255,7 +255,7 @@ void EntityCorrespondence::bounds_check_entity( ) const { if ( entity_id > num_entities() ) { - throw utility::excn::EXCN_Msg_Exception( "EntityCorrespondence::" + funcname + " " + throw CREATE_EXCEPTION(utility::excn::Exception, "EntityCorrespondence::" + funcname + " " "attempted to access information for entity " + utility::to_string( entity_id ) + " (only " + utility::to_string( num_entities() ) + " entities exist)" ); } @@ -267,11 +267,11 @@ void EntityCorrespondence::bounds_check_residue( ) const { if ( ! pose_ ) { - throw utility::excn::EXCN_Msg_Exception( "EntityCorrespondence::" + funcname + " " + throw CREATE_EXCEPTION(utility::excn::Exception, "EntityCorrespondence::" + funcname + " " "invoked before pose_ pointer was set." ); } if ( resid > num_residues() ) { - throw utility::excn::EXCN_Msg_Exception( "EntityCorrespondence::" + funcname + " " + throw CREATE_EXCEPTION(utility::excn::Exception, "EntityCorrespondence::" + funcname + " " "attempted to access information for residue " + utility::to_string( resid ) + " (only " + utility::to_string( num_residues() ) + " residues exist)" ); } diff --git a/source/src/protocols/pack_daemon/PackDaemon.cc b/source/src/protocols/pack_daemon/PackDaemon.cc index 4e8183e401..80a76d350f 100644 --- a/source/src/protocols/pack_daemon/PackDaemon.cc +++ b/source/src/protocols/pack_daemon/PackDaemon.cc @@ -154,7 +154,7 @@ void PackDaemon::setup() ig_ = utility::pointer::dynamic_pointer_cast< core::pack::interaction_graph::FixedBBInteractionGraph > ( ig ); if ( ! ig_ ) { - throw utility::excn::EXCN_Msg_Exception( "Interaction graph returned by pack_rotamers_setup is not a" + throw CREATE_EXCEPTION(utility::excn::Exception, "Interaction graph returned by pack_rotamers_setup is not a" " fixed-backbone two-body interaction graph. Cannot continue" ); } @@ -308,7 +308,7 @@ PackDaemon::select_rotamer_subset( Entity const & entity ) const ++ii_rotamers_appended; } if ( ii_rotamers_appended == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find any rotamers for residue " + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find any rotamers for residue " + utility::to_string( ii_resid ) + "." ); } } else { @@ -328,7 +328,7 @@ PackDaemon::select_rotamer_subset( Entity const & entity ) const } if ( ii_rotamers_appended == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Failed to find any rotamers for residue " + throw CREATE_EXCEPTION(utility::excn::Exception, "Failed to find any rotamers for residue " + utility::to_string( ii_resid ) + " corresponding to entity " + utility::to_string( ii_entity_id ) + " when looking for " + utility::to_string( entity_aa ) + " rotamers." ); @@ -674,7 +674,7 @@ DaemonSet::add_pack_daemon( } if ( error_message != "" ) { //std::cerr << error_message << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } // Create the new daemon @@ -716,7 +716,7 @@ DaemonSet::add_npd_property_calculator_for_state( msg += " " + npditer->first + "\n"; } } - throw utility::excn::EXCN_Msg_Exception( msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg ); } Size which_daemon = 0; @@ -727,7 +727,7 @@ DaemonSet::add_npd_property_calculator_for_state( } } if ( which_daemon == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Internal error: could not locate requested daemon " + + throw CREATE_EXCEPTION(utility::excn::Exception, "Internal error: could not locate requested daemon " + utility::to_string( daemon_index ) + " while trying to add NPD Property Calculator for that daemon." ); } @@ -949,7 +949,7 @@ void DaemonSet::process_add_daemon_message() } } - } catch ( utility::excn::EXCN_Base & excn ) { + } catch ( utility::excn::Exception & excn ) { // send the error message to node 0 and exit gracefully. std::string message( excn.msg() ); utility::send_integer_to_node( 0, error_message ); diff --git a/source/src/protocols/pack_daemon/util.cc b/source/src/protocols/pack_daemon/util.cc index e045771864..8ded91f2f7 100644 --- a/source/src/protocols/pack_daemon/util.cc +++ b/source/src/protocols/pack_daemon/util.cc @@ -52,11 +52,11 @@ create_entity_resfile_contents( using namespace core::pack::task; if ( (resfile >> num_entities ).fail() ) { - throw utility::excn::EXCN_Msg_Exception( "Error reading the number of entities from entity resfile " + resfile_name ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Error reading the number of entities from entity resfile " + resfile_name ); } if ( num_entities == 0 ) { - throw utility::excn::EXCN_Msg_Exception( "The number of entities in the input entity resfile must be greater than zero; error in " + resfile_name ); + throw CREATE_EXCEPTION(utility::excn::Exception, "The number of entities in the input entity resfile must be greater than zero; error in " + resfile_name ); } Pose ala_pose; diff --git a/source/src/protocols/parser/ScoreFunctionLoader.cc b/source/src/protocols/parser/ScoreFunctionLoader.cc index ab6cb0e3c4..cb00246c6b 100644 --- a/source/src/protocols/parser/ScoreFunctionLoader.cc +++ b/source/src/protocols/parser/ScoreFunctionLoader.cc @@ -74,7 +74,7 @@ void ScoreFunctionLoader::load_data( if ( ! core::init::check_score_function_sanity( basic::options::option, scorefxn_weights ) ) { // The check should only really trigger on database files (explicit path will result in the heuristic not matching.) TR.Error << "Incompatible weights and options detected for " << scorefxn_weights << " - either fix your options, or rename the weights file." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Weights " + scorefxn_weights + " was requested with incompatible options."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Weights " + scorefxn_weights + " was requested with incompatible options."); } if ( scorefxn_tag->hasOption( "patch" ) ) { diff --git a/source/src/protocols/peptide_deriver/PeptideDeriverFilter.cc b/source/src/protocols/peptide_deriver/PeptideDeriverFilter.cc index d6ca0b69cb..547ef366de 100644 --- a/source/src/protocols/peptide_deriver/PeptideDeriverFilter.cc +++ b/source/src/protocols/peptide_deriver/PeptideDeriverFilter.cc @@ -285,7 +285,7 @@ PeptideDeriverFilter::parse_report_format_string( if ( value == "basic" ) { return PRF_BASIC; } - throw utility::excn::EXCN_KeyError( "PeptideDeriverFilter::parse_report_format_string(std::string const value): value must be either 'markdown' or 'basic'." ); + throw CREATE_EXCEPTION(utility::excn::KeyError, "PeptideDeriverFilter::parse_report_format_string(std::string const value): value must be either 'markdown' or 'basic'." ); } /// Verifies the pose has at least two chains. Minimizes the pose and detects @@ -298,7 +298,7 @@ PeptideDeriverFilter::prepare_pose( core::pose::Pose & pose) const { // check number of chains if ( pose.conformation().num_chains() < 2 ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Input PDB contains less than 2 chains."); } diff --git a/source/src/protocols/pmut_scan/AlterSpecDisruptionDriver.cc b/source/src/protocols/pmut_scan/AlterSpecDisruptionDriver.cc index 999ae61a5b..dc7252d240 100644 --- a/source/src/protocols/pmut_scan/AlterSpecDisruptionDriver.cc +++ b/source/src/protocols/pmut_scan/AlterSpecDisruptionDriver.cc @@ -76,7 +76,7 @@ core::Energy AlterSpecDisruptionDriver::score(core::pose::Pose & pose) { //It would be good if there were a way to test an invariant here - primarily that we have an interface of two chains! //runtime_assert(pose.num_chains() >= 2); if ( !(pose.conformation().num_chains() >= 2) ) { - throw utility::excn::EXCN_Msg_Exception("AlterSpecDisruptionDriver requires two chains to calculate an interface to disrupt."); + throw CREATE_EXCEPTION(utility::excn::Exception, "AlterSpecDisruptionDriver requires two chains to calculate an interface to disrupt."); } //no clear way to get IAM to use the same TaskFactory diff --git a/source/src/protocols/pose_reporters/BasicPosePropertyReporters.cc b/source/src/protocols/pose_reporters/BasicPosePropertyReporters.cc index 45ccec6909..dab9424691 100644 --- a/source/src/protocols/pose_reporters/BasicPosePropertyReporters.cc +++ b/source/src/protocols/pose_reporters/BasicPosePropertyReporters.cc @@ -202,7 +202,7 @@ void FilterReporter::parse_my_tag( ); if ( !filter_tag ) { - throw utility::excn::EXCN_RosettaScriptsOption("Cannot find filter named \"" + filter_name + "\""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot find filter named \"" + filter_name + "\""); } } else { @@ -221,7 +221,7 @@ void FilterReporter::parse_my_tag( if ( !filter_ ) { std::ostringstream s; s << "Cannot create filter from script tag: " << tag; - throw utility::excn::EXCN_RosettaScriptsOption(s.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, s.str()); } } @@ -328,7 +328,7 @@ void RMSDReporter::parse_my_tag( } else if ( mode == "all_atom" ) { mode_ = MODE_all_atom_rmsd; } else { - throw utility::excn::EXCN_RosettaScriptsOption("Unknown RMSD reporter mode: " + mode); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unknown RMSD reporter mode: " + mode); } } @@ -337,7 +337,7 @@ void RMSDReporter::parse_my_tag( } if ( mode_ == MODE_NONE ) { - throw utility::excn::EXCN_RosettaScriptsOption("RMSD reporter mode not specified. Choose form: CA, all_atom"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RMSD reporter mode not specified. Choose form: CA, all_atom"); } } diff --git a/source/src/protocols/pose_selectors/BasicPoseSelectors.cc b/source/src/protocols/pose_selectors/BasicPoseSelectors.cc index 5553da1d74..b142d57cea 100644 --- a/source/src/protocols/pose_selectors/BasicPoseSelectors.cc +++ b/source/src/protocols/pose_selectors/BasicPoseSelectors.cc @@ -268,7 +268,7 @@ void TopNByProperty::parse_my_tag( } else if ( order == "desc" || order == "descending" ) { order_ = -1; } else { - throw utility::excn::EXCN_RosettaScriptsOption("Unknown order: " + order); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Unknown order: " + order); } } @@ -402,7 +402,7 @@ void Filter::parse_my_tag( ); if ( !filter_tag ) { - throw utility::excn::EXCN_RosettaScriptsOption("Cannot find filter named \"" + filter_name + "\""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot find filter named \"" + filter_name + "\""); } } else { @@ -424,7 +424,7 @@ void Filter::parse_my_tag( if ( !filter_ ) { std::ostringstream s; s << "Cannot create filter from script tag: " << tag; - throw utility::excn::EXCN_RosettaScriptsOption(s.str()); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, s.str()); } if ( filters.find(filter_name) != filters.end() ) { diff --git a/source/src/protocols/protein_interface_design/filters/ClashWithTargetFilter.cc b/source/src/protocols/protein_interface_design/filters/ClashWithTargetFilter.cc index 353c9ba931..a023b9e737 100644 --- a/source/src/protocols/protein_interface_design/filters/ClashWithTargetFilter.cc +++ b/source/src/protocols/protein_interface_design/filters/ClashWithTargetFilter.cc @@ -120,7 +120,7 @@ core::Size ClashWithTargetFilter::compute( core::pose::Pose const & pose ) const //try{ // motif_grafting_moverOP->apply(pose_copy); // pose_copy.dump_pdb("temp.pdb"); - //} catch ( utility::excn::EXCN_Base& excn ) { + //} catch ( utility::excn::Exception& excn ) { // grafting=0; //} //return grafting; @@ -167,7 +167,7 @@ ClashWithTargetFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache: if ( tag->hasOption("context_pdbname") ) { context_pdbname_=tag->getOption("context_pdbname"); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify the context_pdbname, required"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify the context_pdbname, required"); } clash_score_cutoff_= tag->getOption( "clash_score_cutoff", 100 ); @@ -183,7 +183,7 @@ ClashWithTargetFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache: } else if ( !tag->hasOption("ref_start") && !tag->hasOption("ref_end") && !tag->hasOption("pose_start") && !tag->hasOption("pose_end") ) { TR<<"No residues for alignment is specified. Use TMalign" << std::endl; } else { - throw utility::excn::EXCN_RosettaScriptsOption("Must specify all ref_start/ref_end (start/end residue number in the align_to_pdbname for alignment) and pose_start/pose_end, start/end residue number in the current pose for alignment"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify all ref_start/ref_end (start/end residue number in the align_to_pdbname for alignment) and pose_start/pose_end, start/end residue number in the current pose for alignment"); } } diff --git a/source/src/protocols/protein_interface_design/filters/FilterScan.cc b/source/src/protocols/protein_interface_design/filters/FilterScan.cc index e48b50b6e1..a96a634a34 100644 --- a/source/src/protocols/protein_interface_design/filters/FilterScan.cc +++ b/source/src/protocols/protein_interface_design/filters/FilterScan.cc @@ -498,7 +498,7 @@ FilterScanFilter::parse_my_tag( utility::tag::TagCOP tag, #endif #ifndef USEMPI if ( triage_filter_it == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Triage filter "+triage_filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Triage filter "+triage_filter_name+" not found" ); } #endif @@ -513,7 +513,7 @@ FilterScanFilter::parse_my_tag( utility::tag::TagCOP tag, #endif #ifndef USEMPI if ( filter_it == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Filter "+filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter "+filter_name+" not found" ); } #endif @@ -527,7 +527,7 @@ FilterScanFilter::parse_my_tag( utility::tag::TagCOP tag, #endif #ifndef USEMPI if ( mover_it == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Relax mover "+relax_mover_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Relax mover "+relax_mover_name+" not found" ); } #endif diff --git a/source/src/protocols/protein_interface_design/filters/HbondsToAtomFilter.cc b/source/src/protocols/protein_interface_design/filters/HbondsToAtomFilter.cc index ab56de52fc..3c6d5d420f 100644 --- a/source/src/protocols/protein_interface_design/filters/HbondsToAtomFilter.cc +++ b/source/src/protocols/protein_interface_design/filters/HbondsToAtomFilter.cc @@ -118,7 +118,7 @@ HbondsToAtomFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::Da if ( tag->hasOption( "atomname" ) ) { atomdesg_ = tag->getOption< std::string >( "atomname" ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Need to set atomname"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Need to set atomname"); } TR<<"Hbonds to atom filter for resnum "<hasOption("task_operations" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Please specify a task operation for the residues that should be near the other chain."); } task_factory(parse_task_operations( tag, data )); diff --git a/source/src/protocols/protein_interface_design/movers/DockWithHotspotMover.cc b/source/src/protocols/protein_interface_design/movers/DockWithHotspotMover.cc index a4d3af467b..8608cf1571 100644 --- a/source/src/protocols/protein_interface_design/movers/DockWithHotspotMover.cc +++ b/source/src/protocols/protein_interface_design/movers/DockWithHotspotMover.cc @@ -188,7 +188,7 @@ void DockWithHotspotMover::parse_my_tag( utility::tag::TagCOP tag, for ( TagCOP const curr_tag : branch_tags ) { if ( curr_tag->getName() != "HotspotFiles" ) { TR.Error << "No 'HotspotFiles' specified." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } else { utility::vector1< TagCOP > const branch_tags2( curr_tag->getTags() ); for ( TagCOP const curr_tag2 : branch_tags2 ) { diff --git a/source/src/protocols/protein_interface_design/movers/InterfaceRecapitulationMover.cc b/source/src/protocols/protein_interface_design/movers/InterfaceRecapitulationMover.cc index 81275272d5..bc8d8c69a8 100644 --- a/source/src/protocols/protein_interface_design/movers/InterfaceRecapitulationMover.cc +++ b/source/src/protocols/protein_interface_design/movers/InterfaceRecapitulationMover.cc @@ -167,7 +167,7 @@ InterfaceRecapitulationMover::parse_my_tag( utility::tag::TagCOP tag, basic::dat if ( !design_mover_ ) { design_mover2_ = utility::pointer::dynamic_pointer_cast< protocols::simple_moves::PackRotamersMover > ( find_mover->second ); if ( !design_mover2_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "dynamic cast failed in tag in RecapitulateMover. Make sure that the mover is either PackRotamers or DesignRepackMover derived" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "dynamic cast failed in tag in RecapitulateMover. Make sure that the mover is either PackRotamers or DesignRepackMover derived" ); } } pssm_ = tag->getOption( "pssm", false ); diff --git a/source/src/protocols/protein_interface_design/movers/LoopRemodel.cc b/source/src/protocols/protein_interface_design/movers/LoopRemodel.cc index 5b96343cf8..d0ae40a0f3 100644 --- a/source/src/protocols/protein_interface_design/movers/LoopRemodel.cc +++ b/source/src/protocols/protein_interface_design/movers/LoopRemodel.cc @@ -480,7 +480,7 @@ LoopRemodel::parse_my_tag( TagCOP const tag, basic::datacache::DataMap & data, p } if ( !auto_loops && ( loop_start_.empty() || loop_end_.empty() ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("LoopRemodel must have either auto_loops set, or both loop_start and loop_end designations"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "LoopRemodel must have either auto_loops set, or both loop_start and loop_end designations"); } TR << "LoopRemodel mover: auto_loops="<getOption< std::string >( "pdb" ) ); bool const unbound( btag->getOption< bool >( "unbound", 0 ) ); @@ -585,7 +585,7 @@ void ProteinInterfaceMultiStateDesignMover::parse_my_tag( state_positive_.push_back( false ); at_least_one_negative_state = true; } else { - throw utility::excn::EXCN_RosettaScriptsOption( "Name "+btag->getName()+" is not recognized in ProteinInterfaceMultistateDesign::parse_my_tag." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Name "+btag->getName()+" is not recognized in ProteinInterfaceMultistateDesign::parse_my_tag." ); } compare_energy_to_ground_state_ = true; } diff --git a/source/src/protocols/qsar/RenderGridsToKinemage.cc b/source/src/protocols/qsar/RenderGridsToKinemage.cc index 75a74ec758..f8ac5198bf 100644 --- a/source/src/protocols/qsar/RenderGridsToKinemage.cc +++ b/source/src/protocols/qsar/RenderGridsToKinemage.cc @@ -150,7 +150,7 @@ void RenderGridsToKinemage::parse_my_tag(utility::tag::TagCOP tag, grid_set_prototype_ = scoring_grid::parse_grid_set_from_tag( tag, data ); if ( !tag->hasOption("grid_name") ) { - throw utility::excn::EXCN_RosettaScriptsOption("RenderGridsToKinemage requires the'grid name' option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RenderGridsToKinemage requires the'grid name' option"); } grid_name_ = tag->getOption("grid_name"); @@ -163,7 +163,7 @@ void RenderGridsToKinemage::parse_my_tag(utility::tag::TagCOP tag, color_ = numeric::comma_seperated_string_to_xyz(tag->getOption("color")); } else { - throw utility::excn::EXCN_RosettaScriptsOption("To use RenderGridsToKinemage you must specify color for a 1 color grid plot, " + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "To use RenderGridsToKinemage you must specify color for a 1 color grid plot, " "high_color and low_color for a two color gradient, or high_color, low_color and " "zero_color for a three color gradient centered at zero"); } @@ -180,7 +180,7 @@ void RenderGridsToKinemage::parse_my_tag(utility::tag::TagCOP tag, low_color_ = numeric::comma_seperated_string_to_xyz(tag->getOption("low_color")); high_color_ = numeric::comma_seperated_string_to_xyz(tag->getOption("high_color")); } else { - throw utility::excn::EXCN_RosettaScriptsOption("To use RenderGridsToKinemage you must specify color for a 1 color grid plot, " + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "To use RenderGridsToKinemage you must specify color for a 1 color grid plot, " "high_color and low_color for a two color gradient, or high_color, low_color and " "zero_color for a three color gradient centered at zero"); } diff --git a/source/src/protocols/qsar/qsarMover.cc b/source/src/protocols/qsar/qsarMover.cc index 5ee167c3a3..d790c06026 100644 --- a/source/src/protocols/qsar/qsarMover.cc +++ b/source/src/protocols/qsar/qsarMover.cc @@ -73,10 +73,10 @@ qsarMover::parse_my_tag( { grid_set_prototype_ = scoring_grid::parse_grid_set_from_tag( tag, datamap ); - if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'qsar' mover requires chain tag"); + if ( ! tag->hasOption("chain") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'qsar' mover requires chain tag"); chain_= tag->getOption("chain"); - if ( ! tag->hasOption("grids") ) throw utility::excn::EXCN_RosettaScriptsOption("'qsar' mover requires grids tag"); + if ( ! tag->hasOption("grids") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'qsar' mover requires grids tag"); std::string grids_string= tag->getOption("grids"); utility::vector1 grid_strings(utility::string_split(grids_string, ',')); diff --git a/source/src/protocols/qsar/scoring_grid/AtrGrid.cc b/source/src/protocols/qsar/scoring_grid/AtrGrid.cc index c83947092d..ca5fdb573a 100644 --- a/source/src/protocols/qsar/scoring_grid/AtrGrid.cc +++ b/source/src/protocols/qsar/scoring_grid/AtrGrid.cc @@ -78,7 +78,7 @@ AtrGrid::parse_my_tag(utility::tag::TagCOP tag){ if ( tag->hasOption("bb") || tag->hasOption("sc") || tag->hasOption("ligand") ) { // the user MUST provide all 3 if he/she is providing any of these 3 options if ( !(tag->hasOption("bb") && tag->hasOption("sc") && tag->hasOption("ligand") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AtrGrid' requires bb, sc, and ligand if any one of these are used"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AtrGrid' requires bb, sc, and ligand if any one of these are used"); } bb_= tag->getOption("bb"); sc_= tag->getOption("sc"); @@ -88,7 +88,7 @@ AtrGrid::parse_my_tag(utility::tag::TagCOP tag){ if ( tag->hasOption("inner_radius") || tag->hasOption("outer_radius") ) { // the user MUST provide both if he/she is providing either of these options if ( !(tag->hasOption("inner_radius") && tag->hasOption("outer_radius")) ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AtrGrid' requires outer_radius and inner_radius if either of these options are used"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AtrGrid' requires outer_radius and inner_radius if either of these options are used"); } inner_radius_= tag->getOption("inner_radius"); outer_radius_= tag->getOption("outer_radius"); diff --git a/source/src/protocols/qsar/scoring_grid/GridFactory.cc b/source/src/protocols/qsar/scoring_grid/GridFactory.cc index ce29a8c7c8..b39d999cf9 100644 --- a/source/src/protocols/qsar/scoring_grid/GridFactory.cc +++ b/source/src/protocols/qsar/scoring_grid/GridFactory.cc @@ -126,8 +126,8 @@ void GridFactory::provide_xml_schema( utility::tag::XMLSchemaDefinition & xsd ) scoring_grid_xml_schema_group_name(), & complex_type_name_for_scoring_grid, xsd ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - throw utility::excn::EXCN_Msg_Exception( "Could not generate an XML Schema for ScoringGrids from GridFactory; offending class" + } catch ( utility::excn::Exception const & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not generate an XML Schema for ScoringGrids from GridFactory; offending class" " must call protocols::qsar::scoring_grids::complex_type_name_for_scoring_grid when defining" " its XML Schema\n" + e.msg() ); } diff --git a/source/src/protocols/qsar/scoring_grid/LigandPropertyScore.cc b/source/src/protocols/qsar/scoring_grid/LigandPropertyScore.cc index 0877d6a31d..6887d7d2e4 100644 --- a/source/src/protocols/qsar/scoring_grid/LigandPropertyScore.cc +++ b/source/src/protocols/qsar/scoring_grid/LigandPropertyScore.cc @@ -67,7 +67,7 @@ GridBaseOP LigandPropertyScore::clone() const { void LigandPropertyScore::parse_my_tag(utility::tag::TagCOP tag) { if ( !tag->hasOption("parameter") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Grid Score term LigandPropertyScore needs tag 'parameter'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Grid Score term LigandPropertyScore needs tag 'parameter'"); } parameter_tag_ = tag->getOption("parameter"); diff --git a/source/src/protocols/qsar/scoring_grid/RepGrid.cc b/source/src/protocols/qsar/scoring_grid/RepGrid.cc index ee52842c4a..0494e2cc6b 100644 --- a/source/src/protocols/qsar/scoring_grid/RepGrid.cc +++ b/source/src/protocols/qsar/scoring_grid/RepGrid.cc @@ -102,7 +102,7 @@ RepGrid::parse_my_tag(utility::tag::TagCOP tag) { if ( tag->hasOption("bb") || tag->hasOption("sc") || tag->hasOption("ligand") ) { // the user MUST provide all 3 if he/she is providing any of these 3 options if ( !(tag->hasOption("bb") && tag->hasOption("sc") && tag->hasOption("ligand") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("'RepGrid' requires bb, sc, and ligand if any one of these are used"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'RepGrid' requires bb, sc, and ligand if any one of these are used"); } else { bb_= tag->getOption("bb"); sc_= tag->getOption("sc"); diff --git a/source/src/protocols/qsar/scoring_grid/ScoreNormalization.cc b/source/src/protocols/qsar/scoring_grid/ScoreNormalization.cc index ccabdeda09..dc402c0f11 100644 --- a/source/src/protocols/qsar/scoring_grid/ScoreNormalization.cc +++ b/source/src/protocols/qsar/scoring_grid/ScoreNormalization.cc @@ -26,7 +26,7 @@ ScoreNormalizationOP get_score_normalization_function(std::string norm_tag) if ( norm_tag == "ChiAngleNormalization" ) return ScoreNormalizationOP( new ChiAngleNormalization ); if ( norm_tag == "MolecularWeightNormalization" ) return ScoreNormalizationOP( new MolecularWeightNormalization ); - throw utility::excn::EXCN_RosettaScriptsOption(norm_tag+" is not a valid Score Normalization method"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, norm_tag+" is not a valid Score Normalization method"); return NULL; } diff --git a/source/src/protocols/qsar/scoring_grid/ScoringGridLoader.cc b/source/src/protocols/qsar/scoring_grid/ScoringGridLoader.cc index 0a1f8d1c8e..03cd3d3413 100644 --- a/source/src/protocols/qsar/scoring_grid/ScoringGridLoader.cc +++ b/source/src/protocols/qsar/scoring_grid/ScoringGridLoader.cc @@ -66,7 +66,7 @@ void ScoringGridLoader::load_data( } if ( !gridset_tags.empty() && !default_gridset_tags.empty() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Cannot use 'GridSet' tags simultaneously with bare non-GridSet tags!"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot use 'GridSet' tags simultaneously with bare non-GridSet tags!"); } if ( gridset_tags.empty() ) { diff --git a/source/src/protocols/qsar/scoring_grid/schema_util.cc b/source/src/protocols/qsar/scoring_grid/schema_util.cc index 30fe342374..5c0b1fc25e 100644 --- a/source/src/protocols/qsar/scoring_grid/schema_util.cc +++ b/source/src/protocols/qsar/scoring_grid/schema_util.cc @@ -29,11 +29,11 @@ parse_grid_set_from_tag( utility::tag::TagCOP tag, basic::datacache::DataMap con std::string grid_set_name( tag->getOption( option_name, "default" ) ); if ( ! data.has( "scoring_grids", grid_set_name ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("Cannot find the ScoringGrids GridSet " + grid_set_name ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot find the ScoringGrids GridSet " + grid_set_name ); } GridSetCOP grid_set = data.get_ptr< qsar::scoring_grid::GridSet const >( "scoring_grids", grid_set_name ); if ( grid_set == nullptr ) { - throw utility::excn::EXCN_RosettaScriptsOption("Problem getting GridSet " + grid_set_name + " - the stored GridSet is malformed!"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Problem getting GridSet " + grid_set_name + " - the stored GridSet is malformed!"); } return grid_set; } @@ -52,7 +52,7 @@ parse_optional_grid_set_from_tag( utility::tag::TagCOP tag, basic::datacache::Da if ( ! data.has( "scoring_grids", grid_set_name ) ) { if ( tag->hasOption( option_name ) ) { // If it's been explcitly called for, then it's an error - throw utility::excn::EXCN_RosettaScriptsOption("Cannot find the ScoringGrids GridSet " + grid_set_name ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot find the ScoringGrids GridSet " + grid_set_name ); } else { // If it's just missing, it's not an error return nullptr; @@ -60,7 +60,7 @@ parse_optional_grid_set_from_tag( utility::tag::TagCOP tag, basic::datacache::Da } GridSetCOP grid_set = data.get_ptr< qsar::scoring_grid::GridSet const >( "scoring_grids", grid_set_name ); if ( grid_set == nullptr ) { - throw utility::excn::EXCN_RosettaScriptsOption("Problem getting GridSet " + grid_set_name + " - the stored GridSet is malformed!"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Problem getting GridSet " + grid_set_name + " - the stored GridSet is malformed!"); } return grid_set; } diff --git a/source/src/protocols/relax/AtomCoordinateCstMover.cc b/source/src/protocols/relax/AtomCoordinateCstMover.cc index 72df13e514..7b60d944de 100644 --- a/source/src/protocols/relax/AtomCoordinateCstMover.cc +++ b/source/src/protocols/relax/AtomCoordinateCstMover.cc @@ -279,7 +279,7 @@ AtomCoordinateCstMover::parse_my_tag( refpose_ = ref_pose; } if ( ! refpose_ ) { - throw utility::excn::EXCN_RosettaScriptsOption("Use native for AtomCoordinateCstMover specified, but not native pose is availible."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Use native for AtomCoordinateCstMover specified, but not native pose is availible."); } } } diff --git a/source/src/protocols/relax/FastRelax.cc b/source/src/protocols/relax/FastRelax.cc index a26268c3b6..92a1344f73 100644 --- a/source/src/protocols/relax/FastRelax.cc +++ b/source/src/protocols/relax/FastRelax.cc @@ -1444,7 +1444,7 @@ void FastRelax::batch_apply( clock_t endtime = clock(); TR.Debug << "time:" << endtime - starttime << " Score: " << relax_decoy.current_score << std::endl; - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { std::cerr << "Ramp_repack_min exception: " << std::endl; excn.show( std::cerr ); // just deactivate this pose @@ -1499,7 +1499,7 @@ void FastRelax::batch_apply( core::Real score = 0; try { score = (*local_scorefxn)( pose ); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { std::cerr << "Accept_to_best scoring exception: " << std::endl; excn.show( std::cerr ); // just deactivate this pose diff --git a/source/src/protocols/residue_selectors/HBondSelector.cc b/source/src/protocols/residue_selectors/HBondSelector.cc index 42f466fc86..1d52fcca2b 100644 --- a/source/src/protocols/residue_selectors/HBondSelector.cc +++ b/source/src/protocols/residue_selectors/HBondSelector.cc @@ -138,37 +138,37 @@ HBondSelector::parse_my_tag( { if ( tag->hasOption("residue_selector") ) { if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "HBondResidueSelector takes EITHER 'selector' OR 'resnum' options, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "HBondResidueSelector takes EITHER 'selector' OR 'resnum' options, not both!\n" ); } if ( tag->size() > 1 ) { // 1 if no subtags exist - throw utility::excn::EXCN_Msg_Exception( "HBondResidueSelector can only have one ResidueSelector loaded!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "HBondResidueSelector can only have one ResidueSelector loaded!\n" ); } // grab the ResidueSelector from the selector option std::string selector_str; try { selector_str = tag->getOption< std::string >( "residue_selector" ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selector' from HBondResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } try { core::select::residue_selector::ResidueSelectorCOP selector = datamap.get_ptr< ResidueSelector const >( "ResidueSelector", selector_str ); set_input_set_selector( selector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_str << "' from the Datamap from HBondResidueSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else if ( tag->size() > 1 ) { // get input selector from tag if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "HBondResidueSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "HBondResidueSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); } utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "HBondResidueSelector takes at most one ResidueSelector to determine the input_set!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "HBondResidueSelector takes at most one ResidueSelector to determine the input_set!\n" ); } core::select::residue_selector::ResidueSelectorCOP rs = core::select::residue_selector::ResidueSelectorFactory::get_instance()->new_residue_selector( tags.front()->getName(), @@ -179,11 +179,11 @@ HBondSelector::parse_my_tag( } else if ( tag->hasOption( "resnums" ) ) { // do not get input_set from ResidueSelectors but load resnums string instead try { set_input_set_str ( tag->getOption< std::string >( "resnums" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream err_msg; err_msg << "Failed to access option 'resnums' from HBondResidueSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } //Set other options @@ -311,7 +311,7 @@ HBondSelector::compute_input_set( core::pose::Pose const & pose, std::set< core: if ( res == 0 || res > pose.total_residue() ) { std::stringstream err_msg; err_msg << "Residue " << res << " not found in pose!\n"; - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } } diff --git a/source/src/protocols/residue_selectors/LigandMetalContactSelector.cc b/source/src/protocols/residue_selectors/LigandMetalContactSelector.cc index 91bab6d6c3..b8f89e620a 100644 --- a/source/src/protocols/residue_selectors/LigandMetalContactSelector.cc +++ b/source/src/protocols/residue_selectors/LigandMetalContactSelector.cc @@ -118,40 +118,40 @@ LigandMetalContactSelector::parse_my_tag( if ( tag->hasOption("residue_selector") ) { if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "LigandMetalContactSelector takes EITHER 'selector' OR 'resnums' options, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LigandMetalContactSelector takes EITHER 'selector' OR 'resnums' options, not both!\n" ); } if ( tag->size() > 1 ) { // 1 if no subtags exist - throw utility::excn::EXCN_Msg_Exception( "LigandMetalContactSelector can only have one ResidueSelector loaded!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LigandMetalContactSelector can only have one ResidueSelector loaded!\n" ); } // grab the ResidueSelector from the selector option // and then grab each of the indicated residue selectors from the datamap. std::string selector_str = ""; try { selector_str = tag->getOption< std::string >( "residue_selector" ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to access option 'selector' from LigandMetalContactSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } try { core::select::residue_selector::ResidueSelectorCOP selector = datamap.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_str ); set_input_set_selector( selector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_str << "' from the Datamap from LigandMetalContactSelector::parse_my_tag.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } } else if ( tag->size() > 1 ) { // get focus selector from tag if ( tag->hasOption("resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "LigandMetalContactSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LigandMetalContactSelector takes EITHER a 'resnums' tag or a selector subtag, not both!\n" ); } utility::vector0< utility::tag::TagCOP > const & tags = tag->getTags(); if ( tags.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "LigandMetalContactSelector takes at most one ResidueSelector to determine the input_set!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "LigandMetalContactSelector takes at most one ResidueSelector to determine the input_set!\n" ); } core::select::residue_selector::ResidueSelectorCOP rs = core::select::residue_selector::ResidueSelectorFactory::get_instance()->new_residue_selector( tags.front()->getName(), @@ -162,11 +162,11 @@ LigandMetalContactSelector::parse_my_tag( } else { // do not get input_set from ResidueSelectors but load resnums string instead try { set_resnum_string ( tag->getOption< std::string >( "resnums" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch ( utility::excn::Exception e ) { std::stringstream err_msg; err_msg << "Failed to access option 'resnums' from LigandMetalContactSelector::parse_my_tag.\n"; err_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str() ); } } @@ -235,7 +235,7 @@ LigandMetalContactSelector::calculate_ligand_resnums(core::pose::Pose const & po if ( *it == 0 || *it > local_subset.size() ) { std::stringstream err_msg; err_msg << "Residue " << *it <<" not found in pose!/n"; - throw utility::excn::EXCN_Msg_Exception(err_msg.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, err_msg.str()); } } } diff --git a/source/src/protocols/residue_selectors/StoredResidueSubsetSelector.cc b/source/src/protocols/residue_selectors/StoredResidueSubsetSelector.cc index 6949457fa3..1061ab1d36 100644 --- a/source/src/protocols/residue_selectors/StoredResidueSubsetSelector.cc +++ b/source/src/protocols/residue_selectors/StoredResidueSubsetSelector.cc @@ -84,7 +84,7 @@ quit_no_subset() { std::stringstream msg; msg << "StoredResidueSubsetSelector: no subset name was specified!" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } core::select::residue_selector::ResidueSubset diff --git a/source/src/protocols/residue_selectors/TaskSelector.cc b/source/src/protocols/residue_selectors/TaskSelector.cc index a51dc7f9cd..01b3d4b6cd 100644 --- a/source/src/protocols/residue_selectors/TaskSelector.cc +++ b/source/src/protocols/residue_selectors/TaskSelector.cc @@ -89,7 +89,7 @@ quit_no_tf() { std::stringstream msg; msg << "TaskSelector: no task factory was specified!" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } core::select::residue_selector::ResidueSubset @@ -132,7 +132,7 @@ TaskSelector::parse_my_tag( if ( data.has( "task_operations", task_op_name ) ) { tf->push_back( data.get_ptr< core::pack::task::operation::TaskOperation >( "task_operations", task_op_name ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + task_op_name + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + task_op_name + " not found in basic::datacache::DataMap."); } TR << "Adding task operation " << task_op_name << std::endl; } diff --git a/source/src/protocols/rigid/RigidBodyMover.cc b/source/src/protocols/rigid/RigidBodyMover.cc index 27b991cbaf..2c677494da 100644 --- a/source/src/protocols/rigid/RigidBodyMover.cc +++ b/source/src/protocols/rigid/RigidBodyMover.cc @@ -901,7 +901,7 @@ RigidBodyTiltMover::parse_my_tag( utility::tag::TagCOP tag, core::Size tilt1_cent( core::pose::parse_resnum( tag->getOption< std::string >( "tilt1_center" ), pose ) ); TRBM.Debug << "Tilt 1 center " << tilt1_cent << std::endl; if ( tilt1_cent == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("In RigidBodyTiltMover: can't understand value passed to tilt1_center."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "In RigidBodyTiltMover: can't understand value passed to tilt1_center."); } tilt1_center( tilt1_cent ); } @@ -909,7 +909,7 @@ RigidBodyTiltMover::parse_my_tag( utility::tag::TagCOP tag, core::Size tilt2_cent( core::pose::parse_resnum( tag->getOption< std::string >( "tilt2_center" ), pose ) ); TRBM.Debug << "Tilt 2 center " << tilt2_cent << std::endl; if ( tilt2_cent == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("In RigidBodyTiltMover: can't understand value passed to tilt2_center."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "In RigidBodyTiltMover: can't understand value passed to tilt2_center."); } tilt2_center( tilt2_cent ); } diff --git a/source/src/protocols/rigid/RollMover.cc b/source/src/protocols/rigid/RollMover.cc index 2bc3ab90a5..64473644d9 100644 --- a/source/src/protocols/rigid/RollMover.cc +++ b/source/src/protocols/rigid/RollMover.cc @@ -154,13 +154,13 @@ RollMover::parse_my_tag( if ( tag->hasOption("min_angle") ) { min_angle_ = tag->getOption("min_angle"); } else { - throw utility::excn::EXCN_RosettaScriptsOption("RollMover requires min_angle option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RollMover requires min_angle option"); } /*parse max_angle*/ if ( tag->hasOption("max_angle") ) { max_angle_ = tag->getOption("max_angle"); } else { - throw utility::excn::EXCN_RosettaScriptsOption("RollMover requires max_angle option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RollMover requires max_angle option"); } bool axis_option_parsed = false; @@ -197,10 +197,10 @@ RollMover::parse_my_tag( } if ( !axis_option_parsed ) { - throw utility::excn::EXCN_RosettaScriptsOption("RollMover requires axis option"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RollMover requires axis option"); } if ( !translate_option_parsed ) { - //throw utility::excn::EXCN_RosettaScriptsOption("RollMover requires translate option"); + //throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RollMover requires translate option"); TR << "No translation given, using the pose's center of mass" << std::endl; translate_ = protocols::geometry::center_of_mass(pose, start_res_, stop_res_); } diff --git a/source/src/protocols/rigid/UniformRigidBodyCM.cc b/source/src/protocols/rigid/UniformRigidBodyCM.cc index bbc2c3fa81..d572a05cfb 100644 --- a/source/src/protocols/rigid/UniformRigidBodyCM.cc +++ b/source/src/protocols/rigid/UniformRigidBodyCM.cc @@ -123,7 +123,7 @@ void UniformRigidBodyCM::apply( core::pose::Pose& pose ){ if ( mover_ && passport()->has_jump_access( mover_->jump_number() ) ) { mover_->apply( pose ); } else if ( !mover_ ) { - throw utility::excn::EXCN_NullPointer( "UniformRigidBodyCM found during apply. Did you forget to register this mover with the Environment?" ); + throw CREATE_EXCEPTION(utility::excn::NullPointerError, "UniformRigidBodyCM found during apply. Did you forget to register this mover with the Environment?" ); } else { tr.Warning << "UniformRigidBodyCM is skipping it's turn to apply a RigidBody move because it doesn't have " << " access to the requested dof, jump " << mover_->jump_number() diff --git a/source/src/protocols/rigid/UniformRigidBodyMover.cc b/source/src/protocols/rigid/UniformRigidBodyMover.cc index ae486fc829..15c92b0605 100644 --- a/source/src/protocols/rigid/UniformRigidBodyMover.cc +++ b/source/src/protocols/rigid/UniformRigidBodyMover.cc @@ -86,7 +86,7 @@ void UniformRigidBodyMover::apply( core::pose::Pose& pose ){ ss << "The target jump number of " << this->get_name() << " was " << NO_JUMP << ", which probably means this value wasn't set properly. " << "If you're using RosettaScripts, try using the 'target_jump' option." << std::endl; - throw utility::excn::EXCN_BadInput( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, ss.str() ); } core::kinematics::Jump flexible_jump = pose.jump( target_jump_ ); diff --git a/source/src/protocols/rosetta_scripts/AdditionalOutputWrapper.cc b/source/src/protocols/rosetta_scripts/AdditionalOutputWrapper.cc index 6df7bd002d..a1e954a35e 100644 --- a/source/src/protocols/rosetta_scripts/AdditionalOutputWrapper.cc +++ b/source/src/protocols/rosetta_scripts/AdditionalOutputWrapper.cc @@ -185,12 +185,12 @@ void AdditionalOutputWrapper::parse_my_tag( } if ( !mover_tag_ && !rosetta_scripts_tag_ ) { - throw utility::excn::EXCN_Msg_Exception("No mover or ROSETTASCRIPTS tag found."); + throw CREATE_EXCEPTION(utility::excn::Exception, "No mover or ROSETTASCRIPTS tag found."); } - } catch( utility::excn::EXCN_Msg_Exception const & e ) { + } catch( utility::excn::Exception const & e ) { std::string my_name( tag->getOption("name") ); - throw utility::excn::EXCN_Msg_Exception("Exception in AdditionalOutputWrapper with name \"" + my_name + "\": " + e.msg()); + throw CREATE_EXCEPTION(utility::excn::Exception, "Exception in AdditionalOutputWrapper with name \"" + my_name + "\": " + e.msg()); } } diff --git a/source/src/protocols/rosetta_scripts/MultipleOutputWrapper.cc b/source/src/protocols/rosetta_scripts/MultipleOutputWrapper.cc index ebaae3fa17..1969a015c3 100644 --- a/source/src/protocols/rosetta_scripts/MultipleOutputWrapper.cc +++ b/source/src/protocols/rosetta_scripts/MultipleOutputWrapper.cc @@ -227,12 +227,12 @@ void MultipleOutputWrapper::parse_my_tag( } if ( !mover_tag_ && !rosetta_scripts_tag_ ) { - throw utility::excn::EXCN_Msg_Exception("No mover or ROSETTASCRIPTS tag found."); + throw CREATE_EXCEPTION(utility::excn::Exception, "No mover or ROSETTASCRIPTS tag found."); } - } catch( utility::excn::EXCN_Msg_Exception const & e ) { + } catch( utility::excn::Exception const & e ) { std::string my_name( tag->getOption("name") ); - throw utility::excn::EXCN_Msg_Exception("Exception in MultipleOutputWrapper with name \"" + my_name + "\": " + e.msg()); + throw CREATE_EXCEPTION(utility::excn::Exception, "Exception in MultipleOutputWrapper with name \"" + my_name + "\": " + e.msg()); } } diff --git a/source/src/protocols/rosetta_scripts/MultiplePoseMover.cc b/source/src/protocols/rosetta_scripts/MultiplePoseMover.cc index dbb8c36f17..485e864d3e 100644 --- a/source/src/protocols/rosetta_scripts/MultiplePoseMover.cc +++ b/source/src/protocols/rosetta_scripts/MultiplePoseMover.cc @@ -299,10 +299,10 @@ bool MultiplePoseMover::process_pose( core::pose::Pose & pose, utility::vector1 TR << "Failed to parse protocol? This should not happen. Not applying protocol to pose." << std::endl; return false; } - } catch ( utility::excn::EXCN_Base const & e ) { + } catch ( utility::excn::Exception const & e ) { std::ostringstream oss; oss << "MultiplePoseMover could not create the inner parsed protocol; error message generated from parser.parse_protocol_tag:\n" << e.msg(); - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } mover->apply(pose); @@ -397,9 +397,9 @@ void MultiplePoseMover::parse_my_tag( // TODO: Should we complain here is there are tags specified that we don't understand? - } catch( utility::excn::EXCN_Msg_Exception const & e ) { + } catch( utility::excn::Exception const & e ) { std::string my_name( tag->getOption("name") ); - throw utility::excn::EXCN_Msg_Exception("Exception in MultiplePoseMover with name \"" + my_name + "\": " + e.msg()); + throw CREATE_EXCEPTION(utility::excn::Exception, "Exception in MultiplePoseMover with name \"" + my_name + "\": " + e.msg()); } // Obtain flags from selector diff --git a/source/src/protocols/rosetta_scripts/ParsedProtocol.cc b/source/src/protocols/rosetta_scripts/ParsedProtocol.cc index 6070ad25d9..9c55c235ca 100644 --- a/source/src/protocols/rosetta_scripts/ParsedProtocol.cc +++ b/source/src/protocols/rosetta_scripts/ParsedProtocol.cc @@ -311,14 +311,14 @@ parse_mover_subtag( utility::tag::TagCOP const tag_ptr, mover_name = tag_ptr->getOption( "mover_name" ); auto find_mover( movers.find( mover_name ) ); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover " + mover_name + " not found in map"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover " + mover_name + " not found in map"); } mover_to_add = find_mover->second; } else if ( tag_ptr->hasOption( "mover" ) ) { mover_name = tag_ptr->getOption( "mover" ); auto find_mover( movers.find( mover_name ) ); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover " + mover_name + " not found in map"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover " + mover_name + " not found in map"); } mover_to_add = find_mover->second; } else if ( tag_ptr->getName() != "Add" ) { @@ -366,7 +366,7 @@ ParsedProtocol::parse_my_tag( mode_=tag->getOption("mode", "sequence"); if ( mode_ != "sequence" && mode_ != "random_order" && mode_ != "single_random" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: mode must be sequence, random_order, or single_random"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: mode must be sequence, random_order, or single_random"); } utility::vector0< TagCOP > const & dd_tags( tag->getTags() ); @@ -395,7 +395,7 @@ ParsedProtocol::parse_my_tag( if ( filter_defined ) { auto find_filter( filters.find( filter_name )); if ( find_filter == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Filter " + filter_name + " not found in map"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter " + filter_name + " not found in map"); } filter_to_add = find_filter->second; } else { diff --git a/source/src/protocols/rosetta_scripts/PosePropertyReporter.cc b/source/src/protocols/rosetta_scripts/PosePropertyReporter.cc index 7aa1011baf..75f349ff8c 100644 --- a/source/src/protocols/rosetta_scripts/PosePropertyReporter.cc +++ b/source/src/protocols/rosetta_scripts/PosePropertyReporter.cc @@ -38,12 +38,12 @@ PosePropertyReporter::~PosePropertyReporter() = default; core::Real PosePropertyReporter::report_property( core::pose::Pose & ) const { - throw utility::excn::EXCN_RosettaScriptsOption("Pose property reporter " + get_name() + " cannot report property for a single pose -- not implemented" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Pose property reporter " + get_name() + " cannot report property for a single pose -- not implemented" ); } core::Real PosePropertyReporter::report_property( core::pose::Pose & , core::pose::Pose & ) const { - throw utility::excn::EXCN_RosettaScriptsOption("Pose property reporter " + get_name() + " cannot compare two poses -- not implemented" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Pose property reporter " + get_name() + " cannot compare two poses -- not implemented" ); } diff --git a/source/src/protocols/rosetta_scripts/PosePropertyReporterFactory.cc b/source/src/protocols/rosetta_scripts/PosePropertyReporterFactory.cc index c08325d3d9..eb95d3be9f 100644 --- a/source/src/protocols/rosetta_scripts/PosePropertyReporterFactory.cc +++ b/source/src/protocols/rosetta_scripts/PosePropertyReporterFactory.cc @@ -45,10 +45,10 @@ PosePropertyReporterFactory::factory_register( PosePropertyReporterCreatorOP cre runtime_assert( creator != nullptr ); std::string const pose_selector_type( creator->keyname() ); if ( pose_selector_type == "UNDEFINED NAME" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't map derived PosePropertyReporter with undefined type name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't map derived PosePropertyReporter with undefined type name."); } if ( reporter_creator_map_.find( pose_selector_type ) != reporter_creator_map_.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("PosePropertyReporterFactory::factory_register already has a pose selector creator with name \"" + pose_selector_type + "\". Conflicting pose selector names" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "PosePropertyReporterFactory::factory_register already has a pose selector creator with name \"" + pose_selector_type + "\". Conflicting pose selector names" ); } reporter_creator_map_[ pose_selector_type ] = creator; } @@ -61,7 +61,7 @@ PosePropertyReporterFactory::newPosePropertyReporter( std::string const & pose_s PosePropertyReporterMap::const_iterator iter( reporter_creator_map_.find( pose_selector_type ) ); if ( iter != reporter_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: PosePropertyReporterCreatorOP prototype for " + pose_selector_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: PosePropertyReporterCreatorOP prototype for " + pose_selector_type + " is NULL!" ); } return iter->second->create_reporter(); } else { @@ -70,7 +70,7 @@ PosePropertyReporterFactory::newPosePropertyReporter( std::string const & pose_s TR<first<<", "; } TR<keyname() ); if ( pose_selector_type == "UNDEFINED NAME" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't map derived PoseSelector with undefined type name."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't map derived PoseSelector with undefined type name."); } if ( poseselector_creator_map_.find( pose_selector_type ) != poseselector_creator_map_.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("PoseSelectorFactory::factory_register already has a pose selector creator with name \"" + pose_selector_type + "\". Conflicting pose selector names" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "PoseSelectorFactory::factory_register already has a pose selector creator with name \"" + pose_selector_type + "\". Conflicting pose selector names" ); } poseselector_creator_map_[ pose_selector_type ] = creator; } @@ -62,7 +62,7 @@ PoseSelectorFactory::newPoseSelector( std::string const & pose_selector_type ) PoseSelectorMap::const_iterator iter( poseselector_creator_map_.find( pose_selector_type ) ); if ( iter != poseselector_creator_map_.end() ) { if ( ! iter->second ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: PoseSelectorCreatorOP prototype for " + pose_selector_type + " is NULL!" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: PoseSelectorCreatorOP prototype for " + pose_selector_type + " is NULL!" ); } return iter->second->create_selector(); } else { @@ -71,7 +71,7 @@ PoseSelectorFactory::newPoseSelector( std::string const & pose_selector_type ) TR<first<<", "; } TR<hasTag("PROTOCOLS") ) { - throw utility::excn::EXCN_RosettaScriptsOption("parser::protocol file must specify PROTOCOLS section"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "parser::protocol file must specify PROTOCOLS section"); } // Round 1: Import previously defined filters and movers @@ -499,7 +499,7 @@ RosettaScriptsParser::generate_mover_for_protocol( TR << "Defined and applied mover of type " << mover_type << std::endl; bool const name_exists( movers.find( mover_type ) != movers.end() ); if ( name_exists ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't apply_to_pose the same mover twice for " + mover_type); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't apply_to_pose the same mover twice for " + mover_type); } modified_pose = true; @@ -574,7 +574,7 @@ RosettaScriptsParser::read_in_and_recursively_replace_includes( //Check whether we've already encountered this filename for ( std::string const & seen_fn : filenames_encountered ) { if ( seen_fn == filename ) { - throw utility::excn::EXCN_BadInput( "Error in protocols::rosetta_scipts::RosettaScriptsParser::read_in_and_recursively_replace_includes(): Circular inclusion pattern detected when reading \"" + filename + "\"." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Error in protocols::rosetta_scipts::RosettaScriptsParser::read_in_and_recursively_replace_includes(): Circular inclusion pattern detected when reading \"" + filename + "\"." ); } } if ( filenames_encountered.size() != 0 && TR.visible() ) TR << "Including RosettaScripts XML file " << filename << "." << std::endl; @@ -653,7 +653,7 @@ RosettaScriptsParser::parse_protocol_tag( Pose & pose, utility::tag::TagCOP prot ParsedProtocolOP mover = generate_mover_for_protocol(pose, modified_pose, protocol_tag, options); if ( modified_pose ) { - throw utility::excn::EXCN_RosettaScriptsOption("RosettaScriptsParser::parse_protocol_tag resulted in modified_pose"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RosettaScriptsParser::parse_protocol_tag resulted in modified_pose"); } return mover; @@ -671,13 +671,13 @@ RosettaScriptsParser::instantiate_filter( ) { std::string const type( tag_ptr->getName() ); if ( ! tag_ptr->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't define unnamed Filter of type " + type); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't define unnamed Filter of type " + type); } std::string const user_defined_name( tag_ptr->getOption("name") ); bool const name_exists( filters.find( user_defined_name ) != filters.end() ); if ( name_exists ) { - throw utility::excn::EXCN_RosettaScriptsOption("Filter of name \"" + user_defined_name + "\" (of type " + type + ") already exists."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter of name \"" + user_defined_name + "\" (of type " + type + ") already exists."); } protocols::filters::FilterOP new_filter( protocols::filters::FilterFactory::get_instance()->newFilter( tag_ptr, data, filters, movers, pose ) ); @@ -697,13 +697,13 @@ RosettaScriptsParser::instantiate_mover( ) { std::string const type( tag_ptr->getName() ); if ( ! tag_ptr->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't define unnamed Mover of type " + type); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't define unnamed Mover of type " + type); } std::string const user_defined_name( tag_ptr->getOption("name") ); bool const name_exists( movers.find( user_defined_name ) != movers.end() ); if ( name_exists ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover of name \"" + user_defined_name + "\" (of type " + type + ") already exists."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover of name \"" + user_defined_name + "\" (of type " + type + ") already exists."); } MoverOP new_mover( MoverFactory::get_instance()->newMover( tag_ptr, data, filters, movers, pose ) ); @@ -726,12 +726,12 @@ RosettaScriptsParser::instantiate_taskoperation( std::string const type( tag_ptr->getName() ); if ( ! tag_ptr->hasOption("name") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't define unnamed TaskOperation of type " + type); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't define unnamed TaskOperation of type " + type); } std::string const user_defined_name( tag_ptr->getOption("name") ); if ( data.has( "task_operations", user_defined_name ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation with name \"" + user_defined_name + "\" (of type " + type + ") already exists."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation with name \"" + user_defined_name + "\" (of type " + type + ") already exists."); } TaskOperationOP new_t_o( TaskOperationFactory::get_instance()->newTaskOperation( type, data, tag_ptr ) ); @@ -848,7 +848,7 @@ RosettaScriptsParser::import_tags( TagCAP parent = my_tag->getParent(); if ( utility::pointer::equal(parent, mover_tag) ) { // Current mover_tag is our parent, i.e. same ROSETTASCRIPTS tag - throw utility::excn::EXCN_RosettaScriptsOption("Cannot import mover " + mover_name + " into itself; recursion detected"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot import mover " + mover_name + " into itself; recursion detected"); } instantiate_mover(mover_tag, data, filters, movers, pose); import_tag_names.erase(key); @@ -871,7 +871,7 @@ RosettaScriptsParser::import_tags( for ( ImportTagName import_tag : import_tag_names ) { std::string msg("Failed to import " + import_tag.second + " from " + import_tag.first); TR << msg << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(msg); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg); } } @@ -1023,10 +1023,10 @@ RosettaScriptsParser::validate_input_script_against_xsd( std::string const & fna std::string schema; try { schema = xsd_for_rosetta_scripts(); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { oss << "An error was encountered while the string of the schema was being generated; this is before the schema is analyzed for whether it is correct or not.\n"; oss << e.msg() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( basic::options::option[ basic::options::OptionKeys::parser::output_schema ].user() ) { @@ -1040,15 +1040,15 @@ RosettaScriptsParser::validate_input_script_against_xsd( std::string const & fna TR << "Initializing schema validator..." << std::endl; schema_valid_output = validator_->set_schema( schema ); TR << "...done" << std::endl; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { oss << e.msg() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( ! schema_valid_output.valid() ) { oss << "If there is an error message immediately above stating that the schema failed to validate, and errors below that look like 'real XML' with lots of tags and NOT like your XML input, then you have a global schema validation error not an XML input validation error. Read the error message below and fix your schema in the C++ code. \n\n"; oss << "Errors: " << schema_valid_output.error_messages() << "\n"; oss << "Warnings: " << schema_valid_output.warning_messages() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } } @@ -1068,9 +1068,9 @@ RosettaScriptsParser::validate_input_script_against_xsd( std::string const & fna XMLValidationOutput validator_output; try { validator_output = validator_->validate_xml_against_schema( xml_file ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { oss << e.msg() << "\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( ! validator_output.valid() ) { @@ -1079,7 +1079,7 @@ RosettaScriptsParser::validate_input_script_against_xsd( std::string const & fna oss << "------------------------------------------------------------\n"; oss << "Warning messages were:\n" << validator_output.warning_messages(); oss << "------------------------------------------------------------\n"; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } if ( basic::options::option[ basic::options::OptionKeys::parser::validate_and_exit ] ) { diff --git a/source/src/protocols/rosetta_scripts/SavePoseMover.cc b/source/src/protocols/rosetta_scripts/SavePoseMover.cc index b4290d9f29..5188809bbd 100644 --- a/source/src/protocols/rosetta_scripts/SavePoseMover.cc +++ b/source/src/protocols/rosetta_scripts/SavePoseMover.cc @@ -63,7 +63,7 @@ SavePoseMover::parse_my_tag( TagCOP const tag, basic::datacache::DataMap & data_ { if ( tag->hasOption("reference_name") ) { reference_pose_ = saved_reference_pose(tag,data_map ); - } else throw utility::excn::EXCN_RosettaScriptsOption("Need to specify name under which to save pose."); + } else throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Need to specify name under which to save pose."); if ( tag->hasOption( "pdb_file" ) ) { std::string const template_pdb_fname( tag->getOption< std::string >( "pdb_file" )); diff --git a/source/src/protocols/rosetta_scripts/XmlObjects.cc b/source/src/protocols/rosetta_scripts/XmlObjects.cc index b1ce8cd093..f46f5d7dd2 100644 --- a/source/src/protocols/rosetta_scripts/XmlObjects.cc +++ b/source/src/protocols/rosetta_scripts/XmlObjects.cc @@ -139,7 +139,7 @@ XmlObjects::create_from_string( try { parsed_protocol = parser.generate_mover_and_apply_to_pose_xml_string( pose, options, modified_pose, prepared_text, objs ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TR << "Error creating parsed protocol." << std::endl; throw e; @@ -193,7 +193,7 @@ XmlObjects::create_from_file( try { parsed_protocol = parser.generate_mover_and_apply_to_pose( pose, options, modified_pose, filename, objs ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TR << "Error creating parsed protocol." << std::endl; throw e; @@ -299,7 +299,7 @@ XmlObjects::static_get_score_function( std::string name; try { name = get_or_set_tag_name( xml_text ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; // This line should be removed once PyRosetta correctly outputs the exception TR << "Error parsing tag. Remember to specify only one ScoreFunction!" << std::endl; throw e; @@ -353,7 +353,7 @@ XmlObjects::static_get_residue_selector( std::string name; try { name = get_or_set_tag_name( xml_text ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; // This line should be removed once PyRosetta correctly outputs the exception TR << "Error parsing tag. Remember to specify only one ResidueSelector!" << std::endl; throw e; @@ -407,7 +407,7 @@ XmlObjects::static_get_filter( std::string name; try { name = get_or_set_tag_name( xml_text ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; // This line should be removed once PyRosetta correctly outputs the exception TR << "Error parsing tag. Remember to specify only one Filter!" << std::endl; throw e; @@ -461,7 +461,7 @@ XmlObjects::static_get_mover( std::string name; try { name = get_or_set_tag_name( xml_text ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; // This line should be removed once PyRosetta correctly outputs the exception TR << "Error parsing tag. Remember to specify only one Mover!" << std::endl; throw e; @@ -515,7 +515,7 @@ XmlObjects::static_get_task_operation( std::string name; try { name = get_or_set_tag_name( xml_text ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR << e.msg() << std::endl; // This line should be removed once PyRosetta correctly outputs the exception TR << "Error parsing tag. Remember to specify only one TaskOperation!" << std::endl; throw e; diff --git a/source/src/protocols/rosetta_scripts/util.cc b/source/src/protocols/rosetta_scripts/util.cc index 247a0ddf68..e2b05a7399 100644 --- a/source/src/protocols/rosetta_scripts/util.cc +++ b/source/src/protocols/rosetta_scripts/util.cc @@ -201,7 +201,7 @@ parse_task_operations( std::string const & task_list, basic::datacache::DataMap new_task_factory->push_back( data.get_ptr< TaskOperation >( "task_operations", t_o_key ) ); TR<push_back( data.get_ptr< TaskOperation >( "task_operations", t_o_key ) ); TR<( "task_operations", t_o_key ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + t_o_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + t_o_key + " not found in basic::datacache::DataMap."); } } } @@ -346,9 +346,9 @@ parse_score_function( if ( ! data.has( "scorefxns", scorefxn_key ) ) { if ( ! core::init::check_score_function_sanity( basic::options::option, scorefxn_key ) ) { // Incompatible default score functions aren't loaded. - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " was requested with incompatible options."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " was requested with incompatible options."); } else { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap. To add a score function to the data map, define a score function in the .'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap. To add a score function to the data map, define a score function in the .'"); } } @@ -749,7 +749,7 @@ protocols::filters::FilterOP parse_filter( std::string const & filter_name, protocols::filters::Filters_map const & filters ){ auto filter_it( filters.find( filter_name ) ); if ( filter_it == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Filter "+filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter "+filter_name+" not found" ); } return filter_it->second; } @@ -763,7 +763,7 @@ protocols::moves::MoverOP parse_mover( std::string const & mover_name, protocols::moves::Movers_map const & movers ){ auto mover_it( movers.find( mover_name ) ); if ( mover_it == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover "+mover_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover "+mover_name+" not found" ); } return mover_it->second; } @@ -786,9 +786,9 @@ attributes_for_parse_xyz_vector( utility::tag::AttributeList & attlist ){ /// @brief utility function for parsing xyzVector numeric::xyzVector< core::Real > parse_xyz_vector( utility::tag::TagCOP const xyz_vector_tag ){ - if ( ! xyz_vector_tag->hasOption("x") ) throw utility::excn::EXCN_RosettaScriptsOption("xyz_vector requires 'x' coordinates option"); - if ( ! xyz_vector_tag->hasOption("y") ) throw utility::excn::EXCN_RosettaScriptsOption("xyz_vector requires 'y' coordinates option"); - if ( ! xyz_vector_tag->hasOption("z") ) throw utility::excn::EXCN_RosettaScriptsOption("xyz_vector requires 'z' coordinates option"); + if ( ! xyz_vector_tag->hasOption("x") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "xyz_vector requires 'x' coordinates option"); + if ( ! xyz_vector_tag->hasOption("y") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "xyz_vector requires 'y' coordinates option"); + if ( ! xyz_vector_tag->hasOption("z") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "xyz_vector requires 'z' coordinates option"); numeric::xyzVector< core::Real > xyz_v ( xyz_vector_tag->getOption("x"), @@ -996,7 +996,7 @@ void save_schema( std::string const & filename ) { try { protocols::rosetta_scripts::RosettaScriptsParser parser = protocols::rosetta_scripts::RosettaScriptsParser(); schema = parser.xsd_for_rosetta_scripts(); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch ( utility::excn::Exception const & e ) { TR.Error << "An error was encountered while attempting to generate the XSD schema - it will not be saved.\n"; TR.Error << e.msg() << "\n"; return; diff --git a/source/src/protocols/rotamer_recovery/RotamerRecoveryMover.cc b/source/src/protocols/rotamer_recovery/RotamerRecoveryMover.cc index 221c4f6fdd..bf348395e2 100644 --- a/source/src/protocols/rotamer_recovery/RotamerRecoveryMover.cc +++ b/source/src/protocols/rotamer_recovery/RotamerRecoveryMover.cc @@ -227,11 +227,11 @@ RotamerRecoveryMover::parse_my_tag( if ( rotamer_recovery_ ) { TR.Warning << "Attempting to redefine rotamer_recovery_ object from Parser Script" << endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } if ( tag->hasOption("protocol") && (tag->hasOption("mover") || tag->hasOption("mover_name")) ) { - throw utility::excn::EXCN_RosettaScriptsOption("Please either the 'protocol' field or the 'mover' field but not both."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Please either the 'protocol' field or the 'mover' field but not both."); } RotamerRecoveryFactory * factory(RotamerRecoveryFactory::get_instance()); diff --git a/source/src/protocols/rpc/rpc.cc b/source/src/protocols/rpc/rpc.cc index 75d24cc3b3..1581082caa 100644 --- a/source/src/protocols/rpc/rpc.cc +++ b/source/src/protocols/rpc/rpc.cc @@ -146,7 +146,7 @@ void JSON_RPC::unpack( const std::string &msg ){ parsed_json_ = read_mObject( msg ); if ( !has_value(parsed_json_, "command") ) { - throw utility::excn::EXCN_Msg_Exception("RPC calls must provide command field"); + throw CREATE_EXCEPTION(utility::excn::Exception, "RPC calls must provide command field"); } command_ = get_string(parsed_json_, "command"); std::cout << "Rosetta command: " << command_ << std::endl; @@ -158,7 +158,7 @@ void JSON_RPC::unpack( const std::string &msg ){ } if ( !has_value(parsed_json_, "pdbdata") ) { - throw utility::excn::EXCN_Msg_Exception("RPC calls must provide pdbdata field"); + throw CREATE_EXCEPTION(utility::excn::Exception, "RPC calls must provide pdbdata field"); } pdbdata_string_ = get_string(parsed_json_, "pdbdata"); @@ -186,23 +186,23 @@ void JSON_RPC::unpack( const std::string &msg ){ load_new_set_of_virtual_files( get_mArray(parsed_json_, "user_files") ); } } -catch( utility::excn::EXCN_Msg_Exception &excn ){ +catch( utility::excn::Exception &excn ){ output_capture_stop(); // Make sure we're catching the following message throw; } catch( std::string &s ){ // convert Exception into a rosetta exception output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + s ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + s ); } catch( utility::json_spirit::Error_position &ep ){ // convert Exception into a rosetta exception output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + ep.reason_ + " Line: " + ObjexxFCL::string_of( ep.line_ ) + " Col: " + ObjexxFCL::string_of( ep.column_ ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + ep.reason_ + " Line: " + ObjexxFCL::string_of( ep.line_ ) + " Col: " + ObjexxFCL::string_of( ep.column_ ) ); } catch( ... ){ output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + "Unknown Exception happened during unpacking of JSON data" ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + "Unknown Exception happened during unpacking of JSON data" ); } } @@ -232,7 +232,7 @@ void JSON_RPC::run(){ // this covers a huge variety of possible operations and move movers are plugged into this system by now. if ( command_ == "xmlscript" ) { if ( xmlscript_ == "" ) { - throw utility::excn::EXCN_Msg_Exception("RPC error: XML script is empty! " ); + throw CREATE_EXCEPTION(utility::excn::Exception, "RPC error: XML script is empty! " ); } utility::Inline_File_Provider *provider = utility::Inline_File_Provider::get_instance(); @@ -253,7 +253,7 @@ void JSON_RPC::run(){ std::cout << it->type() << std::endl; if ( it->type() != obj_type ) { - throw utility::excn::EXCN_Msg_Exception("JSON error: expected an object for poseop array member'"); + throw CREATE_EXCEPTION(utility::excn::Exception, "JSON error: expected an object for poseop array member'"); }; const mObject &poseop_params = it->get_obj(); @@ -315,7 +315,7 @@ void JSON_RPC::run(){ // lh_protocol->manual_call( outputpose_ ); // } } -catch( utility::excn::EXCN_Msg_Exception &excn ){ +catch( utility::excn::Exception &excn ){ std::cerr << "EXCEPTION: " << excn.msg() << std::endl; // print the exception message to the Error stream. TR.Error << "EXCEPTION: " << excn.msg() << std::endl; // print the exception message to the Error stream. endtime_ = time(nullptr); @@ -326,18 +326,18 @@ catch( std::string &s ){ // convert Exception into a rosetta exception endtime_ = time(nullptr); output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + s ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + s ); } catch( utility::json_spirit::Error_position &ep ){ // convert Exception into a rosetta exception endtime_ = time(nullptr); output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + ep.reason_ + " Line: " + ObjexxFCL::string_of( ep.line_ ) + " Col: " + ObjexxFCL::string_of( ep.column_ ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + ep.reason_ + " Line: " + ObjexxFCL::string_of( ep.line_ ) + " Col: " + ObjexxFCL::string_of( ep.column_ ) ); } catch( ... ){ endtime_ = time(nullptr); output_capture_stop(); - throw utility::excn::EXCN_Msg_Exception( tracer() + "Unknown Exception happened during execution of json RPC call " ); + throw CREATE_EXCEPTION(utility::excn::Exception, tracer() + "Unknown Exception happened during execution of json RPC call " ); } endtime_ = time(nullptr); @@ -366,7 +366,7 @@ void JSON_RPC::load_new_set_of_user_flags( const mObject &json_user_flags ){ std::vector < std::string > user_flags; for ( auto const & json_user_flag : json_user_flags ) { if ( json_user_flag.second.type() != obj_type ) { - throw utility::excn::EXCN_Msg_Exception("JSON error: expected an object for user_flag member:'" + json_user_flag.first ); + throw CREATE_EXCEPTION(utility::excn::Exception, "JSON error: expected an object for user_flag member:'" + json_user_flag.first ); }; const mObject &flag = json_user_flag.second.get_obj(); if ( has_value( flag, "value" ) ) { @@ -391,11 +391,11 @@ void JSON_RPC::load_new_set_of_virtual_files( const mArray &json_user_files , bo std::cout << json_user_file.type() << std::endl; std::cerr << __FILE__ << __LINE__ << std::endl; if ( json_user_file.type() != obj_type ) { - throw utility::excn::EXCN_Msg_Exception("JSON error: expected an object for user_file member:'"); + throw CREATE_EXCEPTION(utility::excn::Exception, "JSON error: expected an object for user_file member:'"); }; const mObject &flag = json_user_file.get_obj(); if ( !has_value( flag, "filename" ) ) { - throw utility::excn::EXCN_Msg_Exception("JSON error: Syntax error in user_files field: 'filename' missing "); + throw CREATE_EXCEPTION(utility::excn::Exception, "JSON error: Syntax error in user_files field: 'filename' missing "); } if ( !has_value( flag, "contents" ) ) { TR.Error << "Filename " << get_string( flag, "filename" ) << " is missing content field - assuming empty file " << std::endl; diff --git a/source/src/protocols/seeded_abinitio/CloseFold.cc b/source/src/protocols/seeded_abinitio/CloseFold.cc index 00ac6fd0d3..ca220c0f31 100644 --- a/source/src/protocols/seeded_abinitio/CloseFold.cc +++ b/source/src/protocols/seeded_abinitio/CloseFold.cc @@ -447,7 +447,7 @@ CloseFold::parse_my_tag( } if ( !tag->hasOption("fragments") ) { - throw utility::excn::EXCN_RosettaScriptsOption("need to supply fragments...currently still not accessing the general fragment pool" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "need to supply fragments...currently still not accessing the general fragment pool" ); } //adding the LoopOP to the data map diff --git a/source/src/protocols/simple_filters/AtomicDistanceFilter.cc b/source/src/protocols/simple_filters/AtomicDistanceFilter.cc index 06af2aae0f..cdd3faa14a 100644 --- a/source/src/protocols/simple_filters/AtomicDistanceFilter.cc +++ b/source/src/protocols/simple_filters/AtomicDistanceFilter.cc @@ -147,16 +147,16 @@ void AtomicDistanceFilter::parse_my_tag( utility::tag::TagCOP tag, if ( residue1_ == 0 ) { TR << "Residue number "<hasOption( "atomtype1" ) ) { if ( tag->hasOption( "atomname1" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't set both atomname1 and atomtype1. Check xml file"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't set both atomname1 and atomtype1. Check xml file"); } atomdesg1_ = tag->getOption< std::string >( "atomtype1" ); astype1_ = true; @@ -167,7 +167,7 @@ void AtomicDistanceFilter::parse_my_tag( utility::tag::TagCOP tag, if ( tag->hasOption( "atomtype2" ) ) { if ( tag->hasOption( "atomname2" ) ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can't set both atomname2 and atomtype2. Check xml file"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can't set both atomname2 and atomtype2. Check xml file"); } atomdesg2_ = tag->getOption< std::string >( "atomtype2" ); astype2_ = true; diff --git a/source/src/protocols/simple_filters/ConstraintScoreFilter.cc b/source/src/protocols/simple_filters/ConstraintScoreFilter.cc index dfa40fec44..071108ebda 100644 --- a/source/src/protocols/simple_filters/ConstraintScoreFilter.cc +++ b/source/src/protocols/simple_filters/ConstraintScoreFilter.cc @@ -62,7 +62,7 @@ ConstraintScoreFilter::parse_my_tag( std::stringstream msg; msg << "ConstraintScoreFilter requires the constraint_generators' option. No constraint generators are current set." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } diff --git a/source/src/protocols/simple_filters/DdgFilter.cc b/source/src/protocols/simple_filters/DdgFilter.cc index b09f0d3375..a03e72e044 100644 --- a/source/src/protocols/simple_filters/DdgFilter.cc +++ b/source/src/protocols/simple_filters/DdgFilter.cc @@ -159,7 +159,7 @@ DdgFilter::parse_my_tag( utility::tag::TagCOP tag, } if ( repeats() > 1 && !repack() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ERROR: it doesn't make sense to have repeats if repack is false, since the values converge very well." ); } TR diff --git a/source/src/protocols/simple_filters/HolesFilter.cc b/source/src/protocols/simple_filters/HolesFilter.cc index 6b848100f3..9f281e3612 100644 --- a/source/src/protocols/simple_filters/HolesFilter.cc +++ b/source/src/protocols/simple_filters/HolesFilter.cc @@ -206,9 +206,9 @@ HolesFilter::parse_my_tag( core::select::residue_selector::ResidueSelectorCOP selector; try { selector = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::string error_message = "Failed to find ResidueSelector named '" + selector_name + "' from the Datamap from AddCompositionConstraintMover::parse_tag()\n" + e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_message ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message ); } runtime_assert( selector ); residue_selector_ = selector->clone(); diff --git a/source/src/protocols/simple_filters/InterfaceBindingEnergyDensityFilter.cc b/source/src/protocols/simple_filters/InterfaceBindingEnergyDensityFilter.cc index 85284af4e4..ba6d49c256 100644 --- a/source/src/protocols/simple_filters/InterfaceBindingEnergyDensityFilter.cc +++ b/source/src/protocols/simple_filters/InterfaceBindingEnergyDensityFilter.cc @@ -98,32 +98,32 @@ InterfaceBindingEnergyDensityFilter::parse_my_tag( ) { if ( ! tag->hasOption("sasa_filter") ) { - throw utility::excn::EXCN_RosettaScriptsOption( "InterfaceBindingEnergyDensityFilter requires the sasa_filter option" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "InterfaceBindingEnergyDensityFilter requires the sasa_filter option" ); } if ( ! tag->hasOption("ddG_filter") ) { - throw utility::excn::EXCN_RosettaScriptsOption( "InterfaceBindingEnergyDensityFilter requires the ddG_filter option" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "InterfaceBindingEnergyDensityFilter requires the ddG_filter option" ); } std::string sasa_filter_name = tag->getOption< std::string> ("sasa_filter"); auto sasaiter = filters_map.find( sasa_filter_name ); if ( sasaiter == filters_map.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Could not locate requested sasa_filter with name " + sasa_filter_name + " in the Filters_map." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Could not locate requested sasa_filter with name " + sasa_filter_name + " in the Filters_map." ); } filters::FilterOP sasafilter_baseptr = sasaiter->second; sasa_filter_ = utility::pointer::dynamic_pointer_cast< protocols::simple_filters::InterfaceSasaFilter > ( sasafilter_baseptr ); if ( ! sasa_filter_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Dynamic cast of filter " + sasa_filter_name + " to type InterfaceSasaFilter failed" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Dynamic cast of filter " + sasa_filter_name + " to type InterfaceSasaFilter failed" ); } std::string ddG_filter_name = tag->getOption< std::string> ("ddG_filter"); auto ddGiter = filters_map.find( ddG_filter_name ); if ( ddGiter == filters_map.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Could not locate requested ddG_filter with name " + ddG_filter_name + " in the Filters_map." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Could not locate requested ddG_filter with name " + ddG_filter_name + " in the Filters_map." ); } filters::FilterOP ddGfilter_baseptr = ddGiter->second; ddG_filter_ = utility::pointer::dynamic_pointer_cast< protocols::simple_filters::DdgFilter > ( ddGfilter_baseptr ); if ( ! ddG_filter_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Dynamic cast of filter " + ddG_filter_name + " to type DdgFilter failed" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Dynamic cast of filter " + ddG_filter_name + " to type DdgFilter failed" ); } upper_threshold_ = tag->getOption< core::Real > ("threshold", -0.015 ); diff --git a/source/src/protocols/simple_filters/InterfaceSasaFilter.cc b/source/src/protocols/simple_filters/InterfaceSasaFilter.cc index c9806c3c1b..177343b020 100644 --- a/source/src/protocols/simple_filters/InterfaceSasaFilter.cc +++ b/source/src/protocols/simple_filters/InterfaceSasaFilter.cc @@ -101,7 +101,7 @@ InterfaceSasaFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::D if ( specified_jumps != "" && specified_sym_dof_names != "" ) { TR.Error << "Can not specify 'jump' and 'sym_dof_names' in InterfaceSasaFilter" << tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "Can not specify 'jump' and 'sym_dof_names' in InterfaceSasaFilter" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can not specify 'jump' and 'sym_dof_names' in InterfaceSasaFilter" ); } else if ( specified_jumps != "" ) { // Populate jumps_ with str->int converstions of the jump list. TR.Debug << "Reading jump list: " << specified_jumps << std::endl; @@ -140,12 +140,12 @@ InterfaceSasaFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::D if ( polar_ && hydrophobic_ ) { TR.Error << "Polar and hydrophobic flags specified in Sasa filter: " << tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "Polar and hydrophobic flags specified in Sasa filter." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Polar and hydrophobic flags specified in Sasa filter." ); } if ( ( polar_ || hydrophobic_ ) && (jumps_.size() != 1 || jumps_[1] != 1) ) { TR.Error << "Only total sasa is supported across a jump other than 1. Remove polar and hydrophobic flags and try again: " << tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "Only total sasa is supported across a jump other than 1. Remove polar and hydrophobic flags and try again." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Only total sasa is supported across a jump other than 1. Remove polar and hydrophobic flags and try again." ); } TR.Debug << "Parsed Sasa Filter: hasOption( "threshold" ) ) throw utility::excn::EXCN_RosettaScriptsOption("Must specify 'threshold' for NMerPSSMEnergyFilter."); + if ( ! tag->hasOption( "threshold" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify 'threshold' for NMerPSSMEnergyFilter."); score_type_threshold_ = tag->getOption< core::Real >( "threshold" ); if ( tag->hasOption( "pssm_fname" ) ) energy_method_.read_nmer_pssm( tag->getOption< std::string >( "pssm_fname" ) ); diff --git a/source/src/protocols/simple_filters/NMerSVMEnergyFilter.cc b/source/src/protocols/simple_filters/NMerSVMEnergyFilter.cc index 838cc0f31d..b89ed1ebd7 100644 --- a/source/src/protocols/simple_filters/NMerSVMEnergyFilter.cc +++ b/source/src/protocols/simple_filters/NMerSVMEnergyFilter.cc @@ -82,7 +82,7 @@ NMerSVMEnergyFilter::~NMerSVMEnergyFilter() = default; void NMerSVMEnergyFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap & /*data*/, filters::Filters_map const &, moves::Movers_map const &, core::pose::Pose const & ) { - if ( ! tag->hasOption( "threshold" ) ) throw utility::excn::EXCN_RosettaScriptsOption("Must specify 'threshold' for NMerSVMEnergyFilter."); + if ( ! tag->hasOption( "threshold" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify 'threshold' for NMerSVMEnergyFilter."); score_type_threshold_ = tag->getOption< core::Real >( "threshold" ); if ( tag->hasOption( "svm_fname" ) ) energy_method_.read_nmer_svm( tag->getOption< std::string >( "svm_fname" ) ); diff --git a/source/src/protocols/simple_filters/RangeFilter.cc b/source/src/protocols/simple_filters/RangeFilter.cc index d8bfa0875f..e3557a4f6f 100644 --- a/source/src/protocols/simple_filters/RangeFilter.cc +++ b/source/src/protocols/simple_filters/RangeFilter.cc @@ -93,7 +93,7 @@ RangeFilter::parse_my_tag( std::string const filter_name( tag->getOption< std::string >( "filter") ); auto filter_it( filters.find( filter_name ) ); if ( filter_it == filters.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Filter "+filter_name+" not found" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Filter "+filter_name+" not found" ); } filter_ = filter_it->second; diff --git a/source/src/protocols/simple_filters/RepeatParameterFilter.cc b/source/src/protocols/simple_filters/RepeatParameterFilter.cc index 04709722d0..07b0ba1b21 100644 --- a/source/src/protocols/simple_filters/RepeatParameterFilter.cc +++ b/source/src/protocols/simple_filters/RepeatParameterFilter.cc @@ -88,7 +88,7 @@ bool RepeatParameterFilter::apply( core::pose::Pose const & pose ) const { } } } - throw utility::excn::EXCN_RosettaScriptsOption("Execution should not have gotten here!"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Execution should not have gotten here!"); return(true); } @@ -115,7 +115,7 @@ core::Real RepeatParameterFilter::report_sm(const core::pose::Pose & pose ) cons if ( param_type_=="omega" ) { return(omega); } - throw utility::excn::EXCN_RosettaScriptsOption("Execution should not have gotten here. "); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Execution should not have gotten here. "); return(true); } @@ -259,16 +259,16 @@ void RepeatParameterFilter::calculate_helical_parameters_helper( core::pose::Pos void RepeatParameterFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataMap &, filters::Filters_map const &, moves::Movers_map const &, core::pose::Pose const & ){ if ( !tag->hasOption("numb_repeats") ) { - throw utility::excn::EXCN_RosettaScriptsOption("RepeatPrarameter filter requires the number of repeats be entered with numb_repeats tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RepeatPrarameter filter requires the number of repeats be entered with numb_repeats tag"); } numb_repeats_ = tag->getOption("numb_repeats"); startAtRepeat_ = tag->getOption("start_at_repeat",1); if ( startAtRepeat_+1>numb_repeats_ ) { - throw utility::excn::EXCN_RosettaScriptsOption("start_at_repeat must be atleast 1 smaller then the number of repeats "); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "start_at_repeat must be atleast 1 smaller then the number of repeats "); } param_type_ = tag->getOption("param_type"); if ( !(param_type_=="radius" || param_type_=="rise" || param_type_=="omega" || param_type_=="handedness") ) { - throw utility::excn::EXCN_RosettaScriptsOption("RepeatPrarameter filter requires one of 4 param_type = radius,rise,omega or handedness"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "RepeatPrarameter filter requires one of 4 param_type = radius,rise,omega or handedness"); } if ( param_type_=="radius" || param_type_=="rise" || param_type_=="omega" ) { min_=-9999; diff --git a/source/src/protocols/simple_filters/ResidueIEFilter.cc b/source/src/protocols/simple_filters/ResidueIEFilter.cc index 2fde429605..dfc301a5e2 100644 --- a/source/src/protocols/simple_filters/ResidueIEFilter.cc +++ b/source/src/protocols/simple_filters/ResidueIEFilter.cc @@ -176,11 +176,11 @@ ResidueIEFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataM std::string const selector_name = tag->getOption< std::string >( "selector" ); try { selector_ = data.get_ptr< core::select::residue_selector::ResidueSelector const >( "ResidueSelector", selector_name ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch ( utility::excn::Exception & e ) { std::stringstream error_msg; error_msg << "Failed to find ResidueSelector named '" << selector_name << "' from the Datamap from DisulfidizeMover.\n"; error_msg << e.msg(); - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } debug_assert( selector_ ); tr << "Using residue selector " << selector_name << std::endl; @@ -427,7 +427,7 @@ ResidueIEFilter::compute_resnums( core::pose::Pose const & pose ) const if ( pose.conformation().num_chains() < 2 ) { std::stringstream msg; msg << "ResidueIEFilter: pose must contain at least two chains! The given pose has " << pose.size() << " and " << pose.conformation().num_chains() << " chains" << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } core::pose::Pose in_pose = pose; diff --git a/source/src/protocols/simple_filters/ResidueSetChainEnergyFilter.cc b/source/src/protocols/simple_filters/ResidueSetChainEnergyFilter.cc index 69b886c34a..1e740c6aed 100644 --- a/source/src/protocols/simple_filters/ResidueSetChainEnergyFilter.cc +++ b/source/src/protocols/simple_filters/ResidueSetChainEnergyFilter.cc @@ -89,7 +89,7 @@ ResidueSetChainEnergyFilter::parse_my_tag( utility::tag::TagCOP tag, basic::data scorefxn_ = protocols::rosetta_scripts::parse_score_function( tag, data )->clone(); score_type_ = core::scoring::score_type_from_name( tag->getOption( "score_type", "total_score" ) ); - if ( ! tag->hasOption( "threshold" ) ) throw utility::excn::EXCN_RosettaScriptsOption("Must specify 'threshold' for ResidueSetChainEnergyFilter."); + if ( ! tag->hasOption( "threshold" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify 'threshold' for ResidueSetChainEnergyFilter."); score_type_threshold_ = tag->getOption< core::Real >( "threshold" ); TR<< "filter for score_type "<< score_type_ <<" with threshold "<< score_type_threshold_ << std::endl; diff --git a/source/src/protocols/simple_filters/RotamerBoltzmannWeight2.cc b/source/src/protocols/simple_filters/RotamerBoltzmannWeight2.cc index 13516e9676..e2d8548f1c 100644 --- a/source/src/protocols/simple_filters/RotamerBoltzmannWeight2.cc +++ b/source/src/protocols/simple_filters/RotamerBoltzmannWeight2.cc @@ -89,7 +89,7 @@ RotamerBoltzmannWeight2::parse_my_tag( std::stringstream msg; msg << "RotamerBoltzmannWeight2::parse_my_tag(): invalid probability_type specified: " << probability_type << std::endl; msg << "Valid score types are: BOLTZMANN_SUM, PNEAR" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } @@ -105,7 +105,7 @@ RotamerBoltzmannWeight2::parse_my_tag( std::stringstream msg; msg << "RotamerBoltzmannWeight2::parse_my_tag(): invalid score_type specified: " << score_type << std::endl; msg << "Valid score types are: MEAN_PROBABILITY, MAX_PROBABILITY, MODIFIED_DDG" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } diff --git a/source/src/protocols/simple_filters/ScoreTypeFilter.cc b/source/src/protocols/simple_filters/ScoreTypeFilter.cc index d4db704efa..cb4c387e30 100644 --- a/source/src/protocols/simple_filters/ScoreTypeFilter.cc +++ b/source/src/protocols/simple_filters/ScoreTypeFilter.cc @@ -101,7 +101,7 @@ ScoreTypeFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataM set_score_type( core::scoring::score_type_from_name( tag->getOption( "score_type", "total_score" ) ) ); - if ( ! tag->hasOption( "threshold" ) ) throw utility::excn::EXCN_RosettaScriptsOption("Must specify 'threshold' for ScoreTypeFilter."); + if ( ! tag->hasOption( "threshold" ) ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify 'threshold' for ScoreTypeFilter."); set_threshold( tag->getOption( "threshold" ) ); score_type_filter_tracer << "ScoreType filter for score_type " << score_type_ << " with threshold " << score_type_threshold_<< "." << std::endl; diff --git a/source/src/protocols/simple_filters/ShapeComplementarityFilter.cc b/source/src/protocols/simple_filters/ShapeComplementarityFilter.cc index 72796a13b8..b448d6258e 100644 --- a/source/src/protocols/simple_filters/ShapeComplementarityFilter.cc +++ b/source/src/protocols/simple_filters/ShapeComplementarityFilter.cc @@ -121,7 +121,7 @@ ShapeComplementarityFilter::compute( Pose const & pose ) const ShapeComplementarityCalculator scc; if ( !scc.Init() ) { - throw EXCN_InitFailed(); + throw CREATE_EXCEPTION(EXCN_InitFailed, ""); } if ( quick_ ) { @@ -136,24 +136,24 @@ ShapeComplementarityFilter::compute( Pose const & pose ) const // selector-based setup_from_selectors( pose, scc ); if ( !scc.Calc() ) { - throw EXCN_CalcFailed(); + throw CREATE_EXCEPTION(EXCN_CalcFailed, ""); } } else if ( !symm ) { // jump-based if ( !scc.Calc( pose, jump_id_ ) ) { - throw EXCN_CalcFailed(); + throw CREATE_EXCEPTION(EXCN_CalcFailed, ""); } } else if ( multicomp_ ) { // MULTI COMPONENT SYMM setup_multi_component_symm( pose, scc, nsubs_scalefactor ); if ( !scc.Calc() ) { - throw EXCN_CalcFailed(); + throw CREATE_EXCEPTION(EXCN_CalcFailed, ""); } } else { // SINGLE COMPONENT SYMM setup_single_component_symm( pose, scc, nsubs_scalefactor ); if ( !scc.Calc() ) { - throw EXCN_CalcFailed(); + throw CREATE_EXCEPTION(EXCN_CalcFailed, ""); } } diff --git a/source/src/protocols/simple_filters/ShapeComplementarityFilter.hh b/source/src/protocols/simple_filters/ShapeComplementarityFilter.hh index 9c5eb5fc7e..ff9003105e 100644 --- a/source/src/protocols/simple_filters/ShapeComplementarityFilter.hh +++ b/source/src/protocols/simple_filters/ShapeComplementarityFilter.hh @@ -35,7 +35,7 @@ #include #include -#include +#include #include @@ -190,15 +190,15 @@ private: }; /// @brief Super-simple exception to be thrown when we can't initialize the SC calculator -class EXCN_InitFailed : public utility::excn::EXCN_Base { +class EXCN_InitFailed : public utility::excn::Exception { public: - void show( std::ostream & ) const override {} + using utility::excn::Exception::Exception; }; /// @brief Super-simple exception to be thrown when the SC calculator fails to compute -class EXCN_CalcFailed : public utility::excn::EXCN_Base { +class EXCN_CalcFailed : public utility::excn::Exception { public: - void show( std::ostream & ) const override {} + using utility::excn::Exception::Exception; }; } // filters diff --git a/source/src/protocols/simple_filters/TotalSasaFilter.cc b/source/src/protocols/simple_filters/TotalSasaFilter.cc index 3b61c47a3a..32a5fc806b 100644 --- a/source/src/protocols/simple_filters/TotalSasaFilter.cc +++ b/source/src/protocols/simple_filters/TotalSasaFilter.cc @@ -105,7 +105,7 @@ TotalSasaFilter::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::DataM if ( polar_ && hydrophobic_ ) { TR.Error << "Polar and hydrophobic both flags specified in TotalSasa filter: " << tag << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( "Polar and hydrophobic flags specified in TotalSasa filter." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Polar and hydrophobic flags specified in TotalSasa filter." ); } TR.Debug << "Parsed TotalSasa Filter: apply( pose ); @@ -338,7 +338,7 @@ AddConstraintsToCurrentConformationMover::parse_my_tag( if ( tag->hasOption( "task_operations" ) && tag->hasOption( "residue_selector" ) ) { std::stringstream msg; msg << "AddConstraintsToCurrentConformationMover::parse_my_tag(): 'task_operations' and 'residue_selector' cannot both be specified." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, msg.str() ); } } diff --git a/source/src/protocols/simple_moves/AddJobPairData.cc b/source/src/protocols/simple_moves/AddJobPairData.cc index 159b4b5c13..f7884efe9e 100644 --- a/source/src/protocols/simple_moves/AddJobPairData.cc +++ b/source/src/protocols/simple_moves/AddJobPairData.cc @@ -114,16 +114,16 @@ void AddJobPairData::parse_my_tag( Pose const & ) { if ( !tag->hasOption("value_type") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' mover requires option 'value_type'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' mover requires option 'value_type'"); } if ( !tag->hasOption("key") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' mover requires option 'key'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' mover requires option 'key'"); } if ( !tag->hasOption("value") && !tag->hasOption("value_from_ligand_chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' mover requires option 'value' or 'value_from_ligand_chain'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' mover requires option 'value' or 'value_from_ligand_chain'"); } if ( tag->hasOption("value") && tag->hasOption("value_from_ligand_chain") ) { - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' mover requires option 'value' or 'value_from_ligand_chain' but not both"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' mover requires option 'value' or 'value_from_ligand_chain' but not both"); } ligand_chain_ = tag->getOption("value_from_ligand_chain",""); @@ -136,7 +136,7 @@ void AddJobPairData::parse_my_tag( value_type_ = real_value; } else { TR.Fatal << "Value type of '" << value_type_string << "' not supported in AddJobPairData." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' option 'value_type' can only be 'string' or 'real'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' option 'value_type' can only be 'string' or 'real'"); } string_key_ = tag->getOption("key"); @@ -148,7 +148,7 @@ void AddJobPairData::parse_my_tag( } else { // If this happens all the error checking code above is wrong TR.Fatal << "Can't handle value type of '" << value_type_ << "'" << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("'AddJobPairData' option 'value_type' can only be 'string' or 'real'"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'AddJobPairData' option 'value_type' can only be 'string' or 'real'"); } } } diff --git a/source/src/protocols/simple_moves/BBDihedralSamplerMover.cc b/source/src/protocols/simple_moves/BBDihedralSamplerMover.cc index e7f93637b8..51b5304d53 100644 --- a/source/src/protocols/simple_moves/BBDihedralSamplerMover.cc +++ b/source/src/protocols/simple_moves/BBDihedralSamplerMover.cc @@ -277,7 +277,7 @@ BBDihedralSamplerMover::apply( core::pose::Pose & pose ){ sampler->set_torsion_to_pose( pose, resnum ); set_last_move_status(protocols::moves::MS_SUCCESS); - } catch ( utility::excn::EXCN_Base& excn ) { + } catch ( utility::excn::Exception& excn ) { TR.Error<< "Could not set torsion for resnum "<< resnum << std::endl; set_last_move_status(protocols::moves::MS_FAIL); diff --git a/source/src/protocols/simple_moves/BBGaussianMover.cc b/source/src/protocols/simple_moves/BBGaussianMover.cc index b48f0cc8dc..f77bce5859 100644 --- a/source/src/protocols/simple_moves/BBGaussianMover.cc +++ b/source/src/protocols/simple_moves/BBGaussianMover.cc @@ -266,7 +266,7 @@ void BBGaussianMover::setup_list(Pose const &pose) if ( use_all_pivot_res_ ) { if ( n_dof_angle_ != (n_pert_res_-nseg)*2 + (shrink_frag_ends_ ? 0 : 2*nseg) ) { TR.Debug << "DOF=" << n_dof_angle_ << " N_RES=" << n_pert_res_ << " N_SEG=" << nseg << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: dof and res number mismatch" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: dof and res number mismatch" ); } } //debug info @@ -312,7 +312,7 @@ core::Real BBGaussianMover::cholesky_fw(Matrix &a, Size n, Vector &delta, Vector if ( sum>0.0 ) { p[i]=sqrt(sum); } else { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: Cholesky decomposition failed, may be a wrong structure" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: Cholesky decomposition failed, may be a wrong structure" ); } } else { a[j][i]=sum/p[i]; @@ -350,7 +350,7 @@ core::Real BBGaussianMover::cholesky_bw(Matrix &a, Size n, Vector &dphi, Vector if ( sum>0.0 ) { p[i]=sqrt(sum); } else { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: Cholesky decomposition failed, may be a wrong structure" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: Cholesky decomposition failed, may be a wrong structure" ); } } else { a[j][i]=sum/p[i]; @@ -508,14 +508,14 @@ void BBGaussianMover::get_VdRdPhi(Pose const &pose) if ( rsd_end.has(end_atom_list_[i].second) ) { end_xyz = rsd_end.atom(end_atom_list_[i].second).xyz(); } else { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: No lock atom found on res (end)" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: No lock atom found on res (end)" ); } } else { conformation::Residue const & rsd_end( pose.residue( end_atom_list_[i].first ) ); if ( rsd_end.has(end_atom_list_[i].second) ) { end_xyz = rsd_end.atom(end_atom_list_[i].second).xyz(); } else { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: No lock atom found on res (lock)" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: No lock atom found on res (lock)" ); } } @@ -693,11 +693,11 @@ void BBGaussianMover::parse_my_tag( //check logic if ( use_all_pivot_res_ ) { if ( !fix_short_segment_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: use_all should go with fix_tail" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: use_all should go with fix_tail" ); } } else { if ( n_dof_angle_ != (n_pert_res_*2) ) { - throw utility::excn::EXCN_RosettaScriptsOption( " BBG: dof and res number mismatch" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, " BBG: dof and res number mismatch" ); } } diff --git a/source/src/protocols/simple_moves/BackboneMover.cc b/source/src/protocols/simple_moves/BackboneMover.cc index 418baa0546..d7720254b1 100644 --- a/source/src/protocols/simple_moves/BackboneMover.cc +++ b/source/src/protocols/simple_moves/BackboneMover.cc @@ -203,7 +203,7 @@ BackboneMover::parse_my_tag( core::select::residue_selector::ResidueSelectorCOP res_selector = protocols::rosetta_scripts::parse_residue_selector( tag, data ); if ( !res_selector ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ResidueSelector passed to Shear or Small backbone mover could not be found." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ResidueSelector passed to Shear or Small backbone mover could not be found." ); } selector( res_selector ); } @@ -211,7 +211,7 @@ BackboneMover::parse_my_tag( core::scoring::ScoreFunctionOP sfx = protocols::rosetta_scripts::parse_score_function( tag, data ); if ( !sfx ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Scorefxn passed to Shear or Small backbone mover could not be found." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Scorefxn passed to Shear or Small backbone mover could not be found." ); } scorefxn( sfx->clone() ); } diff --git a/source/src/protocols/simple_moves/ConvertRealToVirtualMover.cc b/source/src/protocols/simple_moves/ConvertRealToVirtualMover.cc index 94a7469ffa..e520688133 100644 --- a/source/src/protocols/simple_moves/ConvertRealToVirtualMover.cc +++ b/source/src/protocols/simple_moves/ConvertRealToVirtualMover.cc @@ -85,7 +85,7 @@ ConvertRealToVirtualMover::parse_my_tag( // set the selector_ private variable selector_ = protocols::rosetta_scripts::parse_residue_selector( tag, data ); if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ResidueSelector passed to FaToVirtual mover could not be found." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ResidueSelector passed to FaToVirtual mover could not be found." ); } } } diff --git a/source/src/protocols/simple_moves/ConvertVirtualToRealMover.cc b/source/src/protocols/simple_moves/ConvertVirtualToRealMover.cc index 590dd90b23..485643ed4b 100644 --- a/source/src/protocols/simple_moves/ConvertVirtualToRealMover.cc +++ b/source/src/protocols/simple_moves/ConvertVirtualToRealMover.cc @@ -80,7 +80,7 @@ ConvertVirtualToRealMover::parse_my_tag( // set the selector_ private variable selector_ = protocols::rosetta_scripts::parse_residue_selector( tag, data ); if ( !selector_ ) { - throw utility::excn::EXCN_RosettaScriptsOption( "ResidueSelector passed to VirtualToFa mover could not be found." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ResidueSelector passed to VirtualToFa mover could not be found." ); } } } diff --git a/source/src/protocols/simple_moves/ExtendedPoseMover.cc b/source/src/protocols/simple_moves/ExtendedPoseMover.cc index e2f7bd2a50..24977159b6 100644 --- a/source/src/protocols/simple_moves/ExtendedPoseMover.cc +++ b/source/src/protocols/simple_moves/ExtendedPoseMover.cc @@ -123,7 +123,7 @@ void ExtendedPoseMover::parse_my_tag(const utility::tag::TagCOP tag, if ( sequences.size() > 1 ) { std::ostringstream ss; ss << "In " << tag->getOption< string >( "name" ) << ": The fasta file " << tag->getOption< string >( "fasta" ) << " contained >1 sequence; using the first one only. Use multiple ExtendedPoseMovers for multiple chains." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption( ss.str() ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ss.str() ); } } else if ( tag->hasOption( "sequence" ) ) { sequence( tag->getOption( "sequence" ) ); @@ -131,7 +131,7 @@ void ExtendedPoseMover::parse_my_tag(const utility::tag::TagCOP tag, string filename = basic::options::option[ basic::options::OptionKeys::in::file::fasta ]()[1]; sequence( read_fasta_file( filename ).front()->sequence() ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("Failed to specify required option `sequence` or fasta file"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Failed to specify required option `sequence` or fasta file"); } // additional options @@ -141,7 +141,7 @@ void ExtendedPoseMover::parse_my_tag(const utility::tag::TagCOP tag, chain( tag->getOption< string >( "chain", "" ) ); if ( chain().length() != 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption( chain()+" is an invalid chain code in "+tag->getOption< string >( "name" )+"." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, chain()+" is an invalid chain code in "+tag->getOption< string >( "name" )+"." ); } } diff --git a/source/src/protocols/simple_moves/FavorSequenceProfile.cc b/source/src/protocols/simple_moves/FavorSequenceProfile.cc index e4c104508e..d9c1f14f9b 100644 --- a/source/src/protocols/simple_moves/FavorSequenceProfile.cc +++ b/source/src/protocols/simple_moves/FavorSequenceProfile.cc @@ -192,13 +192,13 @@ FavorSequenceProfile::parse_my_tag( utility::tag::TagCOP tag, basic::datacache:: if ( tag->hasOption("pdbname") ) ++num_struct; if ( ! num_struct && ! tag->hasOption("pssm") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Must set one of 'pssm', 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must set one of 'pssm', 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); } if ( num_struct && tag->hasOption("pssm") ) { - throw utility::excn::EXCN_RosettaScriptsOption("Cannot set both 'pssm' and one of 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Cannot set both 'pssm' and one of 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); } if ( num_struct > 1 ) { - throw utility::excn::EXCN_RosettaScriptsOption("Can only set one of 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Can only set one of 'use_native', 'use_fasta', 'use_starting', 'use_current', or 'pdbname' in FavorSequenceProfile"); } if ( tag->hasOption("matrix") && tag->hasOption("pssm") ) { TR.Warning << "In option matrix not used with pssm specification." << std::endl; diff --git a/source/src/protocols/simple_moves/FavorSymmetricSequence.cc b/source/src/protocols/simple_moves/FavorSymmetricSequence.cc index aecffe9cb6..efc860964e 100644 --- a/source/src/protocols/simple_moves/FavorSymmetricSequence.cc +++ b/source/src/protocols/simple_moves/FavorSymmetricSequence.cc @@ -89,14 +89,14 @@ void FavorSymmetricSequence::parse_my_tag( protocols::moves::Movers_map const & , core::pose::Pose const & ) { - if ( ! tag->hasOption("penalty") ) throw utility::excn::EXCN_RosettaScriptsOption("'FavorSymmetricSequence' mover requires penalty tag"); - if ( ! tag->hasOption("symmetric_units") ) throw utility::excn::EXCN_RosettaScriptsOption("'FavorSymmetricSequence' mover requires symmetric_units tag"); + if ( ! tag->hasOption("penalty") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'FavorSymmetricSequence' mover requires penalty tag"); + if ( ! tag->hasOption("symmetric_units") ) throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'FavorSymmetricSequence' mover requires symmetric_units tag"); penalty_ = tag->getOption("penalty"); symmetric_units_ = tag->getOption("symmetric_units"); if ( symmetric_units_ < 2 ) { - throw utility::excn::EXCN_RosettaScriptsOption("'FavorSymmetricSequence' symmetric_units tag should specify at least 2 symmetric units"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "'FavorSymmetricSequence' symmetric_units tag should specify at least 2 symmetric units"); } for ( std::map< std::string, utility::pointer::ReferenceCountOP >::const_iterator it = (data)[ "scorefxns" ].begin(); it!=(data)[ "scorefxns" ].end(); ++it ) { diff --git a/source/src/protocols/simple_moves/FindConsensusSequence.cc b/source/src/protocols/simple_moves/FindConsensusSequence.cc index 9103f7f6ca..d003e264cb 100644 --- a/source/src/protocols/simple_moves/FindConsensusSequence.cc +++ b/source/src/protocols/simple_moves/FindConsensusSequence.cc @@ -90,7 +90,7 @@ void FindConsensusSequence::parse_my_tag( if ( datamap.has( "scorefxns", scorefxn_key ) ) { sfxn_ = datamap.get_ptr< core::scoring::ScoreFunction >( "scorefxns", scorefxn_key ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); } } @@ -172,7 +172,7 @@ FindConsensusSequence::resfile_at ( core::Size index ) { void FindConsensusSequence::apply( core::pose::Pose & /*pose*/ ) { if ( poses_.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: no poses initialized. Did you try to run this from Rosetta Scripts? That's not supported right now"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: no poses initialized. Did you try to run this from Rosetta Scripts? That's not supported right now"); } using namespace core::pack::task; simple_moves::PackRotamersMoverOP packer ( new simple_moves::PackRotamersMover ); diff --git a/source/src/protocols/simple_moves/GenericMonteCarloMover.cc b/source/src/protocols/simple_moves/GenericMonteCarloMover.cc index f993ab78bb..8f64ee1918 100644 --- a/source/src/protocols/simple_moves/GenericMonteCarloMover.cc +++ b/source/src/protocols/simple_moves/GenericMonteCarloMover.cc @@ -820,7 +820,7 @@ GenericMonteCarloMover::apply( Pose & pose ) ParsedProtocolOP mover_pp( utility::pointer::dynamic_pointer_cast< protocols::rosetta_scripts::ParsedProtocol > ( mover_ ) ); // if the mover isn't a parsed protocol, mover_pp will be NULL and adaptive_movers basically does nothing -- we throw an error if ( adaptive_movers() && !mover_pp ) { - throw utility::excn::EXCN_BadInput( "In GenericMonteCarlo, adaptive_movers is true, but the user-specified mover is not a ParsedProtocol. The user-specified mover must be a ParsedProtocol in order to use adaptive_movers." ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "In GenericMonteCarlo, adaptive_movers is true, but the user-specified mover is not a ParsedProtocol. The user-specified mover must be a ParsedProtocol in order to use adaptive_movers." ); } if ( adaptive_movers() ) { diff --git a/source/src/protocols/simple_moves/MSDMover.cc b/source/src/protocols/simple_moves/MSDMover.cc index f8422ced71..e745254428 100644 --- a/source/src/protocols/simple_moves/MSDMover.cc +++ b/source/src/protocols/simple_moves/MSDMover.cc @@ -126,11 +126,11 @@ void MSDMover::setup_mover ( core::pose::Pose & pose ) { // Set up movers, resfiles, packer tasks, throw exceptions, etc. if ( poses_.size() == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: no poses initialized. If you run MSDMover from RosettaScripts you need to pass the -run:msd_job_dist flag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: no poses initialized. If you run MSDMover from RosettaScripts you need to pass the -run:msd_job_dist flag"); } if ( !design_mover_ ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: MSD Mover must have design mover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: MSD Mover must have design mover"); } // Find index of your apply pose in the pose vector @@ -138,7 +138,7 @@ MSDMover::setup_mover ( core::pose::Pose & pose ) { core::Real ref_pose_index; bool return_value = core::pose::getPoseExtraScore( pose, "msd_job_dist_index", ref_pose_index ); if ( !return_value ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: poses are not indexed correctly. If you run MSDMover from RosettaScripts you need to pass the -run:msd_job_dist flag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: poses are not indexed correctly. If you run MSDMover from RosettaScripts you need to pass the -run:msd_job_dist flag"); } for ( core::Size i = 1; i <= poses_.size(); ++i ) { core::Real current_pose_index; @@ -151,7 +151,7 @@ MSDMover::setup_mover ( core::pose::Pose & pose ) { } if ( current_pose_ == 0 ) { - throw utility::excn::EXCN_RosettaScriptsOption("Error: pose not found in vector. Strange..."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: pose not found in vector. Strange..."); } update_packer_task(); parse_resfiles(); @@ -172,23 +172,23 @@ void MSDMover::parse_my_tag( auto find_mover = movers.find( design_mover_key ); if ( find_mover == movers.end() && design_mover_key != "" ) { - throw utility::excn::EXCN_RosettaScriptsOption("Mover " + design_mover_key + " not found in data map"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Mover " + design_mover_key + " not found in data map"); } design_mover_ =find_mover->second; } else { // throw exception if there's no design mover specified - throw utility::excn::EXCN_RosettaScriptsOption("Error: MSD Mover must have design mover"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: MSD Mover must have design mover"); } if ( tag->hasOption( "resfiles" ) ) { resfiles_ = utility::string_split( tag->getOption( "resfiles" ), ',' ); } else { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: must provide resfile in MSD Mover tag" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: must provide resfile in MSD Mover tag" ); } if ( resfiles_.size() > 1 && design_mover_->get_name() != "PackRotamersMover" ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: multiple resfiles only supported for PackRotamersMover" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: multiple resfiles only supported for PackRotamersMover" ); } diff --git a/source/src/protocols/simple_moves/MergePDBMover.cc b/source/src/protocols/simple_moves/MergePDBMover.cc index ff1956c710..640b3e10f7 100644 --- a/source/src/protocols/simple_moves/MergePDBMover.cc +++ b/source/src/protocols/simple_moves/MergePDBMover.cc @@ -378,7 +378,7 @@ void MergePDBMover::parse_my_tag( if ( datamap.has( "scorefxns", scorefxn_key ) ) { sfxn_ = datamap.get_ptr< core::scoring::ScoreFunction >( "scorefxns", scorefxn_key ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); } } if ( tag->hasOption("task_operations") ) { diff --git a/source/src/protocols/simple_moves/ModifyVariantTypeMover.cc b/source/src/protocols/simple_moves/ModifyVariantTypeMover.cc index 403374b7ac..e0515a3fa9 100644 --- a/source/src/protocols/simple_moves/ModifyVariantTypeMover.cc +++ b/source/src/protocols/simple_moves/ModifyVariantTypeMover.cc @@ -143,7 +143,7 @@ void ModifyVariantTypeMover::parse_my_tag( if ( add_target_types_.size() == 0 && remove_target_types_.size() == 0 ) { TR.Error << "Must specify add_type and/or remove_type type in ModifyVariantTypeMover." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption("Must specify add_type and/or remove_type type in ModifyVariantTypeMover."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Must specify add_type and/or remove_type type in ModifyVariantTypeMover."); } if ( tag->hasOption( "residue_selector" ) ) { diff --git a/source/src/protocols/simple_moves/MonteCarloRecover.cc b/source/src/protocols/simple_moves/MonteCarloRecover.cc index 2ab14f2c73..d6ff9d8fff 100644 --- a/source/src/protocols/simple_moves/MonteCarloRecover.cc +++ b/source/src/protocols/simple_moves/MonteCarloRecover.cc @@ -109,7 +109,7 @@ MonteCarloRecover::parse_my_tag( TagCOP const tag, basic::datacache::DataMap &, std::string const mc_name( tag->getOption< std::string >( "MC_name" ) ); auto find_mover( movers.find( mc_name ) ); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "MC mover not found by MonteCarloRecover" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MC mover not found by MonteCarloRecover" ); } set_MC( utility::pointer::dynamic_pointer_cast< protocols::simple_moves::GenericMonteCarloMover > ( find_mover->second ) ); diff --git a/source/src/protocols/simple_moves/MonteCarloReset.cc b/source/src/protocols/simple_moves/MonteCarloReset.cc index 03bbda6cc3..2c148d0a87 100644 --- a/source/src/protocols/simple_moves/MonteCarloReset.cc +++ b/source/src/protocols/simple_moves/MonteCarloReset.cc @@ -86,7 +86,7 @@ MonteCarloReset::parse_my_tag( TagCOP const tag, basic::datacache::DataMap &, Fi std::string const mc_name( tag->getOption< std::string >( "MC_name" ) ); auto find_mover( movers.find( mc_name ) ); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "MC mover not found by MonteCarloReset" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MC mover not found by MonteCarloReset" ); } set_MC( utility::pointer::dynamic_pointer_cast< protocols::simple_moves::GenericMonteCarloMover > ( find_mover->second ) ); diff --git a/source/src/protocols/simple_moves/MonteCarloTest.cc b/source/src/protocols/simple_moves/MonteCarloTest.cc index 8ad8b2ce72..cd9d8ebfcd 100644 --- a/source/src/protocols/simple_moves/MonteCarloTest.cc +++ b/source/src/protocols/simple_moves/MonteCarloTest.cc @@ -109,7 +109,7 @@ MonteCarloTest::parse_my_tag( TagCOP const tag, basic::datacache::DataMap &, Fil std::string const mc_name( tag->getOption< std::string >( "MC_name" ) ); auto find_mover( movers.find( mc_name ) ); if ( find_mover == movers.end() ) { - throw utility::excn::EXCN_RosettaScriptsOption( "MC mover not found by MonteCarloTest" ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "MC mover not found by MonteCarloTest" ); } set_MC( utility::pointer::dynamic_pointer_cast< protocols::simple_moves::GenericMonteCarloMover > ( find_mover->second ) ); diff --git a/source/src/protocols/simple_moves/MutateResidue.cc b/source/src/protocols/simple_moves/MutateResidue.cc index 7d71c57de4..aadcb8af26 100644 --- a/source/src/protocols/simple_moves/MutateResidue.cc +++ b/source/src/protocols/simple_moves/MutateResidue.cc @@ -143,12 +143,12 @@ void MutateResidue::parse_my_tag( utility::tag::TagCOP tag, // Set target to the residue specified by "target_pdb_num" or "target_res_num": if ( !tag->hasOption("target") && !tag->hasOption("residue_selector") ) { TR.Error << "You need to define either a target residue using 'target' or a residue selector using 'residue_selector'." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } if ( tag->hasOption("target") && tag->hasOption("residue_selector") ) { TR.Error << "You can only degine a target residue using 'target' or a residue selector using 'residue_selector' but not both." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } if ( tag->hasOption("target") ) { @@ -159,7 +159,7 @@ void MutateResidue::parse_my_tag( utility::tag::TagCOP tag, //Set the identity of the new residue: if ( !tag->hasOption("new_res") ) { TR.Error << "no 'new_res' parameter specified." << std::endl; - throw utility::excn::EXCN_RosettaScriptsOption(""); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, ""); } set_res_name( tag->getOption("new_res") ); diff --git a/source/src/protocols/simple_moves/RepeatPropagationMover.cc b/source/src/protocols/simple_moves/RepeatPropagationMover.cc index e0e6783418..a9b3018540 100644 --- a/source/src/protocols/simple_moves/RepeatPropagationMover.cc +++ b/source/src/protocols/simple_moves/RepeatPropagationMover.cc @@ -129,7 +129,7 @@ RepeatPropagationMover::RepeatPropagationMover() : void RepeatPropagationMover::apply(core::pose::Pose & pose) { if ( pose.size()== last_res_ ) { - throw utility::excn::EXCN_RosettaScriptsOption("can not handle situation where last_res is being repeated (yet...)"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "can not handle situation where last_res is being repeated (yet...)"); } if ( orig_pdb_length_!=9999 ) { detect_last_repeat_residue(pose); @@ -714,7 +714,7 @@ void RepeatPropagationMover::parse_my_tag( utility::tag::TagCOP tag, ) { if ( !tag->hasOption("first_template_res") ) { - throw utility::excn::EXCN_RosettaScriptsOption("repeat mover requires the first residue be entered with first_res tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "repeat mover requires the first residue be entered with first_res tag"); } first_res_ = tag->getOption("first_template_res"); last_res_ = tag->getOption("last_template_res",9999); @@ -723,10 +723,10 @@ void RepeatPropagationMover::parse_my_tag( utility::tag::TagCOP tag, orig_number_repeats_ = atoi(detect_repeat_length_change_split[1].c_str()); orig_pdb_length_ = atoi(detect_repeat_length_change_split[2].c_str()); if ( !tag->hasOption("last_template_res") && orig_pdb_length_==9999 ) { - throw utility::excn::EXCN_RosettaScriptsOption("repeat mover requires the last residue to be entered with last_res tag or auto detected"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "repeat mover requires the last residue to be entered with last_res tag or auto detected"); } if ( !tag->hasOption("numb_repeats") ) { - throw utility::excn::EXCN_RosettaScriptsOption("repeat mover requires the number of repeats be entered with numb_repeats tag"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "repeat mover requires the number of repeats be entered with numb_repeats tag"); } numb_repeats_ = tag->getOption("numb_repeats"); deal_with_ideal_loop_closure_scar_ = false; @@ -743,7 +743,7 @@ void RepeatPropagationMover::parse_my_tag( utility::tag::TagCOP tag, cTerm_cap_size_=0; if ( maintain_cap_ ) { if ( (!tag->hasOption("nTerm_cap_size"))||(!tag->hasOption("cTerm_cap_size")) ) { - throw utility::excn::EXCN_RosettaScriptsOption("repeat mover requires cTerm_cap and nTerm_cap defined if trying to maintain cap sequence or structure"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "repeat mover requires cTerm_cap and nTerm_cap defined if trying to maintain cap sequence or structure"); } nTerm_cap_size_ = tag->getOption("nTerm_cap_size"); cTerm_cap_size_ = tag->getOption("cTerm_cap_size"); diff --git a/source/src/protocols/simple_moves/ScoreMover.cc b/source/src/protocols/simple_moves/ScoreMover.cc index 30249216ba..af75a83b8f 100644 --- a/source/src/protocols/simple_moves/ScoreMover.cc +++ b/source/src/protocols/simple_moves/ScoreMover.cc @@ -208,7 +208,7 @@ void ScoreMover::parse_my_tag( if ( datamap.has( "scorefxns", scorefxn_key ) ) { score_function_ = datamap.get_ptr( "scorefxns", scorefxn_key ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "ScoreFunction " + scorefxn_key + " not found in basic::datacache::DataMap."); } } diff --git a/source/src/protocols/simple_moves/SetupMetalsMover.cc b/source/src/protocols/simple_moves/SetupMetalsMover.cc index 06ee92b21c..5fba5f7ee2 100644 --- a/source/src/protocols/simple_moves/SetupMetalsMover.cc +++ b/source/src/protocols/simple_moves/SetupMetalsMover.cc @@ -147,7 +147,7 @@ SetupMetalsMover::parse_my_tag( //Tag should be able to take either a named selector or resnum string for metal or contact if ( tag->hasOption("metal_residue_selector" ) ) { if ( tag->hasOption("metal_resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "SetupMetalsMover takes EITHER a residue selector or resnum list, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SetupMetalsMover takes EITHER a residue selector or resnum list, not both!\n" ); } metal_selector_ = core::select::residue_selector::parse_residue_selector( tag, data, "metal_residue_selector" ); } else if ( tag->hasOption( "metal_resnums" ) ) { @@ -157,7 +157,7 @@ SetupMetalsMover::parse_my_tag( if ( tag->hasOption("contact_residue_selector" ) ) { if ( tag->hasOption("contact_resnums") ) { - throw utility::excn::EXCN_Msg_Exception( "SetupMetalsMover takes EITHER a residue selector or resnum list, not both!\n" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SetupMetalsMover takes EITHER a residue selector or resnum list, not both!\n" ); } contact_selector_ = core::select::residue_selector::parse_residue_selector( tag, data, "contact_residue_selector" ); } else if ( tag->hasOption( "contact_resnums" ) ) { diff --git a/source/src/protocols/simple_moves/SwitchChainOrderMover.cc b/source/src/protocols/simple_moves/SwitchChainOrderMover.cc index d3c970f27b..94e3f24e7e 100644 --- a/source/src/protocols/simple_moves/SwitchChainOrderMover.cc +++ b/source/src/protocols/simple_moves/SwitchChainOrderMover.cc @@ -163,7 +163,7 @@ SwitchChainOrderMover::parse_my_tag( core::pose::Pose const & pose ) { if ( tag->hasOption("chain_order") && (tag->hasOption("chain_name") || tag->hasOption("chain_num")) ) { - throw utility::excn::EXCN_RosettaScriptsOption("You can specify a chain_order string or the comma separated chain names or numbers, but not both"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "You can specify a chain_order string or the comma separated chain names or numbers, but not both"); } if ( tag->hasOption("chain_order") ) { diff --git a/source/src/protocols/simple_moves/bb_sampler/SugarBBSampler.cc b/source/src/protocols/simple_moves/bb_sampler/SugarBBSampler.cc index 35602d1a76..c64349afb7 100644 --- a/source/src/protocols/simple_moves/bb_sampler/SugarBBSampler.cc +++ b/source/src/protocols/simple_moves/bb_sampler/SugarBBSampler.cc @@ -113,7 +113,7 @@ SugarBBSampler::get_torsion(Pose const & pose, Size resnum ) const //Throw here. We expect an angle, better to use exception then throw a bogus angle. //Catch this to keep going. TR << msg << std::endl; - throw utility::excn::EXCN_Msg_Exception( msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg ); } CHIDihedralSamplingData const & sampling_data = sugar_bb.get_sampling_data( linkage_type ); @@ -141,7 +141,7 @@ SugarBBSampler::get_torsion(Pose const & pose, Size resnum ) const if ( preference_type == PREFERENCE_NA ) { std::string msg = "No data for preference type. This is either not a carbohydrate residue, or it is the first residue in the pose and not attached to anything!"; TR << msg << std::endl; - throw utility::excn::EXCN_Msg_Exception( msg ); + throw CREATE_EXCEPTION(utility::excn::Exception, msg ); } OmegaPreferenceSamplingData const & sampling_data = omega_pref.get_sampling_data( preference_type ); diff --git a/source/src/protocols/simple_moves/bin_transitions/InitializeByBins.cc b/source/src/protocols/simple_moves/bin_transitions/InitializeByBins.cc index e78fa711ad..0932b429bb 100644 --- a/source/src/protocols/simple_moves/bin_transitions/InitializeByBins.cc +++ b/source/src/protocols/simple_moves/bin_transitions/InitializeByBins.cc @@ -158,7 +158,7 @@ void InitializeByBins::parse_my_tag( utility::tag::TagCOP tag, ) { if ( tag->getName() != "InitializeByBins" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } //Get the bin params file: diff --git a/source/src/protocols/simple_moves/bin_transitions/PerturbByBins.cc b/source/src/protocols/simple_moves/bin_transitions/PerturbByBins.cc index f7eae59151..24e5e6942a 100644 --- a/source/src/protocols/simple_moves/bin_transitions/PerturbByBins.cc +++ b/source/src/protocols/simple_moves/bin_transitions/PerturbByBins.cc @@ -159,7 +159,7 @@ void PerturbByBins::parse_my_tag( utility::tag::TagCOP tag, ) { if ( tag->getName() != "PerturbByBins" ) { - throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "This should be impossible"); } //Get the bin params file: diff --git a/source/src/protocols/simple_moves/ddG.cc b/source/src/protocols/simple_moves/ddG.cc index a60d91ef46..8900541d43 100644 --- a/source/src/protocols/simple_moves/ddG.cc +++ b/source/src/protocols/simple_moves/ddG.cc @@ -225,12 +225,12 @@ void ddG::parse_my_tag( } if ( tag->hasOption("chains") && tag->hasOption("symmetry") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you cannot specify multiple chains and use symmetry mode in the ddG mover at the same time right now. Sorry"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you cannot specify multiple chains and use symmetry mode in the ddG mover at the same time right now. Sorry"); } if ( ( tag->hasOption("chain_num") || tag->hasOption("chain_name") ) && tag->hasOption("jump") ) { - throw utility::excn::EXCN_RosettaScriptsOption("you can specify either chains or jump in the ddG mover, but not both"); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "you can specify either chains or jump in the ddG mover, but not both"); } if ( tag->hasOption("chain_num") ) { diff --git a/source/src/protocols/simple_moves/sidechain_moves/SidechainMCMover.cc b/source/src/protocols/simple_moves/sidechain_moves/SidechainMCMover.cc index 540c86bcbd..8b7e756d9e 100644 --- a/source/src/protocols/simple_moves/sidechain_moves/SidechainMCMover.cc +++ b/source/src/protocols/simple_moves/sidechain_moves/SidechainMCMover.cc @@ -350,7 +350,7 @@ SidechainMCMover::parse_my_tag( utility::tag::TagCOP tag, basic::datacache::Data if ( data.has( "task_operations", *t_o_key ) ) { new_task_factory->push_back( data.get_ptr< core::pack::task::operation::TaskOperation >( "task_operations", *t_o_key ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); } } diff --git a/source/src/protocols/simple_moves/sidechain_moves/SidechainMover.cc b/source/src/protocols/simple_moves/sidechain_moves/SidechainMover.cc index b339e9c5f7..ae23068eed 100644 --- a/source/src/protocols/simple_moves/sidechain_moves/SidechainMover.cc +++ b/source/src/protocols/simple_moves/sidechain_moves/SidechainMover.cc @@ -185,7 +185,7 @@ SidechainMover::parse_my_tag( if ( data.has( "task_operations", *t_o_key ) ) { new_task_factory->push_back( data.get_ptr< core::pack::task::operation::TaskOperation >( "task_operations", *t_o_key ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); } } diff --git a/source/src/protocols/simple_moves/sidechain_moves/SidechainMoverBase.cc b/source/src/protocols/simple_moves/sidechain_moves/SidechainMoverBase.cc index 92057dd69e..3893484c7e 100644 --- a/source/src/protocols/simple_moves/sidechain_moves/SidechainMoverBase.cc +++ b/source/src/protocols/simple_moves/sidechain_moves/SidechainMoverBase.cc @@ -130,7 +130,7 @@ SidechainMoverBase::parse_my_tag( if ( data.has( "task_operations", *t_o_key ) ) { new_task_factory->push_back( data.get_ptr< pack::task::operation::TaskOperation >( "task_operations", *t_o_key ) ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "TaskOperation " + *t_o_key + " not found in basic::datacache::DataMap."); } } } else { diff --git a/source/src/protocols/simple_moves/symmetry/SetupForSymmetryMover.cc b/source/src/protocols/simple_moves/symmetry/SetupForSymmetryMover.cc index 8b1a11943b..107944c738 100644 --- a/source/src/protocols/simple_moves/symmetry/SetupForSymmetryMover.cc +++ b/source/src/protocols/simple_moves/symmetry/SetupForSymmetryMover.cc @@ -230,7 +230,7 @@ SetupForSymmetryMover::apply( core::pose::Pose & pose ) if ( ! symdef_fname_from_options_system_.empty() ) { process_symmdef_file( symdef_fname_from_options_system_ ); } else { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "The -symmetry:symmetry_definition command line option " "was not specified."); } @@ -276,7 +276,7 @@ void SetupForSymmetryMover::parse_my_tag( preserve_datacache_ = tag->getOption< bool >( "preserve_datacache", preserve_datacache_ ); if ( tag->hasOption("definition") && tag->hasOption("resource_description") ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "SetupForSymmetry takes either a 'definition' OR " "a 'resource_description' tag but not both."); } @@ -303,7 +303,7 @@ void SetupForSymmetryMover::parse_my_tag( } else if ( ! symdef_fname_from_options_system_.empty() ) { process_symmdef_file( symdef_fname_from_options_system_ ); } else { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "To use SetupForSymmetryMover with rosetta scripts please supply either a 'definition' tag, a 'resource_decription' tag or specify -symmetry:symmetry_definition the command line."); } } diff --git a/source/src/protocols/star/StarAbinitioMain.cc b/source/src/protocols/star/StarAbinitioMain.cc index 4a20267d88..18e1c1c4fa 100644 --- a/source/src/protocols/star/StarAbinitioMain.cc +++ b/source/src/protocols/star/StarAbinitioMain.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include // Project headers #include @@ -71,7 +71,7 @@ void* graphics_main(protocols::moves::MoverOP mover) { try { JobDistributor::get_instance()->go(mover); - } catch (utility::excn::EXCN_Base& e) { + } catch (utility::excn::Exception& e) { std::cerr << "Exception: " << std::endl; e.show(std::cerr); } diff --git a/source/src/protocols/struct_fragment/StructFragmentMover.cc b/source/src/protocols/struct_fragment/StructFragmentMover.cc index 5e75fbcf65..e462005dc9 100644 --- a/source/src/protocols/struct_fragment/StructFragmentMover.cc +++ b/source/src/protocols/struct_fragment/StructFragmentMover.cc @@ -98,7 +98,7 @@ StructFragmentMover::evaluate_job() { if ( steal_small_frags_ && steal_large_frags_ ) { // We can steal if we want to steal all. return 2; // STATUS 2: Only Steal Fragments. } else { - throw( utility::excn::EXCN_Msg_Exception( "With the provided data Fragments cannot be created, not readed." ) ); + throw( CREATE_EXCEPTION(utility::excn::Exception, "With the provided data Fragments cannot be created, not readed." ) ); } } } @@ -145,7 +145,7 @@ void StructFragmentMover::apply( cp::Pose & pose ) { TR.Trace << TR.Green << "small fragments pointer address " << smallF_ << " size: " << smallF_->size() << TR.Reset << std::endl; TR.Trace << TR.Green << "large fragments pointer address " << largeF_ << " size: " << largeF_->size() << TR.Reset << std::endl; } else { - utility::excn::EXCN_Msg_Exception("Pose was empty."); + throw CREATE_EXCEPTION(utility::excn::Exception, "Pose was empty."); } } // end apply method @@ -167,7 +167,7 @@ utility::vector1< cf::FragSetOP > StructFragmentMover::get_fragments( cp::Pose c TR.Debug << "Calculating new fragments." << std::endl; if ( not ( steal_small_frags_ && steal_large_frags_ ) && vall_file_.empty() ) { - throw( utility::excn::EXCN_BadInput( "with no frag_file and no steal, a vall file must be provided." ) ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "with no frag_file and no steal, a vall file must be provided." ) ); } if ( not vall_file_.empty() && utility::file::file_exists( vall_file_ ) ) { pfp::FragmentPickerOP pickIt = make_fragment_picker( pose, vall_file_ ); @@ -180,7 +180,7 @@ utility::vector1< cf::FragSetOP > StructFragmentMover::get_fragments( cp::Pose c mfrag = get_fragset( pickIt, first_res, small_frag_size_ ); Mfrag = get_fragset( pickIt, first_res, large_frag_size_ ); } else { - throw( utility::excn::EXCN_BadInput( "The provided vall file could not be found!" ) ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "The provided vall file could not be found!" ) ); } // if ( steal_small_frags_ || steal_large_frags_ ) { @@ -265,7 +265,7 @@ pfp::FragmentPickerOP StructFragmentMover::make_fragment_picker( cp::Pose pose, if ( utility::file::file_exists( sequence_profile_ ) ) { q_prof->read_from_file( sequence_profile_ ); } else { - throw( utility::excn::EXCN_Msg_Exception( "The provided sequence profile file could not be found!" ) ); + throw( CREATE_EXCEPTION(utility::excn::Exception, "The provided sequence profile file could not be found!" ) ); } } else { q_prof->generate_from_sequence( core::sequence::Sequence( sequence, "sequence" ) ); @@ -296,7 +296,7 @@ pfp::FragmentPickerOP StructFragmentMover::make_fragment_picker( cp::Pose pose, if ( utility::file::file_exists( frag_weight_file_ ) ) { fscore->create_scores( frag_weight_file_, structPicker_ ); } else { - throw( utility::excn::EXCN_BadInput( "The provided weight file could not be found!" ) ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, "The provided weight file could not be found!" ) ); } } @@ -379,7 +379,7 @@ cf::FragSetOP StructFragmentMover::read_frag_file( std::string frag_file) { TR.Debug << "Fragments (" << frag_length << ") read from " << frag_file <has_resource_with_description("surface_vectors") ) { - throw utility::excn::EXCN_Msg_Exception(" Either a resource definition file or the command line option "\ + throw CREATE_EXCEPTION(utility::excn::Exception, " Either a resource definition file or the command line option "\ "-in:file:surface_vectors must be specified for surface docking"); } diff --git a/source/src/protocols/surface_docking/SurfaceVectorLoader.cc b/source/src/protocols/surface_docking/SurfaceVectorLoader.cc index a3de45d7b6..de56e3328a 100644 --- a/source/src/protocols/surface_docking/SurfaceVectorLoader.cc +++ b/source/src/protocols/surface_docking/SurfaceVectorLoader.cc @@ -55,7 +55,7 @@ SurfaceVectorLoader::create_resource( using numeric::xyzVector; using std::getline; using std::string; - using utility::excn::EXCN_Msg_Exception; + using utility::excn::Exception; using utility::split; using utility::vector1; @@ -78,17 +78,17 @@ SurfaceVectorLoader::create_resource( std::ostringstream err; err << "The input coordinates must specify a point in three-dimensional space, but the point on line "; err << lines_read << " of " << locator_id << " has " << point_coords.size() << " coordinates listed."; - throw EXCN_Msg_Exception(err.str()); + throw CREATE_EXCEPTION(Exception, err.str()); } surf_coords[lines_read] = xyzVector(lexical_cast(point_coords[1]),lexical_cast(point_coords[2]), lexical_cast(point_coords[3])); } if ( lines_read > number_of_points ) { - throw EXCN_Msg_Exception( "SurfaceVectorLoader expected to be given exactly three points to " \ + throw CREATE_EXCEPTION(Exception, "SurfaceVectorLoader expected to be given exactly three points to " \ "define the periodicity of the surface, but more than three points were provided in " + locator_id + "."); } else if ( lines_read < number_of_points ) { - throw EXCN_Msg_Exception( "SurfaceVectorLoader expected to be given exactly three points to " \ + throw CREATE_EXCEPTION(Exception, "SurfaceVectorLoader expected to be given exactly three points to " \ "define the periodicity of the surface, but less than three points were provided in " + locator_id + "."); } diff --git a/source/src/protocols/toolbox/DecoySetEvaluation.cc b/source/src/protocols/toolbox/DecoySetEvaluation.cc index d653d48c51..5a08c9daf0 100644 --- a/source/src/protocols/toolbox/DecoySetEvaluation.cc +++ b/source/src/protocols/toolbox/DecoySetEvaluation.cc @@ -132,7 +132,7 @@ void DecoySetEvaluation::prepare_push_back( core::Size nres ) { if ( n_decoys_ >= n_decoys_max_ ) { // we could also just resize... but I want the user to know.. because he should keep track which decoy is which... - throw utility::excn::EXCN_RangeError( "you can't add any more decoys to DecoySetEvaluation "); + throw CREATE_EXCEPTION(utility::excn::RangeError, "you can't add any more decoys to DecoySetEvaluation "); } ++n_decoys_; } diff --git a/source/src/protocols/toolbox/pose_metric_calculators/FragQualCalculator.cc b/source/src/protocols/toolbox/pose_metric_calculators/FragQualCalculator.cc index e0ee749809..c75ff64b71 100644 --- a/source/src/protocols/toolbox/pose_metric_calculators/FragQualCalculator.cc +++ b/source/src/protocols/toolbox/pose_metric_calculators/FragQualCalculator.cc @@ -271,7 +271,7 @@ FragQualCalculator::parse_my_tag( if ( data.has( "fragsets", fset_string ) ) { frag_ = data.get_ptr( "fragsets", fset_string ); } else { - throw utility::excn::EXCN_RosettaScriptsOption("fragsets " + fset_string + " not found in basic::datacache::DataMap."); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "fragsets " + fset_string + " not found in basic::datacache::DataMap."); } verbose_ = tag->getOption( "verbose", 0 ); diff --git a/source/src/protocols/toolbox/task_operations/ReadResfileFromDB.cc b/source/src/protocols/toolbox/task_operations/ReadResfileFromDB.cc index 6d9e64e282..65997f519a 100644 --- a/source/src/protocols/toolbox/task_operations/ReadResfileFromDB.cc +++ b/source/src/protocols/toolbox/task_operations/ReadResfileFromDB.cc @@ -120,7 +120,7 @@ ReadResfileFromDB::apply( Pose const & pose, PackerTask & task ) const { error_message << "Unable to locate resfile for job distributor input tag '" << tag << "' in the database." << endl; - throw utility::excn::EXCN_Msg_Exception(error_message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str()); } string resfile; res >> resfile; @@ -132,7 +132,7 @@ ReadResfileFromDB::apply( Pose const & pose, PackerTask & task ) const { << "Failed to process resfile stored for input tag '" << tag << "'" << endl << "RESFILE:" << endl << resfile << endl; - throw utility::excn::EXCN_Msg_Exception(error_message.str()); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str()); } } @@ -179,9 +179,7 @@ ReadResfileFromDB::parse_tag( TagCOP tag , DataMap & ) std::string resource_description = tag->getOption("resource_description"); if ( !ResourceManager::get_instance()->has_resource_with_description( resource_description) ) { - throw utility::excn::EXCN_Msg_Exception - ( "You specified a resource_description of " + resource_description + - " for ReadResfileFromDB, but the ResourceManager doesn't have a resource with that description" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "You specified a resource_description of " + resource_description + " for ReadResfileFromDB, but the ResourceManager doesn't have a resource with that description" ); } db_session_ = get_resource< utility::sql_database::session >( resource_description ); } else { diff --git a/source/src/protocols/toolbox/task_operations/RestrictNativeResiduesOperation.cc b/source/src/protocols/toolbox/task_operations/RestrictNativeResiduesOperation.cc index 8bb82aa8ba..e045e2d56e 100644 --- a/source/src/protocols/toolbox/task_operations/RestrictNativeResiduesOperation.cc +++ b/source/src/protocols/toolbox/task_operations/RestrictNativeResiduesOperation.cc @@ -235,7 +235,7 @@ RestrictNativeResiduesOperation::parse_tag( TagCOP tag , DataMap & ) reference_pose( temp_pose ); TR<<"Using pdb "<getOption< bool >( "invert", invert_ ); diff --git a/source/src/protocols/toolbox/task_operations/RestrictToNeighborhoodOperation.cc b/source/src/protocols/toolbox/task_operations/RestrictToNeighborhoodOperation.cc index c030f5b0a7..96e6128635 100644 --- a/source/src/protocols/toolbox/task_operations/RestrictToNeighborhoodOperation.cc +++ b/source/src/protocols/toolbox/task_operations/RestrictToNeighborhoodOperation.cc @@ -160,7 +160,7 @@ protocols::toolbox::pose_metric_calculators::NeighborhoodByDistanceCalculatorCOP RestrictToNeighborhoodOperation::get_calculator() const { using namespace core::pose::metrics; if ( !CalculatorFactory::Instance().check_calculator_exists( calculator_name_ ) ) { - throw utility::excn::EXCN_Msg_Exception("In RestrictToNeighborhoodOperation get_calculator, calculator " + calculator_name_ + " does not exist"); + throw CREATE_EXCEPTION(utility::excn::Exception, "In RestrictToNeighborhoodOperation get_calculator, calculator " + calculator_name_ + " does not exist"); } using protocols::toolbox::pose_metric_calculators::NeighborhoodByDistanceCalculatorCOP; diff --git a/source/src/protocols/toolbox/task_operations/StoreCompoundTaskMover.cc b/source/src/protocols/toolbox/task_operations/StoreCompoundTaskMover.cc index 8f16ea3479..ec3ef85546 100644 --- a/source/src/protocols/toolbox/task_operations/StoreCompoundTaskMover.cc +++ b/source/src/protocols/toolbox/task_operations/StoreCompoundTaskMover.cc @@ -297,15 +297,15 @@ StoreCompoundTaskMover::parse_my_tag( task_name_ = tag->getOption< std::string >( "task_name", "" ); true_behavior_ = tag->getOption( "true_behavior", "" ); if ( !( (true_behavior_ == "prevent_repacking") || (true_behavior_ == "restrict_to_repacking") || (true_behavior_ == "") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: true_behavior in tag is undefined." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: true_behavior in tag is undefined." ); } false_behavior_ = tag->getOption( "false_behavior", "prevent_repacking" ); if ( !( (false_behavior_ == "prevent_repacking") || (false_behavior_ == "restrict_to_repacking") || (false_behavior_ == "") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: false_behavior in tag is undefined." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: false_behavior in tag is undefined." ); } mode_ = tag->getOption( "mode", "packable" ); if ( !( (mode_ == "packable") || (mode_ == "designable") ) ) { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: mode in tag is undefined." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: mode in tag is undefined." ); } invert_ = tag->getOption( "invert", false ); verbose_ = tag->getOption( "verbose", false ); @@ -328,7 +328,7 @@ StoreCompoundTaskMover::parse_my_tag( else if ( operation == "ANDNOT" ) factory_pair.second = ANDNOT; else if ( operation == "NOT" ) factory_pair.second = NOT; else { - throw utility::excn::EXCN_RosettaScriptsOption( "Error: Boolean operation in tag is undefined." ); + throw CREATE_EXCEPTION(utility::excn::RosettaScriptsOptionError, "Error: Boolean operation in tag is undefined." ); } core::pack::task::TaskFactoryOP new_task_factory( new core::pack::task::TaskFactory ); diff --git a/source/src/protocols/topology_broker/AsymFoldandDockClaimer.cc b/source/src/protocols/topology_broker/AsymFoldandDockClaimer.cc index f7b49ef4dd..975e9a6127 100644 --- a/source/src/protocols/topology_broker/AsymFoldandDockClaimer.cc +++ b/source/src/protocols/topology_broker/AsymFoldandDockClaimer.cc @@ -126,7 +126,7 @@ bool AsymFoldandDockClaimer::read_tag( std::string tag, std::istream& is ) { } else if ( tag == "CHAIN_BREAK_ASSYM_FND" || tag == "chain_break_assym_fnd" ) { is >> chain_break_res_; } else { - throw utility::excn::EXCN_BadInput( " Unknown tag, only LOOP, CHAIN_BREAK_ASSYM_FND definition is allowed at this stage"); + throw CREATE_EXCEPTION(utility::excn::BadInput, " Unknown tag, only LOOP, CHAIN_BREAK_ASSYM_FND definition is allowed at this stage"); } return true; } @@ -139,9 +139,9 @@ void AsymFoldandDockClaimer::initialize_dofs( using namespace loops; using namespace kinematics; - if ( moving_res_.size() == 0 ) throw utility::excn::EXCN_BadInput( " missing definition of moving residues, add a LOOP definition "); - if ( moving_res_.size() > 1 ) throw utility::excn::EXCN_BadInput( " Only one movable region possible at this stage "); - if ( chain_break_res_ == 0 ) throw utility::excn::EXCN_BadInput( " No chainbreak defined... "); + if ( moving_res_.size() == 0 ) throw CREATE_EXCEPTION(utility::excn::BadInput, " missing definition of moving residues, add a LOOP definition "); + if ( moving_res_.size() > 1 ) throw CREATE_EXCEPTION(utility::excn::BadInput, " Only one movable region possible at this stage "); + if ( chain_break_res_ == 0 ) throw CREATE_EXCEPTION(utility::excn::BadInput, " No chainbreak defined... "); /* Size moving_end( 1 ); diff --git a/source/src/protocols/topology_broker/BasicJumpClaimer.cc b/source/src/protocols/topology_broker/BasicJumpClaimer.cc index d4dc11b737..2600a8b0dd 100644 --- a/source/src/protocols/topology_broker/BasicJumpClaimer.cc +++ b/source/src/protocols/topology_broker/BasicJumpClaimer.cc @@ -48,7 +48,7 @@ void BasicJumpClaimer::generate_claims( claims::DofClaims& claims ){ << broker().sequence_number_resolver().find_global_pose_number( start_label_ ) << ", " << broker().sequence_number_resolver().find_global_pose_number( start_label_ , start_chain_claim.length() ) << "]." << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } else if ( ! ( ( end_position_ > 0 ) && ( end_position_ <= end_chain_claim.length() ) ) ) { std::ostringstream msg; msg << "Jump end position " << end_position_ << " in label '" << end_label_ @@ -56,7 +56,7 @@ void BasicJumpClaimer::generate_claims( claims::DofClaims& claims ){ << broker().sequence_number_resolver().find_global_pose_number( end_label_ ) << ", " << broker().sequence_number_resolver().find_global_pose_number( end_label_ , end_chain_claim.length() ) << "]." << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } //Add new jump claim @@ -72,7 +72,7 @@ void BasicJumpClaimer::generate_claims( claims::DofClaims& claims ){ msg << "BasicJumpClaimer with JumpClaim between '" << start_label_ << "' (position " << start_position_ << ") and " << end_label_ << " (position " << end_position_ << " did not set both (or neither) jump atoms." << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } } diff --git a/source/src/protocols/topology_broker/CoordConstraintClaimer.cc b/source/src/protocols/topology_broker/CoordConstraintClaimer.cc index a32261cfc3..0338552d66 100644 --- a/source/src/protocols/topology_broker/CoordConstraintClaimer.cc +++ b/source/src/protocols/topology_broker/CoordConstraintClaimer.cc @@ -102,7 +102,7 @@ CoordConstraintClaimer::~CoordConstraintClaimer() = default; void CoordConstraintClaimer::new_decoy() { if ( !constraints_ && !bUseXYZ_in_cstfile_ ) { - if ( !cst_pose_ ) throw EXCN_Input( "CoordConstraintClaimer::new_decoy(): in broker setup provide PDB_FILE or say USE_XYZ_FROM_CSTFILE"); + if ( !cst_pose_ ) throw CREATE_EXCEPTION(EXCN_Input, "CoordConstraintClaimer::new_decoy(): in broker setup provide PDB_FILE or say USE_XYZ_FROM_CSTFILE"); generate_constraints( *cst_pose_ ); } } @@ -126,7 +126,7 @@ void CoordConstraintClaimer::generate_claims( claims::DofClaims& new_claims ) { tr.Info << label() << " got a returned message: " << msg << std::endl; if ( msg.received() ) new_root=msg.good_fix_pos_; - else throw EXCN_Input( "no fixed region (looked for "+root_from_label_+") found to use as reference for CoordinateConstraints"); + else throw CREATE_EXCEPTION(EXCN_Input, "no fixed region (looked for "+root_from_label_+") found to use as reference for CoordinateConstraints"); if ( !constraints_ && bUseXYZ_in_cstfile_ ) { //in this case we haven't been able to read the constraints file yet, since this is the first time a valid pose exists... @@ -168,7 +168,7 @@ void CoordConstraintClaimer::add_constraints( core::pose::Pose& pose ) const { /// we should have a cst_pose_ now if ( !cst_pose_ ) { - throw EXCN_Input( "CoordConstraintClaimer::add_constraints(): " + throw CREATE_EXCEPTION(EXCN_Input, "CoordConstraintClaimer::add_constraints(): " "in broker setup either provide PDB_FILE or set CST_FROM_INPUT_POSE"); } @@ -437,7 +437,7 @@ void CoordConstraintClaimer::init_after_reading() { read_constraints_from_file( *cst_pose_ ); } else { if ( !cst_func_ ) { - throw EXCN_Input( "POTENTIAL not specified for " + type() ); + throw CREATE_EXCEPTION(EXCN_Input, "POTENTIAL not specified for " + type() ); } generate_constraints( *cst_pose_ ); } diff --git a/source/src/protocols/topology_broker/CutBiasClaimer.cc b/source/src/protocols/topology_broker/CutBiasClaimer.cc index 2e2a5ea593..34daa7f378 100644 --- a/source/src/protocols/topology_broker/CutBiasClaimer.cc +++ b/source/src/protocols/topology_broker/CutBiasClaimer.cc @@ -84,7 +84,7 @@ CutBiasClaimer::manipulate_cut_bias( utility::vector1< core::Real >& tot_cut_bia std::ostringstream msg; msg << " CutBiasClaimer with label '" << label() << "' tried to change cut_bias at position " << ( offset + cut_bias_.size()) << " while sequence is only " << tot_cut_bias.size() << " residues long. " << std::endl; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } else { for ( core::Size i = 1; i <= cut_bias_.size(); i++ ) { tot_cut_bias[ i + offset ] *= cut_bias_[ i ]; diff --git a/source/src/protocols/topology_broker/DensityScoringClaimer.cc b/source/src/protocols/topology_broker/DensityScoringClaimer.cc index 9dae4f17b5..7c2d5d18be 100644 --- a/source/src/protocols/topology_broker/DensityScoringClaimer.cc +++ b/source/src/protocols/topology_broker/DensityScoringClaimer.cc @@ -123,7 +123,7 @@ bool DensityScoringClaimer::accept_declined_claim( claims::DofClaim const& was_d void DensityScoringClaimer::init_after_reading() { if ( anchor_residue_ == 0 || anchor_chain_ == "" ) { - throw EXCN_Input( "need to specify both anchor residue (tag = anchor_residue) and anchor chain (tag = anchor_chain) for DensityScoring" ); + throw CREATE_EXCEPTION(EXCN_Input, "need to specify both anchor residue (tag = anchor_residue) and anchor chain (tag = anchor_chain) for DensityScoring" ); } /*set_label( ObjexxFCL::string_of( anchor_residue_ ) + anchor_chain_ ); diff --git a/source/src/protocols/topology_broker/DisulfJumpClaimer.cc b/source/src/protocols/topology_broker/DisulfJumpClaimer.cc index 9076ac64a3..09e076cc2d 100644 --- a/source/src/protocols/topology_broker/DisulfJumpClaimer.cc +++ b/source/src/protocols/topology_broker/DisulfJumpClaimer.cc @@ -227,11 +227,11 @@ bool DisulfJumpClaimer::read_tag( std::string tag, std::istream& is ) { is >> pos1 >> label1 >> ss1 >> pos2 >> label2 >> ss2; if ( !( ss1 == "S" || ss1 == "H" || ss1 == "E" ) ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "When reading DisulfJumpClaimer, secondary structure character '" +ss1+"' was invalid. Valid characters are 'S', 'H', and 'E'." ); } else if ( !( ss2 == "S" || ss2 == "H" || ss2 == "E" ) ) { - throw utility::excn::EXCN_BadInput( + throw CREATE_EXCEPTION(utility::excn::BadInput, "When reading DisulfJumpClaimer, secondary structure character '" +ss2+"' was invalid. Valid characters are 'S', 'H', and 'E'." ); } diff --git a/source/src/protocols/topology_broker/Exceptions.hh b/source/src/protocols/topology_broker/Exceptions.hh index ce730b80f7..265449c7a5 100644 --- a/source/src/protocols/topology_broker/Exceptions.hh +++ b/source/src/protocols/topology_broker/Exceptions.hh @@ -28,51 +28,37 @@ namespace protocols { namespace topology_broker { -class EXCN_TopologyBroker : public virtual utility::excn::EXCN_Msg_Exception { - typedef EXCN_Msg_Exception Parent; -protected: - EXCN_TopologyBroker() : EXCN_Msg_Exception( "" ){}; - void show( std::ostream& os ) const override { - os << "\n[TopologyBroker Exception]: "; - Parent::show( os ); - } +class EXCN_TopologyBroker : public utility::excn::Exception { +public: + EXCN_TopologyBroker(char const *file, int line, std::string const & m) : utility::excn::Exception(file, line, "\n[TopologyBroker Exception]: " + m) {} }; -class EXCN_Input : public EXCN_TopologyBroker, public utility::excn::EXCN_BadInput { - typedef EXCN_TopologyBroker Parent; +class EXCN_Input : public utility::excn::BadInput { public: - EXCN_Input( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {}; - void show( std::ostream& os ) const override { - os << "*************** Error in Broker Setup: *************** \n"; - Parent::show( os ); - os << "\n\n********** Check your (inconsistent) input *************** \n"; + EXCN_Input(char const *file, int line, std::string const& msg ) : utility::excn::BadInput(file, line, "") { + add_msg("*************** Error in Broker Setup: *************** \n"); + add_msg(msg); + add_msg("\n\n********** Check your (inconsistent) input *************** \n"); } }; // this is more like a range error --- asking for something which isn't there class EXCN_Unknown : public EXCN_TopologyBroker { public: - EXCN_Unknown( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {}; + using EXCN_TopologyBroker::EXCN_TopologyBroker; }; class EXCN_FailedBroking : public EXCN_TopologyBroker { - typedef EXCN_TopologyBroker Parent; public: - EXCN_FailedBroking( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {}; - void show( std::ostream& os ) const override { - Parent::show( os ); - os << "Failed to mediate between different Claimers. " << std::endl; + EXCN_FailedBroking(char const *file, int line, std::string const& msg) : EXCN_TopologyBroker(file, line, msg) { + add_msg("\nFailed to mediate between different Claimers..."); } }; class EXCN_FilterFailed : public EXCN_TopologyBroker { - typedef EXCN_TopologyBroker Parent; public: - EXCN_FilterFailed( std::string const& msg ) : utility::excn::EXCN_Msg_Exception( msg ) {}; - - void show( std::ostream& os ) const override { - Parent::show( os ); - os << "[FILTER] failed... " << std::endl; + EXCN_FilterFailed(char const *file, int line, std::string const& msg) : EXCN_TopologyBroker(file, line, msg) { + add_msg("\n[FILTER] failed... "); } }; diff --git a/source/src/protocols/topology_broker/FragmentClaimer.cc b/source/src/protocols/topology_broker/FragmentClaimer.cc index 0cb2ec553a..5a4584a95e 100644 --- a/source/src/protocols/topology_broker/FragmentClaimer.cc +++ b/source/src/protocols/topology_broker/FragmentClaimer.cc @@ -155,7 +155,7 @@ void FragmentClaimer::generate_claims( claims::DofClaims& new_claims ) { std::ostringstream msg; msg << " Sequence length of SequenceClaim with label " << label() << "(length: "<< seq_length << ") and sequence length of corresponding FragmentClaimer (length: " << frag_seq_length << ") do not match." << std::endl; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } tr.Debug << "sequence length: " << seq_length << "; fragment sequence length: " << frag_seq_length << std::endl; diff --git a/source/src/protocols/topology_broker/FragmentClaimer.hh b/source/src/protocols/topology_broker/FragmentClaimer.hh index 242db2af1f..97f778491e 100644 --- a/source/src/protocols/topology_broker/FragmentClaimer.hh +++ b/source/src/protocols/topology_broker/FragmentClaimer.hh @@ -108,7 +108,7 @@ public: protected: simple_moves::FragmentMover const & mover() const { - if ( !mover_ ) throw( utility::excn::EXCN_NullPointer( "mover_ is NULL in FragmentClaimer::mover()" ) ); + if ( !mover_ ) throw( CREATE_EXCEPTION(utility::excn::NullPointerError, "mover_ is NULL in FragmentClaimer::mover()" ) ); return *mover_; } diff --git a/source/src/protocols/topology_broker/FragmentJumpClaimer.cc b/source/src/protocols/topology_broker/FragmentJumpClaimer.cc index 497c3f0910..3ca43cb738 100644 --- a/source/src/protocols/topology_broker/FragmentJumpClaimer.cc +++ b/source/src/protocols/topology_broker/FragmentJumpClaimer.cc @@ -163,7 +163,7 @@ void FragmentJumpClaimer::init_jumps() { } if ( !current_jumps_.is_valid() ) { - throw utility::excn::EXCN_BadInput("not able to build valid fold-tree from a "+jump_def_->type_name()+" in 10 attempts in FragmentJumpClaimer"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "not able to build valid fold-tree from a "+jump_def_->type_name()+" in 10 attempts in FragmentJumpClaimer"); } tr.Debug << "current_jumps " << current_jumps_ << std::endl; diff --git a/source/src/protocols/topology_broker/MetalloClaimer.cc b/source/src/protocols/topology_broker/MetalloClaimer.cc index 95ff89945c..6ea2e405d5 100644 --- a/source/src/protocols/topology_broker/MetalloClaimer.cc +++ b/source/src/protocols/topology_broker/MetalloClaimer.cc @@ -216,7 +216,7 @@ bool MetalloClaimer::read_tag( std::string tag, std::istream& is ) { void MetalloClaimer::init_after_reading() { if ( !anchor_residue_ ) { - throw EXCN_Input( "need to specify anchor residue for MetalloLigand "+ligand_ ); + throw CREATE_EXCEPTION(EXCN_Input, "need to specify anchor residue for MetalloLigand "+ligand_ ); } if ( anchor_chain_ == "" ) { diff --git a/source/src/protocols/topology_broker/RigidChunkClaimer.cc b/source/src/protocols/topology_broker/RigidChunkClaimer.cc index 1677116c23..b82ca0b53b 100644 --- a/source/src/protocols/topology_broker/RigidChunkClaimer.cc +++ b/source/src/protocols/topology_broker/RigidChunkClaimer.cc @@ -509,7 +509,7 @@ void RigidChunkClaimer::initialize_dofs( core::pose::Pose& pose, claims::DofClai } } } - if ( missing_density ) throw utility::excn::EXCN_BadInput( " missing density in backbone of rigid-chunk... check your LOOP definition"); + if ( missing_density ) throw CREATE_EXCEPTION(utility::excn::BadInput, " missing density in backbone of rigid-chunk... check your LOOP definition"); //centroid_input_pose_.fold_tree( pose.fold_tree() ); runtime_assert( !pose.is_fullatom() ); runtime_assert( !centroid_input_pose_.is_fullatom() ); diff --git a/source/src/protocols/topology_broker/SequenceClaimer.cc b/source/src/protocols/topology_broker/SequenceClaimer.cc index 316d57b476..58b2b2c0fd 100644 --- a/source/src/protocols/topology_broker/SequenceClaimer.cc +++ b/source/src/protocols/topology_broker/SequenceClaimer.cc @@ -108,7 +108,7 @@ void SequenceClaimer::read_fasta_file( std::string file ) { using namespace core::sequence; utility::vector1< SequenceOP > sequences = core::sequence::read_fasta_file( file ); if ( sequences.size() > 1 ) { - throw EXCN_Input( "SequenceClaimer found multiple sequences in fasta file '"+file+ + throw CREATE_EXCEPTION(EXCN_Input, "SequenceClaimer found multiple sequences in fasta file '"+file+ "'\nTo resolve this, split fasta file into multiple files, and claim using multiple SequenceClaimers."); } input_sequence_ = sequences[1]->sequence(); @@ -130,7 +130,7 @@ bool SequenceClaimer::read_tag( std::string tag, std::istream& is ) { //END_DEF if ( input_sequence_ != "" ) { - throw EXCN_Input( "SequenceClaimer found multiple definitions for its sequence. Ambiguity cannot be resolved."); + throw CREATE_EXCEPTION(EXCN_Input, "SequenceClaimer found multiple definitions for its sequence. Ambiguity cannot be resolved."); } while ( is >> tag && tag != "END_DEF" ) { if ( tag[0]=='#' ) { @@ -140,7 +140,7 @@ bool SequenceClaimer::read_tag( std::string tag, std::istream& is ) { input_sequence_ += tag; } if ( tag != "END_DEF" ) { - throw EXCN_Input( "END_DEF expected after DEF while reading sequence" ); + throw CREATE_EXCEPTION(EXCN_Input, "END_DEF expected after DEF while reading sequence" ); } } else if ( tag == "CMD_FLAG" ) { using namespace basic::options; @@ -148,7 +148,7 @@ bool SequenceClaimer::read_tag( std::string tag, std::istream& is ) { if ( option[ in::file::fasta ].user() ) { read_fasta_file( option[ in::file::fasta ]()[1] ); } else { - throw EXCN_Input( "SequenceClaimer found tag CMD_FLAG but option '-in:file:fasta' is not set on cmd-line" ); + throw CREATE_EXCEPTION(EXCN_Input, "SequenceClaimer found tag CMD_FLAG but option '-in:file:fasta' is not set on cmd-line" ); } } else return Parent::read_tag( tag, is ); return true; @@ -156,10 +156,10 @@ bool SequenceClaimer::read_tag( std::string tag, std::istream& is ) { void SequenceClaimer::init_after_reading() { if ( input_sequence_.size() == 0 ) { - throw EXCN_Input( "No sequence found when reading " +type() ); + throw CREATE_EXCEPTION(EXCN_Input, "No sequence found when reading " +type() ); } if ( label() == "NO_LABEL" ) { - throw EXCN_Input( "SequenceClaimer left unlabeled: use the LABEL command to specify a label for each SequenceClaimer" ); + throw CREATE_EXCEPTION(EXCN_Input, "SequenceClaimer left unlabeled: use the LABEL command to specify a label for each SequenceClaimer" ); } } diff --git a/source/src/protocols/topology_broker/SequenceNumberResolver.cc b/source/src/protocols/topology_broker/SequenceNumberResolver.cc index 7cfeac35ca..b5500327c7 100644 --- a/source/src/protocols/topology_broker/SequenceNumberResolver.cc +++ b/source/src/protocols/topology_broker/SequenceNumberResolver.cc @@ -58,7 +58,7 @@ SequenceNumberResolver::offset( std::string const& label ) const { tr.Warning << "Attempting to resolve a sequence number with an empty claim label - assuming zero offset." << std::endl; return 0; } else { - throw utility::excn::EXCN_BadInput( "SequenceNumberResolver asked to resolve SequenceClaim label '" + throw CREATE_EXCEPTION(utility::excn::BadInput, "SequenceNumberResolver asked to resolve SequenceClaim label '" + label + "', which does not match any SequenceClaim labels." ); } } @@ -70,7 +70,7 @@ void SequenceNumberResolver::register_label_offset( std::string const& label, co std::pair::iterator,bool> ret; ret = offset_map_.insert( std::pair < std::string, core::Size >( label,offset ) ); if ( ret.second == false ) { - throw utility::excn::EXCN_BadInput( "Multiple sequence claims with label " + label ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Multiple sequence claims with label " + label ); } //Store entry as well in reversed map (key=offset, value=label) @@ -79,7 +79,7 @@ void SequenceNumberResolver::register_label_offset( std::string const& label, co if ( ret_rev.second == false ) { std::ostringstream msg; msg << "Multiple sequence claims with offset " << offset; - throw utility::excn::EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ); } } @@ -121,7 +121,7 @@ std::map::const_iterator SequenceNumberResolver::search else { std::ostringstream msg; msg << "Iterator of SequenceNumberResolver is out of range for pose number " << pose_number; - throw utility::excn::EXCN_RangeError( msg.str() ); + throw CREATE_EXCEPTION(utility::excn::RangeError, msg.str() ); } return itlow; } diff --git a/source/src/protocols/topology_broker/StartStructClaimer.cc b/source/src/protocols/topology_broker/StartStructClaimer.cc index 296899fbd0..14fcbbf708 100644 --- a/source/src/protocols/topology_broker/StartStructClaimer.cc +++ b/source/src/protocols/topology_broker/StartStructClaimer.cc @@ -130,8 +130,8 @@ void StartStructClaimer::initialize_dofs( try{ mover(); - } catch( utility::excn::EXCN_NullPointer & excn ) { - throw( EXCN_Input( "StartStructureClaimer needs JobInputter or FILE entry in broker-setup")); + } catch( utility::excn::NullPointerError & excn ) { + throw ( CREATE_EXCEPTION(EXCN_Input, "StartStructureClaimer needs JobInputter or FILE entry in broker-setup")); } FragmentClaimer::initialize_dofs( pose, init_dofs, failed_to_init ); diff --git a/source/src/protocols/topology_broker/TemplateFragmentClaimer.cc b/source/src/protocols/topology_broker/TemplateFragmentClaimer.cc index d3bf140123..688df18d12 100644 --- a/source/src/protocols/topology_broker/TemplateFragmentClaimer.cc +++ b/source/src/protocols/topology_broker/TemplateFragmentClaimer.cc @@ -99,7 +99,7 @@ void TemplateFragmentClaimer::init_after_reading() { read_config_file( config_file_ ); } if ( !templates_ ) { - throw EXCN_Input( "TemplateFragmentClaimer not initialized properly, use CMD_FLAG and -templates:config or FILE configfile" ); + throw CREATE_EXCEPTION(EXCN_Input, "TemplateFragmentClaimer not initialized properly, use CMD_FLAG and -templates:config or FILE configfile" ); } } diff --git a/source/src/protocols/topology_broker/TemplateJumpClaimer.cc b/source/src/protocols/topology_broker/TemplateJumpClaimer.cc index 5f0241f121..f014d1fe9e 100644 --- a/source/src/protocols/topology_broker/TemplateJumpClaimer.cc +++ b/source/src/protocols/topology_broker/TemplateJumpClaimer.cc @@ -105,7 +105,7 @@ bool TemplateJumpClaimer::read_tag( std::string tag, std::istream& is ) { if ( tag == "file" ) { std::string file; is >> file; - if ( jump_def() ) EXCN_Input( "Define either template config-file or topology_file for " + type() ); + if ( jump_def() ) throw CREATE_EXCEPTION(EXCN_Input, "Define either template config-file or topology_file for " + type() ); read_config_file( file ); } else if ( tag == "PAIRING_FILE" ) { // get pairings file @@ -133,7 +133,7 @@ bool TemplateJumpClaimer::read_tag( std::string tag, std::istream& is ) { } else if ( tag == "topol_file" || tag == "TOPOL_FILE" ) { std::string file; is >> file; - if ( jump_def() ) EXCN_Input( "Define either template config-file or topology_file for " + type() ); + if ( jump_def() ) throw CREATE_EXCEPTION(EXCN_Input, "Define either template config-file or topology_file for " + type() ); read_topol_file( file ); } else return FragmentJumpClaimer::read_tag( tag, is ); return true; @@ -144,8 +144,8 @@ void TemplateJumpClaimer::init_after_reading() { read_config_file( basic::options::option[ basic::options::OptionKeys::templates::config ]() ); } if ( pairings_.size() ) { - if ( !ss_def_ ) EXCN_Input( "If you use PAIRING_FILE you also have to specify SS_INFO " ); - if ( !sheets_.size() ) EXCN_Input( "If you use PAIRING_FILE you also have to specify SHEET or RANDOM_SHEET " ); + if ( !ss_def_ ) throw CREATE_EXCEPTION(EXCN_Input, "If you use PAIRING_FILE you also have to specify SS_INFO " ); + if ( !sheets_.size() ) throw CREATE_EXCEPTION(EXCN_Input, "If you use PAIRING_FILE you also have to specify SHEET or RANDOM_SHEET " ); if ( bRandomSheet_ ) set_jump_def( jumping::BaseJumpSetupOP( new jumping::RandomSheetBuilder( ss_def_, pairings_, sheets_ ) ) ); else set_jump_def( jumping::BaseJumpSetupOP( new jumping::SheetBuilder( ss_def_, pairings_, sheets_ ) ) ); } diff --git a/source/src/protocols/topology_broker/TopologyBroker.cc b/source/src/protocols/topology_broker/TopologyBroker.cc index 20523448c4..80daac599d 100644 --- a/source/src/protocols/topology_broker/TopologyBroker.cc +++ b/source/src/protocols/topology_broker/TopologyBroker.cc @@ -270,7 +270,7 @@ void TopologyBroker::apply_filter( core::pose::Pose const & pose, std::ostringstream report; if ( !claimer->passes_filter( pose, stage_id, progress, report ) ) { tr.Debug.flush(); - throw EXCN_FilterFailed( report.str() ); + throw CREATE_EXCEPTION(EXCN_FilterFailed, report.str() ); } if ( report.str().size() ) { tr.Debug << "CLAIMER " << claimer->type() << ":" << claimer->label() << " FILTER REPORT: \n" @@ -375,7 +375,7 @@ void TopologyBroker::build_fold_tree( claims::DofClaims & claims, Size nres ) { root = sequence_number_resolver_->find_global_pose_number(root_ptr->local_position()); // root_ptr->get_position(); excl_root_set = root_ptr->exclusive(); } else { - throw( kinematics::EXCN_InvalidFoldTree( "Shouldn't have two exclusive roots --- ask oliver, throw an exception ?", + throw ( CREATE_EXCEPTION(kinematics::EXCN_InvalidFoldTree, "Shouldn't have two exclusive roots --- ask oliver, throw an exception ?", *fold_tree_ ) ); } } @@ -447,7 +447,7 @@ void TopologyBroker::build_fold_tree( claims::DofClaims & claims, Size nres ) { for ( Size i = 1; i<= sorted_jumps.size(); ++i ) { msg << jumps( 1, i ) << " " << jumps( 2, i ) << std::endl; } - throw( kinematics::EXCN_InvalidFoldTree( "TopologyBroker failed to make a fold-tree in 10 attempts\n"+msg.str(), + throw ( CREATE_EXCEPTION(kinematics::EXCN_InvalidFoldTree, "TopologyBroker failed to make a fold-tree in 10 attempts\n"+msg.str(), *fold_tree_ ) ); } @@ -464,7 +464,7 @@ void TopologyBroker::build_fold_tree( claims::DofClaims & claims, Size nres ) { << " JumpClaims. A trivial (but scientifically invalid) solution would be to add a " << "BasicJumpClaimer to the topology broker setup file (.tpb) to claim a jump between disconnected chains." << std::endl; - throw ( utility::excn::EXCN_BadInput( msg.str() ) ); + throw ( CREATE_EXCEPTION(utility::excn::BadInput, msg.str() ) ); } } @@ -491,7 +491,7 @@ void TopologyBroker::build_fold_tree( claims::DofClaims & claims, Size nres ) { final_fold_tree_->random_tree_from_jump_points( nres, n_non_removed, after_loops_jumps, obligate_cut_points, cut_bias_farray, root ); if ( !bValidFinalTree ) { - throw( kinematics::EXCN_InvalidFoldTree( "TopologyBroker failed to make a final_fold-tree in 1 attempts ", + throw ( CREATE_EXCEPTION(kinematics::EXCN_InvalidFoldTree, "TopologyBroker failed to make a final_fold-tree in 1 attempts ", *final_fold_tree_ ) ); } for ( Size i = 1; i <= n_non_removed; ++i ) { @@ -590,7 +590,7 @@ claims::SequenceClaim & TopologyBroker::resolve_sequence_label( std::string cons found = sequence_claim; } } - if ( !found ) throw EXCN_Unknown( "requested SequenceLabel " + label + " not found " ); + if ( !found ) throw CREATE_EXCEPTION(EXCN_Unknown, "requested SequenceLabel " + label + " not found " ); return *found; } @@ -615,7 +615,7 @@ void TopologyBroker::initialize_dofs( claims::DofClaims & claims, core::pose::Po msg << "BBClaim at (" << pos.first << ", " << pos.second << ") claimed by " << bb_claim->owner().lock()->type() << " using label '" << bb_claim->owner().lock()->label() << "' is has an invalid label. The global sequence position" << " cannot be globally resolved." << std::endl; - throw EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(BadInput, msg.str() ); } if ( global_position > pose.size() ) { @@ -623,7 +623,7 @@ void TopologyBroker::initialize_dofs( claims::DofClaims & claims, core::pose::Po msg << "BBClaim makes claim to (" << pos.first << ", " << pos.second << " == " << global_position << " global) in pose of " << pose.size() << " residues. This can result when fragments are inconsistent " << "with FASTA, or label are incorrect." << std::endl; - throw EXCN_BadInput( msg.str() ); + throw CREATE_EXCEPTION(BadInput, msg.str() ); } if ( !bb_claims[ global_position ] || bb_claims[ global_position ]->right() < bb_claim->right() ) { bb_claims[ global_position ] = bb_claim; @@ -667,7 +667,7 @@ void TopologyBroker::initialize_dofs( claims::DofClaims & claims, core::pose::Po runtime_assert( !bUnitializedJump ); } } - if ( bad ) throw( EXCN_Input( dof_msg.str() ) ); + if ( bad ) throw ( CREATE_EXCEPTION(EXCN_Input, dof_msg.str() ) ); claims::DofClaims cumulated; std::copy( bb_claims.begin(), bb_claims.end(), back_inserter( cumulated ) ); @@ -691,7 +691,7 @@ void TopologyBroker::initialize_dofs( claims::DofClaims & claims, core::pose::Po if ( failures.size() ) { std::ostringstream dof_msg; dof_msg << "failed to initialize dofs for these claims: .... " << failures << std::endl; - throw EXCN_Unknown( dof_msg.str() ); + throw CREATE_EXCEPTION(EXCN_Unknown, dof_msg.str() ); } runtime_assert( failures.size() == 0 ); //should have thrown exception before -- up @@ -942,7 +942,7 @@ bool TopologyBroker::check_chainbreak_variants( for ( core::Size to_be_closed_cut : to_be_closed_cuts_ ) { tr.Debug << "consider cut between res " << to_be_closed_cut << " and " << to_be_closed_cut+1 << std::endl; if ( !pose.fold_tree().is_cutpoint( to_be_closed_cut ) ) { - throw( kinematics::EXCN_InvalidFoldTree( "Foldtree missmatch", pose.fold_tree() ) ); + throw ( CREATE_EXCEPTION(kinematics::EXCN_InvalidFoldTree, "Foldtree missmatch", pose.fold_tree() ) ); } if ( pose.residue( to_be_closed_cut ).has_variant_type( chemical::CUTPOINT_LOWER ) && pose.residue( to_be_closed_cut+1 ).has_variant_type( chemical::CUTPOINT_UPPER ) ) { diff --git a/source/src/protocols/topology_broker/TopologyClaimer.cc b/source/src/protocols/topology_broker/TopologyClaimer.cc index ba5eb3796c..77c9a0ff5e 100644 --- a/source/src/protocols/topology_broker/TopologyClaimer.cc +++ b/source/src/protocols/topology_broker/TopologyClaimer.cc @@ -98,13 +98,13 @@ void TopologyClaimer::read_mover_weight( std::istream& is ) { } else if ( type == "AllStage" ) { //always on set_mover_weight( weights::AbinitioMoverWeightOP( new weights::ConstAbinitioMoverWeight( weight ) ) ); } else { - throw EXCN_Input( "weight can only by one of LargeStage, SmallStage or AllStage " ); + throw CREATE_EXCEPTION(EXCN_Input, "weight can only by one of LargeStage, SmallStage or AllStage " ); } } void TopologyClaimer::unknown_tag( std::string tag, std::istream& is ) const { std::string line; getline(is, line); - throw EXCN_Input ("ERROR reading broker-setup. unknown tag: " + tag + " in line:\n " + tag + line + "\n"); + throw CREATE_EXCEPTION(EXCN_Input, "ERROR reading broker-setup. unknown tag: " + tag + " in line:\n " + tag + line + "\n"); } void TopologyClaimer::read( std::istream& is ) { diff --git a/source/src/protocols/topology_broker/util.cc b/source/src/protocols/topology_broker/util.cc index a74dad38d9..b23f57c8db 100644 --- a/source/src/protocols/topology_broker/util.cc +++ b/source/src/protocols/topology_broker/util.cc @@ -186,12 +186,12 @@ void add_claims_from_stream( TopologyBroker& broker, std::istream& is , CmdLine } if ( !frags_large || !frags_small ) { - throw utility::excn::EXCN_BadInput("ABINITIO_FRAGS macro used in topology broker setup without both 'LARGE' and 'SMALL' tags specifying 9-mer and 3-mer frags."); + throw CREATE_EXCEPTION(utility::excn::BadInput, "ABINITIO_FRAGS macro used in topology broker setup without both 'LARGE' and 'SMALL' tags specifying 9-mer and 3-mer frags."); } fragment_list.add_back( FragmentContainer(frags_large, frags_small, frags_label) ); } else { - throw utility::excn::EXCN_BadInput(" unrecognized tag " + tag ); + throw CREATE_EXCEPTION(utility::excn::BadInput, " unrecognized tag " + tag ); } } //while is tag @@ -202,13 +202,13 @@ void add_claims_from_file( TopologyBroker& broker, std::string const& file , Cmd utility::io::izstream is; if ( file != "NO_SETUP_FILE" ) { is.open( file ); - if ( !is.good() ) throw EXCN_FileNotFound( file ); + if ( !is.good() ) throw CREATE_EXCEPTION(FileNotFound, file ); } try { add_claims_from_stream( broker, is , cmdline_data, fragment_list ); - } catch ( EXCN_BadInput &excn ) { - throw EXCN_BadInput( excn.msg() + " occurred when reading file "+file ); //of course I loose the speciality of the EXCEPTION + } catch ( BadInput &excn ) { + throw CREATE_EXCEPTION(BadInput, excn.msg() + " occurred when reading file "+file ); //of course I loose the speciality of the EXCEPTION } //that might be just eof check for is.fail() ??? don't check...not my problem ? } @@ -247,7 +247,7 @@ void add_cmdline_claims( TopologyBroker& broker, bool const do_I_need_frags ) { } if ( input_fragments.size() == 0 ) { if ( do_I_need_frags ) { - throw utility::excn::EXCN_BadInput( "expected LARGE and SMALL fragment sets in ABINITIO_FRAGS section or via command line "); + throw CREATE_EXCEPTION(utility::excn::BadInput, "expected LARGE and SMALL fragment sets in ABINITIO_FRAGS section or via command line "); } else { return; } @@ -305,7 +305,7 @@ void add_cmdline_claims( TopologyBroker& broker, bool const do_I_need_frags ) { broker.add( TopologyClaimerOP( new SequenceClaimer ( sequence, "DEFAULT", core::chemical::CENTROID ) ) ); } else { - throw utility::excn::EXCN_BadInput("Error: can't read sequence! Use -in::file::fasta sequence.fasta or -in::file::native native.pdb!"); + throw CREATE_EXCEPTION(utility::excn::BadInput, "Error: can't read sequence! Use -in::file::fasta sequence.fasta or -in::file::native native.pdb!"); } //broker.add( new SequenceClaimer ( sequence, core::chemical::CENTROID ) ); diff --git a/source/src/python/PyRosetta/src/test/T009_Exceptions.py b/source/src/python/PyRosetta/src/test/T009_Exceptions.py index e9fbed7d59..1489fc88e3 100644 --- a/source/src/python/PyRosetta/src/test/T009_Exceptions.py +++ b/source/src/python/PyRosetta/src/test/T009_Exceptions.py @@ -29,9 +29,9 @@ t = sys.exc_info()[0] e = sys.exc_info()[1] print('Exceptions type: {}, message: {}'.format(t, e) ) - assert str(e) == 'parser::protocol file must specify PROTOCOLS section' + assert 'parser::protocol file must specify PROTOCOLS section' in str(e) try: parser.generate_mover_for_protocol(pose, False, tag, options) except RuntimeError as e: - assert str(e) == 'parser::protocol file must specify PROTOCOLS section' + assert 'parser::protocol file must specify PROTOCOLS section' in str(e) diff --git a/source/src/utility/SimulateMPI.cc b/source/src/utility/SimulateMPI.cc index 3f5dc2c6a0..971d8c23ab 100644 --- a/source/src/utility/SimulateMPI.cc +++ b/source/src/utility/SimulateMPI.cc @@ -135,7 +135,7 @@ SimulateMPIData::pop_next_message_for_node_of_type( platform::Size dst, simulate } } if ( most_recent_index == 0 ) { - throw excn::EXCN_Msg_Exception( "SimulatedMPIData could not pop a message of type '" + msg_name( msg_type ) + "' for node " + to_string( dst ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "SimulatedMPIData could not pop a message of type '" + msg_name( msg_type ) + "' for node " + to_string( dst ) ); } most_recent_message->mark_as_processed(); return most_recent_message; @@ -151,12 +151,12 @@ SimulateMPIData::pop_next_message_of_type( clear_processed_msgs( messages_[ dst ][ src ] ); SimulateMPIMessageOP msg; if ( messages_[ dst ][ src ].empty() ) { - throw excn::EXCN_Msg_Exception( "Could not retrieve a " + msg_name( msg_type ) + " message to " + to_string( dst ) + " from " + to_string( src ) + "; message queue is empty" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not retrieve a " + msg_name( msg_type ) + " message to " + to_string( dst ) + " from " + to_string( src ) + "; message queue is empty" ); } msg = messages_[ dst ][ src ].front(); if ( msg->msg_type() != msg_type ) { - throw excn::EXCN_Msg_Exception( "Could not retrieve a " + msg_name( msg_type ) + " message to " + to_string( dst ) + " from " + to_string( src ) + "; next message is of type " + msg_name( msg->msg_type() ) ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Could not retrieve a " + msg_name( msg_type ) + " message to " + to_string( dst ) + " from " + to_string( src ) + "; next message is of type " + msg_name( msg->msg_type() ) ); } msg->mark_as_processed(); diff --git a/source/src/utility/backtrace.cc b/source/src/utility/backtrace.cc index 743e5e92ee..c11d10ae65 100644 --- a/source/src/utility/backtrace.cc +++ b/source/src/utility/backtrace.cc @@ -29,7 +29,7 @@ bool maybe_throw_on_next_assertion_failure( char const * condition ) { if ( throw_the_next_time_an_assertion_failure_is_hit ) { throw_the_next_time_an_assertion_failure_is_hit = false; - throw utility::excn::EXCN_Msg_Exception( std::string( "assertion failure hit:" ) + condition ); + throw CREATE_EXCEPTION(utility::excn::Exception, std::string( "assertion failure hit:" ) + condition ); } return false; } diff --git a/source/src/utility/excn/EXCN_Base.fwd.hh b/source/src/utility/excn/EXCN_Base.fwd.hh deleted file mode 100644 index 5351957d52..0000000000 --- a/source/src/utility/excn/EXCN_Base.fwd.hh +++ /dev/null @@ -1,26 +0,0 @@ -// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- -// vi: set ts=2 noet: -// -// (c) Copyright Rosetta Commons Member Institutions. -// (c) This file is part of the Rosetta software suite and is made available under license. -// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. -// (c) For more information, see http://www.rosettacommons.org. Questions about this can be -// (c) addressed to University of Washington CoMotion, email: license@uw.edu. - -/// @file utility/excn/EXCN_Base.fwd.hh -/// @brief Declaration for the base class for Exception system -/// @author Oliver Lange - - -#ifndef INCLUDED_utility_excn_EXCN_Base_FWD_HH -#define INCLUDED_utility_excn_EXCN_Base_FWD_HH - - -namespace utility { -namespace excn { - -class EXCN_Base; - -} -} -#endif diff --git a/source/src/utility/excn/EXCN_Base.hh b/source/src/utility/excn/EXCN_Base.hh deleted file mode 100644 index 100a44b811..0000000000 --- a/source/src/utility/excn/EXCN_Base.hh +++ /dev/null @@ -1,94 +0,0 @@ -// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- -// vi: set ts=2 noet: -// -// (c) Copyright Rosetta Commons Member Institutions. -// (c) This file is part of the Rosetta software suite and is made available under license. -// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. -// (c) For more information, see http://www.rosettacommons.org. Questions about this can be -// (c) addressed to University of Washington CoMotion, email: license@uw.edu. - -/// @file utility/excn/EXCN_Base.hh -/// @brief base class for Exception system -/// @author Oliver Lange - - -#ifndef INCLUDED_utility_excn_EXCN_Base_HH -#define INCLUDED_utility_excn_EXCN_Base_HH - -// Unit Headers -#include - -// Package Headers -#include -#include -#include -#include - -#include - -namespace utility { -namespace excn { - -/* ********************************************************************************************************* -************************************************************************************************************ -********************* ********************* -********************* W A R N I N G ********************* -********************* ********************* -************************************************************************************************************ -************************************************************************************************************ -don't use this Exception definition anywhere apart from -in the jd2::JobDistributor -( or in your main if you don't use the JobDistributor ) -instead derive your Exceptions from EXCN_Exception -and only catch EXCN_Exception or child-classes -( except in main and jdist, where you should catch EXCN_Base ) - -Oliver -Matthew O'Meara -************************************************************************************************************ -************************************************************************************************************ -*/ -class EXCN_Base : public std::exception -{ -protected: - EXCN_Base() { - //would like to add an option run:no_exceptions - // * if ( option[ run::no_exceptions ] ) { - //exit - the hard way: - //damn can't call virtual from constructor.... - //show( std::cerr ); - - - //* THE ASSERT MACRO is here that one can find the origin of the EXCEPTION in gdb */ - // debug_assert( false ); - // a better method for this is to issue the command - // catch throw - // in the gdb command line... now gdb will stop execution when an Exception - // http://www.delorie.com/gnu/docs/gdb/gdb_31.html - /* IN RELEASE MODE THIS HAS CONSTRUCTOR MUST NOT FAIL! --- otherwise the ERROR Msg get's lost! */ - }; -public: - virtual ~EXCN_Base() {} - virtual void show( std::ostream& ) const = 0; - virtual std::string const msg() const { - std::string msg; - std::ostringstream os; - show( os ); - msg = os.str(); - return msg; - }; - - virtual const char * what() const noexcept override { - const char * msg = "EXCN_Base::what()"; - return msg; - } -}; - -inline std::ostream& operator << ( std::ostream& os, EXCN_Base const & excn ) { - excn.show( os ); - return os; -} - -} -} -#endif diff --git a/source/src/utility/excn/Exceptions.cc b/source/src/utility/excn/Exceptions.cc index 4b8baa4045..54d9abcb32 100644 --- a/source/src/utility/excn/Exceptions.cc +++ b/source/src/utility/excn/Exceptions.cc @@ -22,7 +22,29 @@ namespace utility { namespace excn { -void EXCN_Msg_Exception::show( std::ostream& os ) const { + +Exception::Exception(char const *file, int line, std::string const &msg) : + msg_ ( std::string("\n\nFile: ") + file + ':' + std::to_string(line) + "\n" + msg ) +{ + + //would like to add an option run:no_exceptions + // * if ( option[ run::no_exceptions ] ) { + //exit - the hard way: + //damn can't call virtual from constructor.... + //show( std::cerr ); + + + //* THE ASSERT MACRO is here that one can find the origin of the EXCEPTION in gdb */ + // debug_assert( false ); + // a better method for this is to issue the command + // catch throw + // in the gdb command line... now gdb will stop execution when an Exception + // http://www.delorie.com/gnu/docs/gdb/gdb_31.html + /* IN RELEASE MODE THIS HAS CONSTRUCTOR MUST NOT FAIL! --- otherwise the ERROR Msg get's lost! */ +} + + +void Exception::show( std::ostream& os ) const { os << msg() << std::endl; } diff --git a/source/src/utility/excn/Exceptions.fwd.hh b/source/src/utility/excn/Exceptions.fwd.hh index 62be997484..771754a1b7 100644 --- a/source/src/utility/excn/Exceptions.fwd.hh +++ b/source/src/utility/excn/Exceptions.fwd.hh @@ -10,6 +10,7 @@ /// @file utility/excn/Exceptions.fwd.hh /// @brief Declarations for many of the common exception subclasses /// @author Oliver Lange +/// @author Sergey Lyskov #ifndef INCLUDED_utility_excn_Exceptions_FWD_HH @@ -18,16 +19,16 @@ namespace utility { namespace excn { -class EXCN_Exception; -class EXCN_Msg_Exception; -class EXCN_IO; -class EXCN_BadInput; -class EXCN_FileNotFound; -class EXCN_RangeError; -class EXCN_KeyError; -class EXCN_NullPointer; -class EXCN_RosettaScriptsOption; -class EXCN_JD2Failure; +class Exception; +//using EXCN_Msg_Exception = EXCN_Exception; +class IOError; +class BadInput; +class FileNotFound; +class RangeError; +class KeyError; +class NullPointerError; +class RosettaScriptsOptionError; +class JD2Failure; } } diff --git a/source/src/utility/excn/Exceptions.hh b/source/src/utility/excn/Exceptions.hh index c6ab0d7515..16be5942c4 100644 --- a/source/src/utility/excn/Exceptions.hh +++ b/source/src/utility/excn/Exceptions.hh @@ -10,6 +10,7 @@ /// @file utility/excn/Exceptions.hh /// @brief common derived classes for thrown exceptions /// @author Oliver Lange +/// @author Sergey Lyskov #ifndef INCLUDED_utility_excn_Exceptions_HH @@ -17,32 +18,18 @@ // Unit Headers -#include #include -#include - // Package Headers +#include #include #include +#include namespace utility { namespace excn { -/* ********************************************************************************************************* -************************************************************************************************************ -********************* ********************* -********************* W A R N I N G ********************* -********************* ********************* -************************************************************************************************************ -************************************************************************************************************ -Please wait until this note is gone before you start using this interface -so far it is very experimental and should remain fluid. -We will have something definite soon. bug us per email if you need to know details -Oliver -Matthew O'Meara - - +/* generally: include files will be found in //Exceptions.hh @@ -50,91 +37,93 @@ for specialized Exceptions e.g. a EXCN_InvalidFoldTree all-purpose exceptions are all bundled together in this header. if this gets to big we will have extra forward declarations in Exceptions.fwd.hh - -************************************************************************************************************ -************************************************************************************************************ */ -class EXCN_Exception : public EXCN_Base { +#define CREATE_EXCEPTION(type, ...) type(__FILE__, __LINE__, __VA_ARGS__) + +class Exception : public std::exception +{ public: + Exception() = delete; // NO DEFAULT CONSTRUCTOR, do not remove this line!!! This is needed to ensure that appropriate message specifying origin of the exception is provided. This will allow identification of origin of exceptions without need to dive into debugger. -}; + // + // intended usage is CREATE_EXCEPTION(Exception, "something went wrong: ..."); + // or if you need to avoid macro Exception(__FILE__, __LINE__, "something went wrong: ...") + Exception(char const *file, int line, std::string const &msg); -class EXCN_Msg_Exception : public EXCN_Exception { -public: - EXCN_Msg_Exception( std::string msg ) : msg_(std::move( msg )) {}; - void show( std::ostream& ) const override; - std::string const msg() const override { return msg_; }; - virtual void add_msg( std::string const& str ) { - msg_ = msg_+"\n"+str; + virtual ~Exception() {} + + + void show( std::ostream& ) const; + + std::string msg() const { return msg_; }; + + void msg(std::string const &m) { msg_ = m; }; + + void add_msg( std::string const& str ) { + msg_ = msg_ + '\n' + str; } - virtual const char * what() const noexcept override { +private: + // disabling access to what in favor of msg() + char const * what() const noexcept override { return msg_.c_str(); } -protected: - EXCN_Msg_Exception() {}; private: std::string msg_; }; -class EXCN_IO : public virtual EXCN_Msg_Exception { +inline std::ostream& operator << ( std::ostream& os, Exception const & excn ) { + excn.show( os ); + return os; +} + + +class IOError : public Exception { protected: - EXCN_IO() {}; + using Exception::Exception; }; /// @brief EXCN_BadInput, as an IO error, should only be used for bad *user* input. /// Do not use for something which is just bad function input. -class EXCN_BadInput : public EXCN_IO { +class BadInput : public IOError { public: - EXCN_BadInput( std::string const& msg ) : EXCN_Msg_Exception( msg ) {}; -protected: - EXCN_BadInput() {}; -private: + using IOError::IOError; + }; -class EXCN_FileNotFound : public EXCN_IO { +class FileNotFound : public IOError { public: - EXCN_FileNotFound( std::string const& file ) : - EXCN_Msg_Exception( "unable to open file " + file ), file_( file ) {}; + FileNotFound(char const * file, int line, std::string const& not_found_file_name ) : IOError(file, line, std::string("unable to open file ") + file ), file_( not_found_file_name ) {}; private: std::string file_; }; -class EXCN_RangeError : public EXCN_Msg_Exception { +class RangeError : public Exception { public: - EXCN_RangeError( std::string const& msg ) : - EXCN_Msg_Exception( msg ) {}; -private: + using Exception::Exception; }; -class EXCN_KeyError : public EXCN_Msg_Exception { +class KeyError : public Exception { public: - EXCN_KeyError(std::string const & msg) : - EXCN_Msg_Exception( msg ) {}; -private: + + using Exception::Exception; }; -class EXCN_NullPointer: public EXCN_RangeError { +class NullPointerError: public RangeError { public: - EXCN_NullPointer( std::string const& msg ) : - EXCN_RangeError( msg ) {}; -private: + using RangeError::RangeError; }; -class EXCN_RosettaScriptsOption : public EXCN_Msg_Exception { +class RosettaScriptsOptionError : public Exception { public: - EXCN_RosettaScriptsOption( std::string const& msg ) : - EXCN_Msg_Exception( msg ) {}; -private: + using Exception::Exception; }; -class EXCN_JD2Failure : public EXCN_Msg_Exception { +class JD2Failure : public Exception { public: - EXCN_JD2Failure( std::string const& msg ) : - EXCN_Msg_Exception( msg ) {}; -private: + using Exception::Exception; }; } diff --git a/source/src/utility/exit.cc b/source/src/utility/exit.cc index 9b213835bb..67f67b3f59 100644 --- a/source/src/utility/exit.cc +++ b/source/src/utility/exit.cc @@ -17,7 +17,7 @@ #endif // Unit headers #include -#include +#include #include #include @@ -50,6 +50,14 @@ namespace utility { +struct UtilityExitException : excn::Exception //noboday should be allowed to throw this... that's why its privately hidden in this modul... +{ + UtilityExitException(char const * file, int line, std::string const& msg) : Exception(file, line, "[ ERROR ] UtilityExitException\nERROR: " + msg + "\n\n") + {} +}; + + + /// Place holder for 'end-action' of utility::exit(…) static void (*main_exit_callback)(void) = 0; @@ -81,34 +89,11 @@ void remove_exit_callback( UtilityExitCallBack cb ) } -class EXCN_utility_exit : public excn::EXCN_Base { //noboday should be allowed to throw this... that's why its privately hidden in this modul... -public: - EXCN_utility_exit( std::string const& msg, std::string const& file, int const line ); - virtual void show( std::ostream& ) const; -private: - std::string const msg_; - std::string const file_; - int const line_; -}; - - -EXCN_utility_exit::EXCN_utility_exit( std::string const& msg, std::string const& file, int const line ) : - msg_( msg ), - file_( file ), - line_( line ) -{} - -void EXCN_utility_exit::show( std::ostream& os ) const { - os << "\n\n[ ERROR ] EXCN_utility_exit has been thrown from: " - << file_ << " line: " << line_ << "\n"; - if ( ! msg_.empty() ) os << "ERROR: " << msg_ << "\n\n"; -} - /// @brief Exit with file + line + message + optional status void exit( - std::string const & file, + char const * file, int const line, std::string const & message, int const status @@ -134,7 +119,7 @@ exit( #ifndef BOINC // why did this get placed here basically skipping the logic below?! - throw EXCN_utility_exit( message, file, line ); + throw UtilityExitException(file, line, message); #endif #ifdef USEMPI @@ -182,7 +167,7 @@ exit( } #endif // BOINC - throw EXCN_utility_exit( message, file, line ); + throw UtilityExitException(file, line, message); } @@ -191,7 +176,7 @@ exit( int cond_exit( bool condition, - std::string const & file, + char const * file, int const line, std::string const & message, int const status diff --git a/source/src/utility/exit.hh b/source/src/utility/exit.hh index 840b522c22..83d832b736 100644 --- a/source/src/utility/exit.hh +++ b/source/src/utility/exit.hh @@ -87,8 +87,8 @@ namespace utility { /// @brief Exit with file + line + message + optional status void exit( - std::string const & file, - int const line, + char const * file, + int line, std::string const & message, int const status = 1 ) NORETURN; @@ -97,7 +97,7 @@ exit( int cond_exit( bool condition, - std::string const & file, + char const * file, int const line, std::string const & message, int const status = 1 @@ -108,7 +108,7 @@ cond_exit( inline void exit( - std::string const & file, + char const * file, int const line, int const status = 1 ) NORETURN; @@ -118,7 +118,7 @@ exit( inline void exit( - std::string const & file, + char const * file, int const line, int const status ) @@ -134,7 +134,7 @@ inline void exit( int const status, - std::string const & file, + char const * file, int const line ) { diff --git a/source/src/utility/graph/BFS_prune.hh b/source/src/utility/graph/BFS_prune.hh index 78b7379a49..113fb9edae 100644 --- a/source/src/utility/graph/BFS_prune.hh +++ b/source/src/utility/graph/BFS_prune.hh @@ -31,8 +31,8 @@ namespace graph { /// @brief Class to raise to do an immediate stop of a breadth first search. /// ONLY THROW FROM WITHIN A VISITOR PASSED TO breadth_first_visit_prune/breadth_first_search_prune -class EXCN_Stop_BFS : public utility::excn::EXCN_Msg_Exception { - EXCN_Stop_BFS(): EXCN_Msg_Exception("Uncaught BFS Stop exception") {} +class EXCN_Stop_BFS : public utility::excn::Exception { + using utility::excn::Exception::Exception; }; diff --git a/source/src/utility/integer_mapping.cc b/source/src/utility/integer_mapping.cc index 27273faa18..34aaeaec10 100644 --- a/source/src/utility/integer_mapping.cc +++ b/source/src/utility/integer_mapping.cc @@ -55,12 +55,12 @@ void subset_mapping::reserve_destination_size( platform::Size dst_size ) void subset_mapping::set_next_correspondence( platform::Size source_id ) { if ( source_id > src_2_dst_.size() || source_id == 0 ) { - throw excn::EXCN_Msg_Exception( "subset_mapping::set_next_correspondence " + throw CREATE_EXCEPTION(excn::Exception, "subset_mapping::set_next_correspondence " "recieved an out-of-bounds source id (" + to_string( source_id ) + ") " "with a source-enumeration size of " + to_string( src_2_dst_.size() ) ); } if ( src_2_dst_[ source_id ] != UNMAPPED ) { - throw excn::EXCN_Msg_Exception( "subset_mapping::set_next_correspondence " + throw CREATE_EXCEPTION(excn::Exception, "subset_mapping::set_next_correspondence " "recieved an already-mapped source id (" + to_string( source_id ) + ") " "which had been previously assigned to destination id " + to_string( src_2_dst_[ source_id ] ) ); } @@ -79,4 +79,3 @@ platform::Size subset_mapping::d2s( platform::Size destination_id ) const { retu bool subset_mapping::source_id_is_mapped( platform::Size source_id ) const { return src_2_dst_[ source_id ] != UNMAPPED; } } - diff --git a/source/src/utility/io/FileContentsMap.cc b/source/src/utility/io/FileContentsMap.cc index 9a7a35a4e9..19a90bd8ac 100644 --- a/source/src/utility/io/FileContentsMap.cc +++ b/source/src/utility/io/FileContentsMap.cc @@ -136,10 +136,10 @@ FileContentsMap::get_file_contents( std::string const & filename ) if ( refuse_unexpected_files_ ) { if ( rl_iter == read_limit_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "Unexpected file-read requested: " + filename ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Unexpected file-read requested: " + filename ); } if ( rc_iter == read_counts_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "read_counts_ map does not contain an entry for file: " + filename ); + throw CREATE_EXCEPTION(utility::excn::Exception, "read_counts_ map does not contain an entry for file: " + filename ); } } else { if ( rl_iter == read_limit_.end() ) { @@ -166,7 +166,7 @@ FileContentsMap::get_file_contents( std::string const & filename ) if ( rl_iter->second != 0 && rl_iter->second == rc_iter->second ) { if ( fc_iter == file_contents_.end() ) { - throw utility::excn::EXCN_Msg_Exception( "file-contents map does not contain an entry for file that has been read before: " + filename ); + throw CREATE_EXCEPTION(utility::excn::Exception, "file-contents map does not contain an entry for file that has been read before: " + filename ); } std::string fc = fc_iter->second; if ( delete_contents_at_nread_limit_ ) file_contents_.erase( fc_iter ); diff --git a/source/src/utility/json_spirit/json_spirit_tools.cc b/source/src/utility/json_spirit/json_spirit_tools.cc index 441e94e4a4..55245e1de3 100644 --- a/source/src/utility/json_spirit/json_spirit_tools.cc +++ b/source/src/utility/json_spirit/json_spirit_tools.cc @@ -31,7 +31,7 @@ mValue get_value(const mObject& obj, const std::string& name ) { auto i = obj.find(name); if ( i == obj.end() ) { - throw utility::excn::EXCN_Msg_Exception("Cannot find member '" + name + "'" ); + throw CREATE_EXCEPTION(utility::excn::Exception,"Cannot find member '" + name + "'" ); } return i->second; } @@ -39,21 +39,21 @@ mValue get_value(const mObject& obj, const std::string& name ) mObject get_mObject(const mObject& obj, const std::string& name ) { mValue value = get_value( obj, name ); - if ( value.type() != obj_type ) { throw utility::excn::EXCN_Msg_Exception("JSON error: '" + name + "' is not an object" ); } + if ( value.type() != obj_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON error: '" + name + "' is not an object" ); } return value.get_obj(); } mArray get_mArray(const mObject& obj, const std::string& name ) { const mValue value = get_value( obj, name ); - if ( value.type() != array_type ) { throw utility::excn::EXCN_Msg_Exception("JSON error: '" + name + "' is not an Array" ); } + if ( value.type() != array_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON error: '" + name + "' is not an Array" ); } return value.get_array(); } mArray read_mArray( const std::string& json_string ){ mValue value; read_or_throw(json_string, value); - if ( value.type() != array_type ) { throw utility::excn::EXCN_Msg_Exception("JSON read error: expected an Array"); } + if ( value.type() != array_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON read error: expected an Array"); } return value.get_array(); } @@ -61,14 +61,14 @@ mArray read_mArray( const std::string& json_string ){ mObject read_mObject( const std::string& json_string ){ mValue value; read_or_throw(json_string, value); - if ( value.type() != obj_type ) { throw utility::excn::EXCN_Msg_Exception("JSON read error: expected an Object"); } + if ( value.type() != obj_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON read error: expected an Object"); } return value.get_obj(); } std::string get_string(const mObject& obj, const std::string& name ) { mValue value = get_value( obj, name ); - if ( value.type() != str_type ) { throw utility::excn::EXCN_Msg_Exception("JSON error: '" + name + "' is not a string" ); } + if ( value.type() != str_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON error: '" + name + "' is not a string" ); } return value.get_str(); } @@ -86,7 +86,7 @@ double get_real(const mObject& obj, const std::string& name ) mValue value = get_value( obj, name ); if ( value.type() == real_type ) return value.get_real(); if ( value.type() == int_type ) return get_int( obj, name ); - throw utility::excn::EXCN_Msg_Exception("JSON error: '" + name + "' is not a number" ); + throw CREATE_EXCEPTION(utility::excn::Exception,"JSON error: '" + name + "' is not a number" ); return 0.0; } @@ -99,7 +99,7 @@ double get_real_or_zero(const mObject& obj, const std::string& name ) int get_int(const mObject& obj, const std::string& name ) { mValue value = get_value( obj, name ); - if ( value.type() != int_type ) { throw utility::excn::EXCN_Msg_Exception("JSON error: '" + name + "' is not a int" ); } + if ( value.type() != int_type ) { throw CREATE_EXCEPTION(utility::excn::Exception,"JSON error: '" + name + "' is not a int" ); } return value.get_int(); } @@ -111,4 +111,3 @@ int get_int_or_zero(const mObject& obj, const std::string& name ) } } - diff --git a/source/src/utility/options/Option.hh b/source/src/utility/options/Option.hh index 2446a336b0..ad477beaae 100644 --- a/source/src/utility/options/Option.hh +++ b/source/src/utility/options/Option.hh @@ -453,7 +453,7 @@ public: // Properties bool do_check ) const { if ( restricted_access_ && do_check ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "Attempting to access option '" + code() + "' that has restricted access. Please use 'basic::resource_manager::ResourceManager::get_instance()->get_option( " + code() + " );' instead."); } } diff --git a/source/src/utility/options/OptionCollection.cc b/source/src/utility/options/OptionCollection.cc index 4034d14304..8dde69062b 100644 --- a/source/src/utility/options/OptionCollection.cc +++ b/source/src/utility/options/OptionCollection.cc @@ -47,7 +47,7 @@ void std_exit_wrapper( const int error_code ){ if ( error_code == EXIT_SUCCESS ) { std::exit( error_code ); } - throw utility::excn::EXCN_Msg_Exception( "std::exit() was called" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "std::exit() was called" ); } @@ -229,11 +229,11 @@ OptionCollection::load( load_options_from_file(ObjexxFCL::trim(file_string), cid); } else if ( ! free_args ) { // Warn about free argument - throw( excn::EXCN_Msg_Exception( "ERROR: Unused \"free\" argument specified: " + arg_string )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Unused \"free\" argument specified: " + arg_string )); } } - } catch ( excn::EXCN_Msg_Exception &excn ) { - throw( excn::EXCN_Msg_Exception( "ERROR: " + excn.msg() )); + } catch ( excn::Exception &excn ) { + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: " + excn.msg() )); } // Check for problems in the option values @@ -391,7 +391,7 @@ void OptionCollection::load_options_from_stream(std::istream& stream, std::strin } if ( ( ( indent_type == SPACE_INDENT ) && ( has( indent, TAB ) ) ) || ( ( indent_type == TAB_INDENT ) && ( has( indent, SPACE ) ) ) ) { - throw( excn::EXCN_Msg_Exception( "Option file has mixed space and tab indent characters: "+file_string ) ); + throw( CREATE_EXCEPTION(excn::Exception, "Option file has mixed space and tab indent characters: "+file_string ) ); // std::cerr << "ERROR: Option file has mixed space and tab indent characters: " // << file_string << std::endl; // std_exit_wrapper( EXIT_FAILURE ); @@ -416,14 +416,14 @@ void OptionCollection::load_options_from_stream(std::istream& stream, std::strin // Parse argument to get file specification string size_type const fb( line.find_first_not_of( "@\"" ) ); if ( fb == string::npos ) { // -...- - throw( excn::EXCN_Msg_Exception( "ERROR: Unsupported option file specification: " + line )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Unsupported option file specification: " + line )); } size_type const fe( line.find_last_not_of( "\" " ) ); string file_string( fb <= fe ? line.substr( fb, fe - fb + 1 ) : string() ); load_options_from_file(ObjexxFCL::trim(file_string), cid); } else if ( (stream ) && len_trim_whitespace(line) > 0 && stripped_whitespace(line)[0] != '#' ) { - throw(excn::EXCN_Msg_Exception("Comments in an option file must begin with '#', options must begin with '-' the line:\n" + throw(CREATE_EXCEPTION(excn::Exception, "Comments in an option file must begin with '#', options must begin with '-' the line:\n" +stripped_whitespace(line)+"\n is incorrectly formatted")); } } @@ -433,8 +433,8 @@ void OptionCollection::load_options_from_stream(std::istream& stream, std::strin void OptionCollection::load_options_from_file(std::string const & file_string, std::string const & cid){ try { load_options_from_file_exception( file_string, cid ); - } catch ( excn::EXCN_Msg_Exception& excn ) { - throw( excn::EXCN_Msg_Exception("ERROR: " + excn.msg() ) ); + } catch ( excn::Exception& excn ) { + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: " + excn.msg() ) ); } } @@ -443,7 +443,7 @@ void OptionCollection::load_options_from_file_exception(std::string const & file utility::io::izstream stream( file_string.c_str() ); if ( ! stream ) { - throw( excn::EXCN_Msg_Exception( "Option file open failed for: '"+file_string+"'" ) ); + throw( CREATE_EXCEPTION(excn::Exception, "Option file open failed for: '"+file_string+"'" ) ); } load_options_from_stream( stream, file_string, cid ); } @@ -462,17 +462,17 @@ void OptionCollection::load_option_from_file( // Now next argument *should* be a file name if ( arg_strings.size() < 1 ) { - throw( excn::EXCN_Msg_Exception("ERROR: No file name supplied for option: "+ arg_string)); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: No file name supplied for option: "+ arg_string)); } // Open the option file string const file_name( arg_strings.front() ); // Lead argument string - throw( excn::EXCN_Msg_Exception("load_option from file:"+file_name)); + throw( CREATE_EXCEPTION(excn::Exception, "load_option from file:"+file_name)); arg_strings.pop_front(); // Remove lead argument utility::io::izstream stream( file_name.c_str() ); if ( ! stream ) { - throw( excn::EXCN_Msg_Exception("ERROR: Option file open failed for: "+file_name)); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Option file open failed for: "+file_name)); } string res; while ( stream ) { @@ -489,8 +489,8 @@ void OptionCollection::load_option_from_file( // std::cout << "F:arg_strings[] =" << *it << "\n"; try{ load_option_cl( arg_string, f_args, cid ); - } catch ( excn::EXCN_Msg_Exception &excn ) { - throw( excn::EXCN_Msg_Exception( "ERROR: " + excn.msg() )); + } catch ( excn::Exception &excn ) { + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: " + excn.msg() )); } } @@ -957,7 +957,7 @@ OptionCollection::load_option_cl( top = true; } if ( kb == string::npos ) { // -...- - throw ( excn::EXCN_Msg_Exception( "Unsupported option specified: " + arg_string ) ); + throw ( CREATE_EXCEPTION(excn::Exception, "Unsupported option specified: " + arg_string ) ); //std::cerr << "ERROR: Unsupported option specified: " << arg_string << std::endl; //std_exit_wrapper( EXIT_FAILURE ); } @@ -1014,7 +1014,7 @@ OptionCollection::load_option_file( top = true; } if ( kb == string::npos ) { // -...- - throw( excn::EXCN_Msg_Exception( "Unsupported option specified: "+arg_string ) ); + throw( CREATE_EXCEPTION(excn::Exception, "Unsupported option specified: "+arg_string ) ); } size_type const ke( arg_string.find_first_of( "= \t" ) ); bool const ends( ke != string::npos ); @@ -1047,7 +1047,7 @@ OptionCollection::set_option_value_cl( runtime_assert( OptionKeys::has( key_id ) ); // Precondition OptionKey const & key( OptionKeys::key( key_id ) ); if ( ! has( key ) ) { - throw( excn::EXCN_Msg_Exception( "No option exists for the valid option key -" + key.id() ) ); + throw( CREATE_EXCEPTION(excn::Exception, "No option exists for the valid option key -" + key.id() ) ); } Option & opt( option( key ) ); if ( key.scalar() ) { // Scalar option key @@ -1063,10 +1063,10 @@ OptionCollection::set_option_value_cl( if ( arg_strings.empty() ) { // No values VectorOption & vopt( option< VectorOption >( key ) ); if ( ( vopt.n() > 0 ) || ( vopt.n_lower() > 0 ) ) { - throw ( excn::EXCN_Msg_Exception( "No values specified for multi-valued option -"+ key.id() ) ); + throw ( CREATE_EXCEPTION(excn::Exception, "No values specified for multi-valued option -"+ key.id() ) ); } } else if ( ! opt.is_cl_value( arg_strings.front() ) ) { // No values of correct type - throw ( excn::EXCN_Msg_Exception( "No values of the appropriate type specified for multi-valued option -"+key.id() ) ); + throw ( CREATE_EXCEPTION(excn::Exception, "No values of the appropriate type specified for multi-valued option -"+key.id() ) ); } else { // Take value(s) // This takes the first value even if the vector is full to trigger an error opt.cl_value( arg_strings.front() ); // Use the first argument @@ -1095,11 +1095,11 @@ OptionCollection::set_option_value_file( runtime_assert( OptionKeys::has( key_id ) ); // Precondition OptionKey const & key( OptionKeys::key( key_id ) ); if ( ! has( key ) ) { - throw( excn::EXCN_Msg_Exception(" No option exists for the valid option key - " + key.id() ) ); + throw( CREATE_EXCEPTION(excn::Exception, " No option exists for the valid option key - " + key.id() ) ); } if ( key.scalar() ) { // Scalar option key if ( val_strings.size() > 1 ) { // Multiple values for a scalar option - throw( excn::EXCN_Msg_Exception(" Multiple values specified for option -" + key.id() ) ); + throw( CREATE_EXCEPTION(excn::Exception, " Multiple values specified for option -" + key.id() ) ); } option( key ).cl_value( val_strings.empty() ? string() : *val_strings.begin() ); } else { // Vector option key @@ -1107,7 +1107,7 @@ OptionCollection::set_option_value_file( if ( val_strings.empty() ) { // No values for a vector option VectorOption & vopt( option< VectorOption >( key ) ); if ( ( vopt.n() > 0 ) || ( vopt.n_lower() > 0 ) ) { - throw( excn::EXCN_Msg_Exception( "ERROR: Multiple values specified for multi-valued option -" + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Multiple values specified for multi-valued option -" + key.id() + " requiring one or more values" ) ); } } @@ -1125,13 +1125,13 @@ OptionCollection::check_key( OptionKey const & key ) using ObjexxFCL::is_double; if ( is_double( suffix( key.id() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); } if ( is_double( suffix( key.identifier() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); } if ( is_double( suffix( key.code() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + key.id() )); } //not called during option parsing --- keep hard exit } @@ -1144,13 +1144,13 @@ OptionCollection::check_key( Option const & option ) using ObjexxFCL::is_double; if ( is_double( suffix( option.id() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); } if ( is_double( suffix( option.identifier() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); } if ( is_double( suffix( option.code() ) ) ) { - throw( excn::EXCN_Msg_Exception("ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); + throw( CREATE_EXCEPTION(excn::Exception, "ERROR: Options with numeric identifiers are not allowed: -" + option.id() )); } } @@ -1221,7 +1221,7 @@ OptionCollection::find_key_cl( if ( OptionKeys::has( tid ) ) { // Valid option identifier if ( ! kid.empty() ) { // Already found a match if ( tid != kid ) { // Different id match - throw( excn::EXCN_Msg_Exception( "WARNING: Specified option -" + key_string + " resolved to option -" + kid + " not option -" + tid + " in command line context -" + cid ) ); + throw( CREATE_EXCEPTION(excn::Exception, "WARNING: Specified option -" + key_string + " resolved to option -" + kid + " not option -" + tid + " in command line context -" + cid ) ); } } else { // Assign the matched id kid = tid; @@ -1278,7 +1278,7 @@ OptionCollection::find_key_cl( too_many_choices_error += ("\t -" + possible_matche) += "\n"; } too_many_choices_error += "Either specify namespace from command line; or in code, use add_relevant() to register option.\n"; - throw ( excn::EXCN_Msg_Exception( too_many_choices_error ) ); + throw ( CREATE_EXCEPTION(excn::Exception, too_many_choices_error ) ); } } @@ -1311,7 +1311,7 @@ OptionCollection::find_key_cl( not_found_error += "\t -" + possible_fixe + "\n"; } } - throw ( excn::EXCN_Msg_Exception( not_found_error ) ); + throw ( CREATE_EXCEPTION(excn::Exception, not_found_error ) ); } return kid; @@ -1343,7 +1343,7 @@ OptionCollection::find_key_file( // Check if key matched if ( kid.empty() ) { // No such option - throw( excn::EXCN_Msg_Exception( "Option matching -" + key_string + throw( CREATE_EXCEPTION(excn::Exception, "Option matching -" + key_string + " not found in indented @file context -" + cid ) ); } diff --git a/source/src/utility/string_util.cc b/source/src/utility/string_util.cc index 775d3749ae..77d0b918ca 100644 --- a/source/src/utility/string_util.cc +++ b/source/src/utility/string_util.cc @@ -487,7 +487,7 @@ file_contents( std::string const & file_name ) std::string line; io::izstream textstream( file_name ); if ( ! textstream ) { - throw excn::EXCN_Msg_Exception( "Could not open file " + file_name ); + throw CREATE_EXCEPTION(excn::Exception, "Could not open file " + file_name ); } int strsize( 0 ); while ( getline(textstream, line) ) { diff --git a/source/src/utility/tag/Tag.cc b/source/src/utility/tag/Tag.cc index acd360abd7..d0026376c0 100644 --- a/source/src/utility/tag/Tag.cc +++ b/source/src/utility/tag/Tag.cc @@ -223,7 +223,7 @@ Tag::getTag( string const& name ) const std::stringstream error_msg; error_msg << "Tag::getTag - name=" << name << ", appears " << v.size() << " times in xml file. Only allowed once.\n"; error_msg << *this << std::endl; - throw utility::excn::EXCN_Msg_Exception( error_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_msg.str() ); } return v[0]; } // getTag @@ -284,7 +284,7 @@ Tag::getOption(std::string const& key, bool const& t_default) const { if ( utility::is_false_string( i->second ) ) { return false; } std::stringstream error_message; error_message << "getOption: key= " << key << " stream extraction for boolean value failed! Tried to parse '" << i->second << "\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); return t_default; } @@ -297,14 +297,14 @@ Tag::getOption(std::string const& key) const { if ( i == mOptions_.end() ) { std::stringstream error_message; error_message << "Option '" << key << "' not found in Tag named '" << this->getName() << "'."; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } accessed_options_[key]= i->second; if ( utility::is_true_string( i->second ) ) { return true; } if ( utility::is_false_string( i->second ) ) { return false; } std::stringstream error_message; error_message << "getOption: key= " << key << " stream extraction for boolean value failed! Tried to parse '" << i->second << "\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); return false; // appease compiler } @@ -534,7 +534,7 @@ void Tag::read(std::istream& in ) { print_error(err_msg,str,error); } - throw utility::excn::EXCN_BadInput( err_msg.str() ); + throw CREATE_EXCEPTION(utility::excn::BadInput, err_msg.str() ); } } // read diff --git a/source/src/utility/tag/Tag.hh b/source/src/utility/tag/Tag.hh index 3acb0d65a1..0cd7055d1b 100644 --- a/source/src/utility/tag/Tag.hh +++ b/source/src/utility/tag/Tag.hh @@ -109,7 +109,7 @@ public: } catch(boost::bad_lexical_cast &) { std::stringstream error_message; error_message << "getOption: key= " << key << " stream extraction failed! Tried to parse '" << i->second << "'\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } return t_default; } @@ -125,7 +125,7 @@ public: if ( i == mOptions_.end() ) { std::stringstream error_message; error_message << "Option " << key << " not found.\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } accessed_options_[key]= i->second; try{ @@ -133,7 +133,7 @@ public: } catch(boost::bad_lexical_cast &) { std::stringstream error_message; error_message << "getOption: key= " << key << " stream extraction failed! Tried to parse '" << i->second << "'\n"; - throw utility::excn::EXCN_Msg_Exception( error_message.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, error_message.str() ); } return T(); // appease compiler } diff --git a/source/src/utility/tag/XMLSchemaGeneration.cc b/source/src/utility/tag/XMLSchemaGeneration.cc index e285b9b710..da1252edaf 100644 --- a/source/src/utility/tag/XMLSchemaGeneration.cc +++ b/source/src/utility/tag/XMLSchemaGeneration.cc @@ -84,7 +84,7 @@ std::string name_for_common_type( XMLSchemaCommonType common_type ) case xsct_task_operation_comma_separated_list : return "task_operation_comma_separated_list"; case xsct_pose_cached_task_operation : return "pose_cached_task_operation"; case xsct_none : - throw utility::excn::EXCN_Msg_Exception( "Error in requesting name for xsct_none;" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Error in requesting name for xsct_none;" ); break; } return "Error in requesting name for common type"; @@ -178,10 +178,10 @@ XMLSchemaAttribute::XMLSchemaAttribute( description_( description ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for attribute \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for attribute \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for attribute \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for attribute \"" + name + "\" may not contain '&'. Offending string: " + description ); } } @@ -251,10 +251,10 @@ XMLSchemaAttribute & XMLSchemaAttribute::default_value( std::string const & sett XMLSchemaAttribute & XMLSchemaAttribute::description( std::string const & setting ) { description_ = setting; if ( string_contains_gt_or_lt( description_ ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for attribute \"" + name_ + "\" may not contain either '<' or '>'. Offending string: " + description_ ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for attribute \"" + name_ + "\" may not contain either '<' or '>'. Offending string: " + description_ ); } if ( string_contains_ampersand( description_ ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for attribute \"" + name_ + "\" may not contain '&'. Offending string: " + description_ ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for attribute \"" + name_ + "\" may not contain '&'. Offending string: " + description_ ); } return *this; @@ -753,21 +753,21 @@ XMLSchemaModelGroup::validate_content() const if ( model_group ) { if ( model_group->type_ == xsmgt_all ) { if ( type_ != xsmgt_all && type_ != xsmgt_group ) { - throw utility::excn::EXCN_Msg_Exception( "In XML Schema, xs:all model groups may not be nested beneath anything besides an xs:all" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "In XML Schema, xs:all model groups may not be nested beneath anything besides an xs:all" ); } found_all = true; } else if ( model_group->is_group_holding_all() ) { - throw utility::excn::EXCN_Msg_Exception( "In XML Schema, xs:groups holding an xs:all group may only be nested directly beneath a complexType" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "In XML Schema, xs:groups holding an xs:all group may only be nested directly beneath a complexType" ); } else { if ( type_ == xsmgt_all ) { - throw utility::excn::EXCN_Msg_Exception( "In XML Schema, only xs:all model groups may be nested beneath an xs:all group" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "In XML Schema, only xs:all model groups may be nested beneath an xs:all group" ); } } } // else -- we're looking at an XMLSchemaElement, and it's always ok to hold an XMLSchemaElement. } if ( found_all && type_ == xsmgt_group ) { if ( particles_.size() > 1 ) { - throw utility::excn::EXCN_Msg_Exception( "In XML Schema, an xs:all may be the only child of an xs:group if it is a child at all" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "In XML Schema, an xs:all may be the only child of an xs:group if it is a child at all" ); } } } @@ -807,10 +807,10 @@ XMLSchemaComplexType & XMLSchemaComplexType::name( std::string const & setting ) XMLSchemaComplexType & XMLSchemaComplexType::description( std::string const & setting ) { desc_ = setting; if ( string_contains_gt_or_lt( desc_ ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for complexType \"" + name_ + "\" may not contain either '<' or '>'. Offending string: " + setting ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for complexType \"" + name_ + "\" may not contain either '<' or '>'. Offending string: " + setting ); } if ( string_contains_ampersand( desc_ ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for complexType \"" + name_ + "\" may not contain '&'. Offending string: " + setting ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for complexType \"" + name_ + "\" may not contain '&'. Offending string: " + setting ); } return *this; @@ -946,7 +946,7 @@ void XMLSchemaDefinition::add_top_level_element( XMLSchemaTopLevelElement const elements_in_order_.push_back( element.element_name() ); } else if ( top_level_elements_[ element.element_name() ] != definition ) { - throw utility::excn::EXCN_Msg_Exception( "Name collision in creation of XML Schema definition: top level element with name \"" + + throw CREATE_EXCEPTION(utility::excn::Exception, "Name collision in creation of XML Schema definition: top level element with name \"" + element.element_name() + "\" already has been defined.\nOld definition:\n" + top_level_elements_[ element.element_name() ] + "New definition:\n" + definition ); } @@ -990,10 +990,10 @@ void XMLSchemaDefinition::validate_new_top_level_element( std::string const & el std::istringstream def_stream( definition ); utility::tag::TagCOP element_tag = utility::tag::Tag::create( def_stream ); if ( ! element_tag->hasOption( "name" ) ) { - throw utility::excn::EXCN_Msg_Exception( "top level tag \"" + element_name + "\" does not have a name attribute (a.k.a. option)." ); + throw CREATE_EXCEPTION(utility::excn::Exception, "top level tag \"" + element_name + "\" does not have a name attribute (a.k.a. option)." ); } if ( element_tag->getOption< std::string >( "name" ) != element_name ) { - throw utility::excn::EXCN_Msg_Exception( "top level tag with presumed name \"" + element_name + "\" has an actual name of \"" + throw CREATE_EXCEPTION(utility::excn::Exception, "top level tag with presumed name \"" + element_name + "\" has an actual name of \"" + element_tag->getOption< std::string >( "name" ) + "\"" ); } } @@ -1041,10 +1041,10 @@ XMLSchemaSimpleSubelementList::add_simple_subelement( ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); } ElementSummary summary = element_summary_as_simple_subelement( name, attributes, description ); @@ -1062,10 +1062,10 @@ XMLSchemaSimpleSubelementList::add_simple_subelement( ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); } ElementSummary summary = element_summary_as_simple_subelement( name, attributes, description, min_occurs, max_occurs ); @@ -1189,10 +1189,10 @@ XMLSchemaSimpleSubelementList::element_summary_as_simple_subelement( ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); } @@ -1218,10 +1218,10 @@ XMLSchemaSimpleSubelementList::element_summary_as_simple_subelement( ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for simple subelement \"" + name + "\" may not contain '&'. Offending string: " + description ); } @@ -1479,10 +1479,10 @@ void XMLSchemaComplexTypeGeneratorImpl::element_name( std::string const & elemen void XMLSchemaComplexTypeGeneratorImpl::description( std::string const & desc ) { if ( string_contains_gt_or_lt( desc ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for complexType for element \"" + element_name_ + "\" may not contain either '<' or '>'. Offending string: " + desc ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for complexType for element \"" + element_name_ + "\" may not contain either '<' or '>'. Offending string: " + desc ); } if ( string_contains_ampersand( desc ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for complexType for element \"" + element_name_ + "\" may not contain '&'. Offending string: " + desc ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for complexType for element \"" + element_name_ + "\" may not contain '&'. Offending string: " + desc ); } @@ -1547,7 +1547,7 @@ XMLSchemaComplexTypeGeneratorImpl::set_subelements_single_appearance_required( X for ( auto const & element : elements ) { if ( element.element_type == XMLSchemaSimpleSubelementList::ElementSummary::ct_group ) { - throw utility::excn::EXCN_Msg_Exception( "set_subelement_single_appearance_required cannot be used with" + throw CREATE_EXCEPTION(utility::excn::Exception, "set_subelement_single_appearance_required cannot be used with" " more than one element if any of the subelements are \"group\" references\n" ); } } @@ -1566,7 +1566,7 @@ XMLSchemaComplexTypeGeneratorImpl::set_subelements_single_appearance_optional( X for ( auto const & element : elements ) { if ( element.element_type == XMLSchemaSimpleSubelementList::ElementSummary::ct_group ) { - throw utility::excn::EXCN_Msg_Exception( "set_subelement_single_appearance_optional cannot be used with" + throw CREATE_EXCEPTION(utility::excn::Exception, "set_subelement_single_appearance_optional cannot be used with" " more than one element if any of the subelements are \"group\" references\n" ); } } @@ -1604,7 +1604,7 @@ XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_optional( { subelement_behavior_ = se_ordered_sets; if ( subelements.element_list().size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "When calling XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_optional, " " the input subelement list should contain only a single subelement." ); } @@ -1618,7 +1618,7 @@ XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_required( { subelement_behavior_ = se_ordered_sets; if ( subelements.element_list().size() != 1 ) { - throw utility::excn::EXCN_Msg_Exception( + throw CREATE_EXCEPTION(utility::excn::Exception, "When calling XMLSchemaComplexTypeGeneratorImpl::add_ordered_subelement_set_as_required, " " the input subelement list should contain only a single subelement." ); } @@ -1659,7 +1659,7 @@ XMLSchemaComplexTypeGeneratorImpl::write_complex_type_to_schema( XMLSchemaDefini if ( description_ == "(not yet set)" ) { std::ostringstream oss; oss << "You have not provided a description for " << element_name_ << "; all complexTypes must have descriptions, even if they are the empty string" << std::endl; - throw utility::excn::EXCN_Msg_Exception( oss.str() ); + throw CREATE_EXCEPTION(utility::excn::Exception, oss.str() ); } else { complex_type.description( description_ ); } @@ -1731,7 +1731,7 @@ void XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_repeatable( XMLSchema for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "set_sublements_repeatable function, which will override the min/max occurence settings." ); } @@ -1757,7 +1757,7 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_choice_req( model_group->type( xsmgt_choice ); for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "set_sublements_pick_one function, which will override the min/max occurence settings." ); } @@ -1779,7 +1779,7 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_choice_opt( model_group->type( xsmgt_choice ); for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "set_sublements_pick_one_optional function, which will override the min/max occurence settings." ); } @@ -1832,13 +1832,13 @@ void XMLSchemaComplexTypeGeneratorImpl::prepare_subelement_single_instance_optio // Error checking. You are allowed to specify a min_occurs of 1 to say that a particular element is required // among a list of otherwise optional elements. if ( element.max_occurs != 1 && element.max_occurs != xsminmax_unspecified ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "max_occurs set to " + utility::to_string( element.max_occurs ) + ", but then handed to the " "XMLSchemaComplexTypeGenerator through the set_sublements_single_instance_optional function, " "which only allows a max occurence setting of 1." ); } if ( element.min_occurs > 1 || element.min_occurs == xsminmax_unbounded ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "min_occurs set to " + utility::to_string( element.max_occurs ) + ", but then handed to the " "XMLSchemaComplexTypeGenerator through the set_sublements_single_instance_optional function, " "which only allows at most a single occurrence." ); @@ -1888,12 +1888,12 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets( XMLSchemaModelGroupOP choice( new XMLSchemaModelGroup( xsmgt_choice )); for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "add_ordered_sublement_set_as_repeatable function, which will override the min/max occurence settings." ); } if ( all_element_names.count( element.element_name ) != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " appears more than" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " appears more than" " once in subelement lists for complex type for an element named \"" + element_name_ + "\" which" " was added through the add_ordered_sublement_set_as_repeatable function" ); } @@ -1911,12 +1911,12 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets( debug_assert( elements.size() == 1 ); // this was already checked for in add_ordered_sublement_set_as_optional XMLSchemaSimpleSubelementList::ElementSummary elem1 = *elements.begin(); if ( elem1.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + elem1.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + elem1.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "add_ordered_sublement_set_as_optional function, which will override the min/max occurence settings." ); } if ( all_element_names.count( elem1.element_name ) != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + elem1.element_name + " appears more than" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + elem1.element_name + " appears more than" " once in subelement lists for complex type for an element named \"" + element_name_ + "\" which" " was added through the add_ordered_sublement_set_as_optional function" ); } @@ -1932,12 +1932,12 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets( debug_assert( elements.size() == 1 ); // this was already checked for in add_ordered_sublement_set_as_required XMLSchemaSimpleSubelementList::ElementSummary elem1 = *elements.begin(); if ( elem1.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + elem1.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + elem1.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "add_ordered_sublement_set_as_required function, which will override the min/max occurence settings." ); } if ( all_element_names.count( elem1.element_name ) != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + elem1.element_name + " appears more than" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + elem1.element_name + " appears more than" " once in subelement lists for complex type for an element named \"" + element_name_ + "\" which" " was added through the add_ordered_sublement_set_as_required function" ); } @@ -1956,12 +1956,12 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets( XMLSchemaModelGroupOP choice( new XMLSchemaModelGroup( xsmgt_choice )); for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "add_ordered_sublement_set_as_pick_one_or_none function, which will override the min/max occurence settings." ); } if ( all_element_names.count( element.element_name ) != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " appears more than" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " appears more than" " once in subelement lists for complex type for an element named \"" + element_name_ + "\" which" " was added through the add_ordered_sublement_set_as_pick_one_or_none function" ); } @@ -1982,12 +1982,12 @@ XMLSchemaComplexTypeGeneratorImpl::prepare_sequence_of_subelement_sets( XMLSchemaModelGroupOP choice( new XMLSchemaModelGroup( xsmgt_choice )); for ( auto const & element : elements ) { if ( element.min_or_max_occurs_set ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " was initilized with " + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " was initilized with " "either min_occurs or max_occurs set, but then handed to the XMLSchemaComplexTypeGenerator through the " "add_ordered_sublement_set_as_pick_one function, which will override the min/max occurence settings." ); } if ( all_element_names.count( element.element_name ) != 0 ) { - throw utility::excn::EXCN_Msg_Exception( "Subelement named " + element.element_name + " appears more than" + throw CREATE_EXCEPTION(utility::excn::Exception, "Subelement named " + element.element_name + " appears more than" " once in subelement lists for complex type for an element named \"" + element_name_ + "\" which" " was added through the add_ordered_sublement_set_as_pick_one function" ); } @@ -2281,10 +2281,10 @@ XMLSchemaRepeatableCTNode::set_element_w_attributes( ) { if ( string_contains_gt_or_lt( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for CTNode \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for CTNode \"" + name + "\" may not contain either '<' or '>'. Offending string: " + description ); } if ( string_contains_ampersand( description ) ) { - throw utility::excn::EXCN_Msg_Exception( "Desciption for CTNode \"" + name + "\" may not contain '&'. Offending string: " + description ); + throw CREATE_EXCEPTION(utility::excn::Exception, "Desciption for CTNode \"" + name + "\" may not contain '&'. Offending string: " + description ); } element_ = XMLSchemaSimpleSubelementList::element_summary_as_simple_subelement( diff --git a/source/src/utility/tag/xml_schema_group_initialization.hh b/source/src/utility/tag/xml_schema_group_initialization.hh index 88a7bbfd75..7d8b75e363 100644 --- a/source/src/utility/tag/xml_schema_group_initialization.hh +++ b/source/src/utility/tag/xml_schema_group_initialization.hh @@ -76,13 +76,13 @@ void define_xml_schema_group( try { iter->second->provide_xml_schema( xsd ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - throw utility::excn::EXCN_Msg_Exception( "define_xml_schema_group: failed to define an xml schema for \"" + iter->first + "\"; message was:\n" + e.msg() ); + } catch ( utility::excn::Exception & e ) { + throw CREATE_EXCEPTION(utility::excn::Exception, "define_xml_schema_group: failed to define an xml schema for \"" + iter->first + "\"; message was:\n" + e.msg() ); } if ( ! xsd.has_top_level_element( complex_type_name_for_widget_func( iter->first ) ) ) { //std::cerr << "schema:\n" << xsd.full_definition() << std::endl; - throw utility::excn::EXCN_Msg_Exception( "define_xml_schema_group: failed to detect a complex type of name \"" + + throw CREATE_EXCEPTION(utility::excn::Exception, "define_xml_schema_group: failed to detect a complex type of name \"" + complex_type_name_for_widget_func( iter->first ) + "\" for \"" + iter->first + "\"\n" ); } diff --git a/source/test/basic/datacache/HierarchicalDataMap.cxxtest.hh b/source/test/basic/datacache/HierarchicalDataMap.cxxtest.hh index b05926e30c..3199ac1f86 100644 --- a/source/test/basic/datacache/HierarchicalDataMap.cxxtest.hh +++ b/source/test/basic/datacache/HierarchicalDataMap.cxxtest.hh @@ -41,7 +41,7 @@ struct Widget : public utility::pointer::ReferenceCount { using namespace std; using basic::datacache::HierarchicalDataMap; using basic::datacache::HierarchicalDataMapOP; -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; class HierarchicalDataMapTests : public CxxTest::TestSuite { @@ -76,7 +76,7 @@ public: void test_failed_lookups() { set_throw_on_next_assertion_failure(); - TS_ASSERT_THROWS(child->get("widget", "1"), EXCN_Msg_Exception); + TS_ASSERT_THROWS(child->get("widget", "1"), Exception); TS_ASSERT_EQUALS(child->get("widget", "1", widgets[2]), widgets[2]); TS_ASSERT_EQUALS(child->get_or_null("widget", "1"), WidgetOP()); } diff --git a/source/test/basic/resource_manager/ResourceLoaderFactory.cxxtest.hh b/source/test/basic/resource_manager/ResourceLoaderFactory.cxxtest.hh index d0dcd91475..ce8d5c9e22 100644 --- a/source/test/basic/resource_manager/ResourceLoaderFactory.cxxtest.hh +++ b/source/test/basic/resource_manager/ResourceLoaderFactory.cxxtest.hh @@ -93,9 +93,9 @@ public: factory->set_throw_on_double_registration(); factory->factory_register( ResourceLoaderCreatorOP( new DummyResourceLoaderCreator ) ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Double registration of a ResourceLoaderCreator in the ResourceLoaderFactory, named DummyResource. Are there two registrators for this ResourceLoader object, or have you chosen a previously assigned name to a new resource option?"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } diff --git a/source/test/basic/resource_manager/ResourceOptionsFactory.cxxtest.hh b/source/test/basic/resource_manager/ResourceOptionsFactory.cxxtest.hh index 1276fb6545..8506795189 100644 --- a/source/test/basic/resource_manager/ResourceOptionsFactory.cxxtest.hh +++ b/source/test/basic/resource_manager/ResourceOptionsFactory.cxxtest.hh @@ -88,9 +88,9 @@ public: factory->set_throw_on_double_registration(); factory->factory_register( ResourceOptionsCreatorOP( new DummyResourceOptionsCreator ) ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Double registration of a ResourceOptionsCreator in the ResourceOptionsFactory, named DummyResourceOptions. Are there two registrators for this options object, or have you chosen a previously assigned name to a new resource option?"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); //std::cout << e.msg() << std::endl; } diff --git a/source/test/core/chemical/ResidueProperties.cxxtest.hh b/source/test/core/chemical/ResidueProperties.cxxtest.hh index 29f9cdb56b..9f0abf3087 100644 --- a/source/test/core/chemical/ResidueProperties.cxxtest.hh +++ b/source/test/core/chemical/ResidueProperties.cxxtest.hh @@ -27,7 +27,7 @@ #include // Utility header -#include +#include #include // C++ header @@ -64,12 +64,14 @@ public: // Standard methods ////////////////////////////////////////////////// public: // Tests ///////////////////////////////////////////////////////////// - void exception_message_matches( utility::excn::EXCN_Base const & e, std::string const & expected_output ) + void exception_message_matches( utility::excn::Exception const & e, std::string const & expected_output ) { - std::string msg = e.msg(); - std::vector< std::string > msg_lines = utility::split_by_newlines( msg ); - TS_ASSERT_EQUALS( msg_lines.size(), 3 ); - TS_ASSERT_EQUALS( msg_lines[1], expected_output ); + //std::string msg = e.msg(); + //std::vector< std::string > msg_lines = utility::split_by_newlines( msg ); + //TS_ASSERT_EQUALS( msg_lines.size(), 3 ); + //TS_ASSERT_EQUALS( msg_lines[1], expected_output ); + //std::cout << "_____________" << e.msg() << std::endl; + TS_ASSERT( e.msg().find(expected_output) != std::string::npos ); } // Confirm that property-related methods function properly. @@ -84,10 +86,9 @@ public: // Tests ///////////////////////////////////////////////////////////// set_throw_on_next_assertion_failure(); try { test_properties_->set_property( "FAT", true ); - } catch ( EXCN_Base const & e ) { + } catch (Exception const & e ) { exception_message_matches( e, - "ERROR: Rosetta does not recognize the property: FAT; " - "has it been added to general_properties.list?" ); + "Rosetta does not recognize the property: FAT; has it been added to general_properties.list?" ); } TS_ASSERT( test_properties_->has_property( LIPID ) ); @@ -116,9 +117,9 @@ public: // Tests ///////////////////////////////////////////////////////////// set_throw_on_next_assertion_failure(); try { test_properties_->set_variant_type( "BIZARRO", true ); - } catch ( EXCN_Base const & e ) { + } catch (Exception const & e ) { exception_message_matches( e, - "ERROR: Rosetta does not recognize the variant: BIZARRO; " + "Rosetta does not recognize the variant: BIZARRO; " "has it been added to variant_types.list?" ); } @@ -131,9 +132,9 @@ public: // Tests ///////////////////////////////////////////////////////////// set_throw_on_next_assertion_failure(); try { test_properties_->set_variant_type( "GNARLY", false ); - } catch ( EXCN_Base const & e ) { + } catch (Exception const & e ) { exception_message_matches( e, - "ERROR: Rosetta does not recognize the custom variant GNARLY in test_residue" ); + "Rosetta does not recognize the custom variant GNARLY in test_residue" ); } TS_ASSERT( test_properties_->is_variant_type( SC_FRAGMENT ) ); diff --git a/source/test/core/chemical/ResidueTypeSetCacheConcurrencyTests.cxxtest.hh b/source/test/core/chemical/ResidueTypeSetCacheConcurrencyTests.cxxtest.hh index 6ca9308bb1..29a17748fc 100644 --- a/source/test/core/chemical/ResidueTypeSetCacheConcurrencyTests.cxxtest.hh +++ b/source/test/core/chemical/ResidueTypeSetCacheConcurrencyTests.cxxtest.hh @@ -144,7 +144,7 @@ public: try { // internally, the RTS uses a ResidueTypeFinder in this method. rts_->get_all_types_with_variants_aa( aa_phe, ala->variant_types() ); - } catch ( utility::excn::EXCN_Base & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Caught exception " << e.msg() << std::endl; } finished_ = true; diff --git a/source/test/core/chemical/carbohydrates/database_io.cxxtest.hh b/source/test/core/chemical/carbohydrates/database_io.cxxtest.hh index 883d2f333e..bf148b1141 100644 --- a/source/test/core/chemical/carbohydrates/database_io.cxxtest.hh +++ b/source/test/core/chemical/carbohydrates/database_io.cxxtest.hh @@ -25,7 +25,7 @@ // Project header #include -#include +#include #include @@ -83,7 +83,7 @@ public: // Tests ////////////////////////////////////////////////////////////// set_throw_on_next_assertion_failure(); read_ring_sizes_and_morphemes_from_database_file( "core/chemical/carbohydrates/ring_size_to_morphemes.bad_map" ); - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected_message( "ERROR: read_ring_sizes_and_morphemes_from_database_file: invalid ring size; " "rings cannot have less than 3 atoms!" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected_message.size() ), expected_message ); diff --git a/source/test/core/chemical/rings/RingConformerSet.cxxtest.hh b/source/test/core/chemical/rings/RingConformerSet.cxxtest.hh index 24e06cf940..2ad4443568 100644 --- a/source/test/core/chemical/rings/RingConformerSet.cxxtest.hh +++ b/source/test/core/chemical/rings/RingConformerSet.cxxtest.hh @@ -161,7 +161,7 @@ public: set_throw_on_next_assertion_failure(); set5_->get_ideal_conformer_by_name( "FOO" ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected_error_message( "ERROR: No conformer with given name found in this set; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected_error_message.size() ), expected_error_message ); } @@ -170,7 +170,7 @@ public: set_throw_on_next_assertion_failure(); set6_->get_ideal_conformer_by_CP_parameters( params_bad ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: An N-membered ring is described by exactly N-3 Cremer-Pople parameters, " "yet a different number was provided; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -180,7 +180,7 @@ public: set_throw_on_next_assertion_failure(); set6_->get_ideal_conformer_by_CP_parameters( params_bad ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: An N-membered ring is described by exactly N-3 Cremer-Pople parameters, " "yet a different number was provided; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -191,7 +191,7 @@ public: set_throw_on_next_assertion_failure(); set6_->get_ideal_conformer_by_CP_parameters( params_bad ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: Planar ring conformations are not handled by Rosetta; " "please specify a non-zero q value; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -201,7 +201,7 @@ public: set_throw_on_next_assertion_failure(); set6_->get_ideal_conformer_by_CP_parameters( params_bad ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: An N-membered ring is described by exactly N-3 Cremer-Pople parameters, " "yet a different number was provided; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -216,7 +216,7 @@ public: set_throw_on_next_assertion_failure(); set6_->get_ideal_conformer_from_nus( nus_bad ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: No conformer with given nu angles found in this set; exiting.\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); } diff --git a/source/test/core/conformation/membrane/SpanningTopology.cxxtest.hh b/source/test/core/conformation/membrane/SpanningTopology.cxxtest.hh index 74890ac7a3..5b10ab4084 100644 --- a/source/test/core/conformation/membrane/SpanningTopology.cxxtest.hh +++ b/source/test/core/conformation/membrane/SpanningTopology.cxxtest.hh @@ -295,18 +295,18 @@ public: // test functions // test whether span start > end try { SpanningTopology topo3( SpanningTopology( "core/conformation/membrane/1AFO_AB_invalid_order.span", pdb2pose_map, 80 ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "SpanningTopology invalid: check your span file!"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } TR << "...topo3 done." << std::endl; // test increasing order of spans in topology try { SpanningTopology topo4( SpanningTopology( "core/conformation/membrane/1AFO_AB_invalid_spanorder.span", pdb2pose_map, 80 ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "SpanningTopology invalid: check your span file!"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } TR << "...topo4 done." << std::endl; } diff --git a/source/test/core/import_pose/3-letter_code_ambiguity_resolution.cxxtest.hh b/source/test/core/import_pose/3-letter_code_ambiguity_resolution.cxxtest.hh index 4770327591..d593435cdd 100644 --- a/source/test/core/import_pose/3-letter_code_ambiguity_resolution.cxxtest.hh +++ b/source/test/core/import_pose/3-letter_code_ambiguity_resolution.cxxtest.hh @@ -107,7 +107,7 @@ public: // Tests ////////////////////////////////////////////////////////////// TS_ASSERT_EQUALS( pose.residue( 2 ).name(), "flavin_dihydride" ); TS_ASSERT( pose.residue( 1 ).natoms() != pose.residue( 2 ).natoms() ); #ifdef MULTI_THREADED - } catch(utility::excn::EXCN_Base& excn) { + } catch (utility::excn::Exception& excn) { std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); } @@ -245,7 +245,7 @@ public: // Tests ////////////////////////////////////////////////////////////// TS_ASSERT_EQUALS( poseA.fold_tree().to_string(), poseB.fold_tree().to_string() ); #ifdef MULTI_THREADED - } catch(utility::excn::EXCN_Base& excn) { + } catch (utility::excn::Exception& excn) { std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); } diff --git a/source/test/core/io/silent/silent_file_loader.cxxtest.hh b/source/test/core/io/silent/silent_file_loader.cxxtest.hh index b3471550d8..e5deef6b38 100644 --- a/source/test/core/io/silent/silent_file_loader.cxxtest.hh +++ b/source/test/core/io/silent/silent_file_loader.cxxtest.hh @@ -69,7 +69,7 @@ public: try { sfo.set_silent_struct_type("BLA"); TS_ASSERT( false ); - } catch (utility::excn::EXCN_BadInput & e){ + } catch (utility::excn::BadInput & e){ TR << e.msg(); } diff --git a/source/test/core/pack/task/operation/OperateOnResidueSubset.cxxtest.hh b/source/test/core/pack/task/operation/OperateOnResidueSubset.cxxtest.hh index a5ab2334b5..9908013174 100644 --- a/source/test/core/pack/task/operation/OperateOnResidueSubset.cxxtest.hh +++ b/source/test/core/pack/task/operation/OperateOnResidueSubset.cxxtest.hh @@ -94,7 +94,7 @@ public: OperateOnResidueSubset op_on_subset; try { op_on_subset.parse_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -118,7 +118,7 @@ public: OperateOnResidueSubset op_on_subset; try { op_on_subset.parse_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } diff --git a/source/test/core/pack/task/operation/ResFilterFactory.cxxtest.hh b/source/test/core/pack/task/operation/ResFilterFactory.cxxtest.hh index b9ac722bb5..22f63d848c 100644 --- a/source/test/core/pack/task/operation/ResFilterFactory.cxxtest.hh +++ b/source/test/core/pack/task/operation/ResFilterFactory.cxxtest.hh @@ -116,14 +116,13 @@ public: XMLSchemaDefinition xsd; ResFilterFactory::get_instance()->define_res_filter_xml_schema( xsd ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_message = "Could not generate an XML Schema for ResFilters from ResFilterFactory; offending class" " must call core::pack::task::operation::complex_type_name_for_res_filter when defining" - " its XML Schema\ndefine_xml_schema_group: failed to detect a complex type of name \"" + - complex_type_name_for_res_filter( "DummyResFilter2" ) + "\" for \"DummyResFilter2\"\n"; + " its XML Schema"; //\ndefine_xml_schema_group: failed to detect a complex type of name \"" + complex_type_name_for_res_filter( "DummyResFilter2" ) + "\" for \"DummyResFilter2\"\n"; - TS_ASSERT_EQUALS( e.msg(), expected_message ); + TS_ASSERT( e.msg().find(expected_message) != std::string::npos ); //std::cout << e.msg() << "\n" << expected_message << std::endl; } diff --git a/source/test/core/pack/task/operation/ResLvlTaskOperationFactory.cxxtest.hh b/source/test/core/pack/task/operation/ResLvlTaskOperationFactory.cxxtest.hh index a0e75c091c..f7404060cc 100644 --- a/source/test/core/pack/task/operation/ResLvlTaskOperationFactory.cxxtest.hh +++ b/source/test/core/pack/task/operation/ResLvlTaskOperationFactory.cxxtest.hh @@ -114,16 +114,13 @@ public: XMLSchemaDefinition xsd; ResLvlTaskOperationFactory::get_instance()->define_res_lvl_task_op_xml_schema( xsd ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_message = "Could not generate an XML Schema for ResLvlTaskOperations from ResLvlTaskOperationFactory; offending class" - " must call core::pack::task::operation::complex_type_name_for_res_lvl_task_op when defining" - " its XML Schema\ndefine_xml_schema_group: failed to detect a complex type of name \"" + - complex_type_name_for_res_lvl_task_op( "DummyResLvlTaskOperation2" ) + "\" for \"DummyResLvlTaskOperation2\"\n"; - - TS_ASSERT_EQUALS( e.msg(), expected_message ); + " must call core::pack::task::operation::complex_type_name_for_res_lvl_task_op when defining its XML Schema"; // "\ndefine_xml_schema_group: failed to detect a complex type of name \"" + complex_type_name_for_res_lvl_task_op( "DummyResLvlTaskOperation2" ) + "\" for \"DummyResLvlTaskOperation2\"\n"; //std::cout << e.msg() << "\n" << expected_message << std::endl; + TS_ASSERT( e.msg().find(expected_message) != std::string::npos ); } } diff --git a/source/test/core/pack/task/operation/TaskOperationFactory.cxxtest.hh b/source/test/core/pack/task/operation/TaskOperationFactory.cxxtest.hh index 0f2d949aea..7a718e2ec5 100644 --- a/source/test/core/pack/task/operation/TaskOperationFactory.cxxtest.hh +++ b/source/test/core/pack/task/operation/TaskOperationFactory.cxxtest.hh @@ -160,12 +160,12 @@ public: XMLSchemaDefinition xsd; TaskOperationFactory::get_instance()->define_task_op_xml_schema( xsd ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - std::string expected_message = - "Could not generate an XML Schema for TaskOperations from TaskOperationFactory\ndefine_xml_schema_group: failed to detect a complex type of name \"" + - complex_type_name_for_task_op( "DummyTaskOperation2" ) + "\" for \"DummyTaskOperation2\"\n"; + } catch (utility::excn::Exception const & e ) { + std::string expected_message1 = "Could not generate an XML Schema for TaskOperations from TaskOperationFactory"; + std::string expected_message2 = "define_xml_schema_group: failed to detect a complex type of name \"" + complex_type_name_for_task_op( "DummyTaskOperation2" ) + "\" for \"DummyTaskOperation2\""; - TS_ASSERT_EQUALS( e.msg(), expected_message ); + TS_ASSERT( e.msg().find(expected_message1) != std::string::npos ); + TS_ASSERT( e.msg().find(expected_message2) != std::string::npos ); //std::cout << e.msg() << "\n" << expected_message << std::endl; } diff --git a/source/test/core/scoring/ScoreFunction.cxxtest.hh b/source/test/core/scoring/ScoreFunction.cxxtest.hh index af653c7ecf..643fa0775f 100644 --- a/source/test/core/scoring/ScoreFunction.cxxtest.hh +++ b/source/test/core/scoring/ScoreFunction.cxxtest.hh @@ -152,7 +152,7 @@ public: try { set_throw_on_next_assertion_failure(); // just in case ScoreFunction sfxn( *sfxn_option_collection ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << e.msg() << std::endl; TS_ASSERT( false ); // we screwed the pooch } diff --git a/source/test/core/scoring/carbohydrates/CHIEnergyFunction.cxxtest.hh b/source/test/core/scoring/carbohydrates/CHIEnergyFunction.cxxtest.hh index de6403158c..40e1e5df92 100644 --- a/source/test/core/scoring/carbohydrates/CHIEnergyFunction.cxxtest.hh +++ b/source/test/core/scoring/carbohydrates/CHIEnergyFunction.cxxtest.hh @@ -29,7 +29,7 @@ #include // Utility Headers -#include +#include static basic::Tracer TR( "core.scoring.carbohydrates.CHIEnergyFunction.cxxtest" ); @@ -178,7 +178,7 @@ public: // Tests ////////////////////////////////////////////////////////////// #ifdef MULTI_THREADED try { core::scoring::ScoringManager::get_instance()->get_CHIEnergyFunction( true, .1 ); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction with setup_for_sampling is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jared Adolf-Bryfogle (jadolfbr@gmail.com) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); diff --git a/source/test/core/scoring/carbohydrates/OmegaPreferencesFunction.cxxtest.hh b/source/test/core/scoring/carbohydrates/OmegaPreferencesFunction.cxxtest.hh index 7e100f068c..7b1a644e81 100644 --- a/source/test/core/scoring/carbohydrates/OmegaPreferencesFunction.cxxtest.hh +++ b/source/test/core/scoring/carbohydrates/OmegaPreferencesFunction.cxxtest.hh @@ -56,7 +56,7 @@ public: // Tests ////////////////////////////////////////////////////////////// #ifdef MULTI_THREADED try { core::scoring::ScoringManager::get_instance()->get_OmegaPreferencesFunction(); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate OmegaPreferencesFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -116,7 +116,7 @@ public: // Tests ////////////////////////////////////////////////////////////// #ifdef MULTI_THREADED try { core::scoring::ScoringManager::get_instance()->get_OmegaPreferencesFunction(); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate OmegaPreferencesFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); diff --git a/source/test/core/scoring/electron_density/ElectronDensityLoader.cxxtest.hh b/source/test/core/scoring/electron_density/ElectronDensityLoader.cxxtest.hh index 690af7a898..235ddca892 100644 --- a/source/test/core/scoring/electron_density/ElectronDensityLoader.cxxtest.hh +++ b/source/test/core/scoring/electron_density/ElectronDensityLoader.cxxtest.hh @@ -32,7 +32,7 @@ #include #include #include -#include +#include // C++ headers #include @@ -56,7 +56,7 @@ public: try{ do_test_ElectronDensityLoader(); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << "ERROR: Exception caught by ElectronDensityLoaderTests:" << excn << std::endl; diff --git a/source/test/core/scoring/fiber_diffraction/FiberDiffractionEnergy.cxxtest.hh b/source/test/core/scoring/fiber_diffraction/FiberDiffractionEnergy.cxxtest.hh index a9a0f2205e..69cafe6b25 100644 --- a/source/test/core/scoring/fiber_diffraction/FiberDiffractionEnergy.cxxtest.hh +++ b/source/test/core/scoring/fiber_diffraction/FiberDiffractionEnergy.cxxtest.hh @@ -39,7 +39,7 @@ #include #include #include -#include +#include static basic::Tracer TR("test.scoring.fiber_diffraction.FiberDiffractionEnergy"); @@ -67,7 +67,7 @@ public: try{ do_test_FiberDiffractionEnergy(); do_test_FiberDiffractionEnergyDens(); - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << "ERROR: Exception caught by FiberDiffractionEnergy:" << excn << std::endl; } diff --git a/source/test/core/select/jump_selector/AndJumpSelector.cxxtest.hh b/source/test/core/select/jump_selector/AndJumpSelector.cxxtest.hh index 283056dd31..d8463c94ec 100644 --- a/source/test/core/select/jump_selector/AndJumpSelector.cxxtest.hh +++ b/source/test/core/select/jump_selector/AndJumpSelector.cxxtest.hh @@ -98,7 +98,7 @@ public: JumpSelectorOP and_js( new AndJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -126,9 +126,9 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No JumpSelectors given to the AndJumpSelector; AndJumpSelector requires at least one JumpSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -146,9 +146,10 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from AndJumpSelector::parse_my_tag.\nERROR: Could not find JumpSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from AndJumpSelector::parse_my_tag."; //\nERROR: Could not find JumpSelector and name odd in Datamap\n"; + + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -162,7 +163,7 @@ public: JumpSelectorOP and_js( new AndJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -185,7 +186,7 @@ public: JumpSelectorOP and_js( new AndJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -209,9 +210,9 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // parsing should fail here - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string err_msg = "No JumpSelectorCreator with the name 'Bogus' has been registered with the JumpSelectorFactory"; - TS_ASSERT( e.msg() == err_msg ); + TS_ASSERT( e.msg().find(err_msg) != std::string::npos ); } } diff --git a/source/test/core/select/jump_selector/InterchainJumpSelector.cxxtest.hh b/source/test/core/select/jump_selector/InterchainJumpSelector.cxxtest.hh index 9ee3d4e1f5..e7fb8d9b70 100644 --- a/source/test/core/select/jump_selector/InterchainJumpSelector.cxxtest.hh +++ b/source/test/core/select/jump_selector/InterchainJumpSelector.cxxtest.hh @@ -82,7 +82,7 @@ public: JumpSelectorOP interchain_js( new InterchainJumpSelector ); try { interchain_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } diff --git a/source/test/core/select/jump_selector/JumpIndexSelector.cxxtest.hh b/source/test/core/select/jump_selector/JumpIndexSelector.cxxtest.hh index fc80d0d898..e56d3ab190 100644 --- a/source/test/core/select/jump_selector/JumpIndexSelector.cxxtest.hh +++ b/source/test/core/select/jump_selector/JumpIndexSelector.cxxtest.hh @@ -78,7 +78,7 @@ public: JumpSelectorOP index_js( new JumpIndexSelector ); try { index_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } diff --git a/source/test/core/select/jump_selector/NotJumpSelector.cxxtest.hh b/source/test/core/select/jump_selector/NotJumpSelector.cxxtest.hh index 06f551bbb9..9590687041 100644 --- a/source/test/core/select/jump_selector/NotJumpSelector.cxxtest.hh +++ b/source/test/core/select/jump_selector/NotJumpSelector.cxxtest.hh @@ -90,7 +90,7 @@ public: JumpSelectorOP not_js( new NotJumpSelector ); try { not_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -116,9 +116,9 @@ public: try { not_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No JumpSelector given to the NotJumpSelector; NotJumpSelector requires a JumpSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -135,9 +135,9 @@ public: try { not_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from NotJumpSelector::parse_my_tag.\nERROR: Could not find JumpSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from NotJumpSelector::parse_my_tag."; // \nERROR: Could not find JumpSelector and name odd in Datamap\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } diff --git a/source/test/core/select/jump_selector/OrJumpSelector.cxxtest.hh b/source/test/core/select/jump_selector/OrJumpSelector.cxxtest.hh index 9081866683..b82a05c05e 100644 --- a/source/test/core/select/jump_selector/OrJumpSelector.cxxtest.hh +++ b/source/test/core/select/jump_selector/OrJumpSelector.cxxtest.hh @@ -98,7 +98,7 @@ public: JumpSelectorOP and_js( new OrJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -126,9 +126,9 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No JumpSelectors given to the OrJumpSelector; OrJumpSelector requires at least one JumpSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -146,9 +146,9 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from OrJumpSelector::parse_my_tag.\nERROR: Could not find JumpSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find JumpSelector named 'odd' from the Datamap from OrJumpSelector::parse_my_tag."; //\nERROR: Could not find JumpSelector and name odd in Datamap\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -162,7 +162,7 @@ public: JumpSelectorOP and_js( new OrJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -185,7 +185,7 @@ public: JumpSelectorOP and_js( new OrJumpSelector ); try { and_js->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -209,9 +209,9 @@ public: try { and_js->parse_my_tag( tag, dm ); TS_ASSERT( false ); // parsing should fail here - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string err_msg = "No JumpSelectorCreator with the name 'Bogus' has been registered with the JumpSelectorFactory"; - TS_ASSERT( e.msg() == err_msg ); + TS_ASSERT( e.msg().find(err_msg) != std::string::npos ); } } diff --git a/source/test/core/select/movemap/MoveMapFactory.cxxtest.hh b/source/test/core/select/movemap/MoveMapFactory.cxxtest.hh index 1d9ceec03f..9c157710b1 100644 --- a/source/test/core/select/movemap/MoveMapFactory.cxxtest.hh +++ b/source/test/core/select/movemap/MoveMapFactory.cxxtest.hh @@ -75,7 +75,7 @@ public: MoveMapFactoryOP mmf( new MoveMapFactory ); try { mmf->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -113,7 +113,7 @@ public: MoveMapFactoryOP mmf( new MoveMapFactory ); try { mmf->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -152,7 +152,7 @@ public: MoveMapFactoryOP mmf( new MoveMapFactory ); try { mmf->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } diff --git a/source/test/core/select/residue_selector/AndResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/AndResidueSelector.cxxtest.hh index 6931780cdc..a1346ca0df 100644 --- a/source/test/core/select/residue_selector/AndResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/AndResidueSelector.cxxtest.hh @@ -72,7 +72,7 @@ public: ResidueSelectorOP and_rs( new AndResidueSelector ); try { and_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -98,9 +98,9 @@ public: try { and_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No ResidueSelectors given to the AndResidueSelector; AndResidueSelector requires at least one ResidueSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -118,9 +118,9 @@ public: try { and_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from AndResidueSelector::parse_my_tag.\nERROR: Could not find ResidueSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from AndResidueSelector::parse_my_tag."; // \nERROR: Could not find ResidueSelector and name odd in Datamap\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -134,7 +134,7 @@ public: ResidueSelectorOP and_rs( new AndResidueSelector ); try { and_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -157,9 +157,9 @@ public: try { and_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // parsing should fail here - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string err_msg = "No ResidueSelectorCreator with the name 'Bogus' has been registered with the ResidueSelectorFactory"; - TS_ASSERT( e.msg() == err_msg ); + TS_ASSERT( e.msg().find(err_msg) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/BondedResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/BondedResidueSelector.cxxtest.hh index a473bd2415..d44a4cee20 100644 --- a/source/test/core/select/residue_selector/BondedResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/BondedResidueSelector.cxxtest.hh @@ -60,13 +60,13 @@ public: BondedResidueSelectorOP rs( new BondedResidueSelector ); TR << "Resnums and selector" << std::endl; - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_Msg_Exception ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::Exception ); std::stringstream ss_two_selectors; ss_two_selectors << ""; tag->read( ss_two_selectors ); TR << "Two selectors"; - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_Msg_Exception ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::Exception ); std::stringstream ssgood_resnums; ssgood_resnums << ""; diff --git a/source/test/core/select/residue_selector/ChainSelector.cxxtest.hh b/source/test/core/select/residue_selector/ChainSelector.cxxtest.hh index af5f95337e..5d035738a6 100644 --- a/source/test/core/select/residue_selector/ChainSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/ChainSelector.cxxtest.hh @@ -178,7 +178,7 @@ public: ResidueSelectorOP chain_rs( new ChainSelector ); try { chain_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed return; @@ -202,7 +202,7 @@ public: ResidueSelectorOP chain_rs( new ChainSelector ); try { chain_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed return; @@ -241,9 +241,9 @@ public: try { chain_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "ChainSelector::parse_my_tag was not able to find the required option 'chains' in the input Tag\nOption chains not found.\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "ChainSelector::parse_my_tag was not able to find the required option 'chains' in the input Tag"; // \nOption chains not found.\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/CloseContactResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/CloseContactResidueSelector.cxxtest.hh index 4ae3ff7d68..08e6696d7a 100644 --- a/source/test/core/select/residue_selector/CloseContactResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/CloseContactResidueSelector.cxxtest.hh @@ -118,7 +118,7 @@ public: // try { // neighbor_rs->parse_my_tag( tag, dm ); // TS_ASSERT( false ); //parsing should fail! - // } catch ( utility::excn::EXCN_Msg_Exception e ) { + // } catch (utility::excn::Exception e ) { // TS_ASSERT(true == true); //We should always get here. // } //} @@ -154,7 +154,7 @@ public: // subset = neighbor_rs->apply( trpcage ); // TS_ASSERT( check_calculation( trpcage, subset, focus_set, 5.0 ) ); // - // } catch ( utility::excn::EXCN_Msg_Exception e ) { + // } catch (utility::excn::Exception e ) { // std::cerr << "Exception! " << e.msg(); // TS_ASSERT( false ); // } diff --git a/source/test/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cxxtest.hh b/source/test/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cxxtest.hh index 42c2c7c297..0f0217c01b 100644 --- a/source/test/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/InterGroupInterfaceByVectorSelector.cxxtest.hh @@ -147,7 +147,7 @@ public: ResidueSelectorOP igibv_rs( new InterGroupInterfaceByVectorSelector ); try { igibv_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed return; @@ -181,10 +181,10 @@ public: try { igibv_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should not succeed - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { //std::cerr << "Exception!" << e.msg() << std::endl; std::string expected_error = "InterGroupInterfaceByVectorSelector::parse_my_tag requires either grp1_selector or grp1_residues to be specified\n"; - TS_ASSERT_EQUALS( e.msg(), expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); return; } @@ -205,10 +205,10 @@ public: try { igibv_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should not succeed - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { //std::cerr << "Exception!" << e.msg() << std::endl; std::string expected_error = "InterGroupInterfaceByVectorSelector::parse_my_tag requires either grp2_selector or grp2_residues to be specified\n"; - TS_ASSERT_EQUALS( e.msg(), expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -226,10 +226,10 @@ public: try { igibv_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should not succeed - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // std::cerr << "Exception!" << e.msg() << std::endl; - std::string expected_error = "Failed to find ResidueSelector named 'bogus' from the Datamap from InterGroupInterfaceByVectorSelector::parse_my_tag\nERROR: Could not find ResidueSelector and name bogus in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected_error ); + std::string expected_error = "Failed to find ResidueSelector named 'bogus' from the Datamap from InterGroupInterfaceByVectorSelector::parse_my_tag"; //\nERROR: Could not find ResidueSelector and name bogus in Datamap\n + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); return; } @@ -248,10 +248,10 @@ public: try { igibv_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should not succeed - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // std::cerr << "Exception!" << e.msg() << std::endl; std::string expected_error = "InterGroupInterfaceByVectorSelector takes either two or zero subtags to specify residue groups!\n"; - TS_ASSERT_EQUALS( e.msg(), expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); return; } } diff --git a/source/test/core/select/residue_selector/JumpDownstreamSelector.cxxtest.hh b/source/test/core/select/residue_selector/JumpDownstreamSelector.cxxtest.hh index 26bd05e031..b725723898 100644 --- a/source/test/core/select/residue_selector/JumpDownstreamSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/JumpDownstreamSelector.cxxtest.hh @@ -57,7 +57,7 @@ public: try { jump_d_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -87,10 +87,10 @@ public: try { jump_d_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // std::cerr << "Exception (fail_no_resnums): " << e.msg(); - std::string expected_err = "Failed to access required option 'jump' from JumpDownstreamSelector::parse_my_tag.\nOption jump not found.\n"; - TS_ASSERT( e.msg() == expected_err); + std::string expected_err = "Failed to access required option 'jump' from JumpDownstreamSelector::parse_my_tag."; //\nOption jump not found.\n + TS_ASSERT( e.msg().find(expected_err) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/JumpUpstreamSelector.cxxtest.hh b/source/test/core/select/residue_selector/JumpUpstreamSelector.cxxtest.hh index 8d3b46fece..22087a7748 100644 --- a/source/test/core/select/residue_selector/JumpUpstreamSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/JumpUpstreamSelector.cxxtest.hh @@ -56,7 +56,7 @@ public: try { jump_u_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -86,10 +86,10 @@ public: try { jump_u_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // std::cerr << "Exception (fail_no_resnums): " << e.msg(); - std::string expected_err = "Failed to access required option 'jump' from JumpUpstreamSelector::parse_my_tag.\nOption jump not found.\n"; - TS_ASSERT( e.msg() == expected_err); + std::string expected_err = "Failed to access required option 'jump' from JumpUpstreamSelector::parse_my_tag."; // \nOption jump not found.\n + TS_ASSERT( e.msg().find(expected_err) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/NeighborhoodResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/NeighborhoodResidueSelector.cxxtest.hh index feff2a1cce..2f81208552 100644 --- a/source/test/core/select/residue_selector/NeighborhoodResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/NeighborhoodResidueSelector.cxxtest.hh @@ -190,7 +190,7 @@ public: try { neighbor_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT(true == true); //We should always get here. } } @@ -226,7 +226,7 @@ public: subset = neighbor_rs->apply( trpcage ); TS_ASSERT( check_calculation( trpcage, subset, focus_set, 5.0 ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception! " << e.msg(); TS_ASSERT( false ); } diff --git a/source/test/core/select/residue_selector/NotResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/NotResidueSelector.cxxtest.hh index 6d8a897d9d..e7e3388f7f 100644 --- a/source/test/core/select/residue_selector/NotResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/NotResidueSelector.cxxtest.hh @@ -67,7 +67,7 @@ public: ResidueSelectorOP not_rs( new NotResidueSelector ); try { not_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -93,9 +93,9 @@ public: try { not_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No ResidueSelector given to the NotResidueSelector; NotResidueSelector requires a ResidueSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -112,9 +112,9 @@ public: try { not_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from NotResidueSelector::parse_my_tag.\nERROR: Could not find ResidueSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from NotResidueSelector::parse_my_tag."; // \nERROR: Could not find ResidueSelector and name odd in Datamap\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/NumNeighborsSelector.cxxtest.hh b/source/test/core/select/residue_selector/NumNeighborsSelector.cxxtest.hh index d92d9c98f4..75dfc7f0e7 100644 --- a/source/test/core/select/residue_selector/NumNeighborsSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/NumNeighborsSelector.cxxtest.hh @@ -78,7 +78,7 @@ public: NumNeighborsSelectorOP nn_rs( new NumNeighborsSelector ); try { nn_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed return; @@ -99,7 +99,7 @@ public: NumNeighborsSelectorOP nn_rs( new NumNeighborsSelector ); try { nn_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed return; diff --git a/source/test/core/select/residue_selector/OrResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/OrResidueSelector.cxxtest.hh index b60278d409..69d334aab6 100644 --- a/source/test/core/select/residue_selector/OrResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/OrResidueSelector.cxxtest.hh @@ -71,7 +71,7 @@ public: ResidueSelectorOP or_rs( new OrResidueSelector ); try { or_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -98,9 +98,9 @@ public: try { or_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected = "No ResidueSelectors given to the OrResidueSelector; OrResidueSelector requires at least one ResidueSelector as input\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -118,9 +118,9 @@ public: try { or_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // this parsing should fail - } catch ( utility::excn::EXCN_Msg_Exception e ) { - std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from OrResidueSelector::parse_my_tag.\nERROR: Could not find ResidueSelector and name odd in Datamap\n"; - TS_ASSERT_EQUALS( e.msg(), expected ); + } catch (utility::excn::Exception e ) { + std::string expected = "Failed to find ResidueSelector named 'odd' from the Datamap from OrResidueSelector::parse_my_tag."; // \nERROR: Could not find ResidueSelector and name odd in Datamap\n + TS_ASSERT( e.msg().find(expected) != std::string::npos ); } } @@ -134,7 +134,7 @@ public: ResidueSelectorOP or_rs( new OrResidueSelector ); try { or_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); } @@ -157,9 +157,9 @@ public: try { and_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); // parsing should fail here - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string err_msg = "No ResidueSelectorCreator with the name 'Bogus' has been registered with the ResidueSelectorFactory"; - TS_ASSERT( e.msg() == err_msg ); + TS_ASSERT( e.msg().find(err_msg) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/RandomResidueSelector.cxxtest.hh b/source/test/core/select/residue_selector/RandomResidueSelector.cxxtest.hh index 42d2f30be0..4ba1a5b510 100644 --- a/source/test/core/select/residue_selector/RandomResidueSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/RandomResidueSelector.cxxtest.hh @@ -54,7 +54,7 @@ public: ResidueSelectorOP name_rs( new RandomResidueSelector ); try { name_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } diff --git a/source/test/core/select/residue_selector/ResidueIndexSelector.cxxtest.hh b/source/test/core/select/residue_selector/ResidueIndexSelector.cxxtest.hh index b42a45dc0b..a884142b9d 100644 --- a/source/test/core/select/residue_selector/ResidueIndexSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/ResidueIndexSelector.cxxtest.hh @@ -57,7 +57,7 @@ public: ResidueSelectorOP index_rs( new ResidueIndexSelector ); try { index_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -86,7 +86,7 @@ public: ResidueSelectorOP index_rs( new ResidueIndexSelector ); try { index_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -117,10 +117,10 @@ public: try { index_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { //std::cerr << "Exception (fail_no_resnums): " << e.msg(); - std::string expected_err = "Failed to access required option 'resnums' from ResidueIndexSelector::parse_my_tag.\nOption resnums not found.\n"; - TS_ASSERT_EQUALS( e.msg(), expected_err); + std::string expected_err = "Failed to access required option 'resnums' from ResidueIndexSelector::parse_my_tag."; // \nOption resnums not found.\n + TS_ASSERT( e.msg().find(expected_err) != std::string::npos ); } } @@ -136,10 +136,10 @@ public: try { index_rs->apply( trpcage ); TS_ASSERT( false ); - } catch( utility::excn::EXCN_Msg_Exception e) { + } catch (utility::excn::Exception e) { //std::cerr << "Exception (fail_index_out_of_range): '" << e.msg() << "'"; - std::string expected_err = "Residue 21 not found in pose!\n"; - TS_ASSERT( e.msg() == expected_err); + std::string expected_err = "Residue 21 not found in pose!"; + TS_ASSERT( e.msg().find(expected_err) != std::string::npos ); } } @@ -154,10 +154,10 @@ public: try { index_rs->apply( trpcage ); TS_ASSERT( false ); - } catch( utility::excn::EXCN_Msg_Exception e) { + } catch (utility::excn::Exception e) { //std::cerr << "Exception (fail_chain_out_of_range): " << e.msg(); std::string expected_err = "Residue 0 not found in pose!\n"; - TS_ASSERT( e.msg() == expected_err); + TS_ASSERT( e.msg().find(expected_err) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/ResidueNameSelector.cxxtest.hh b/source/test/core/select/residue_selector/ResidueNameSelector.cxxtest.hh index 9a05df24c9..ff891b71c5 100644 --- a/source/test/core/select/residue_selector/ResidueNameSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/ResidueNameSelector.cxxtest.hh @@ -57,7 +57,7 @@ public: ResidueSelectorOP name_rs( new ResidueNameSelector ); try { name_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -87,7 +87,7 @@ public: ResidueSelectorOP name_rs( new ResidueNameSelector ); try { name_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -118,7 +118,7 @@ public: ResidueSelectorOP name_rs( new ResidueNameSelector ); try { name_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -150,7 +150,7 @@ public: try { name_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // should fail with a message TS_ASSERT( e.msg() != "" ); } @@ -167,7 +167,7 @@ public: try { name_rs->apply( trpcage ); TS_ASSERT( false ); - } catch( utility::excn::EXCN_Msg_Exception e) { + } catch (utility::excn::Exception e) { TS_ASSERT( e.msg() != "" ); } } @@ -184,7 +184,7 @@ public: try { name_rs->apply( trpcage ); TS_ASSERT( false ); - } catch( utility::excn::EXCN_Msg_Exception e) { + } catch (utility::excn::Exception e) { TS_ASSERT( e.msg() != "" ); } } diff --git a/source/test/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cxxtest.hh b/source/test/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cxxtest.hh index 6a67734ff6..0100c9164f 100644 --- a/source/test/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/ResiduePDBInfoHasLabelSelector.cxxtest.hh @@ -60,7 +60,7 @@ public: ResidueSelectorOP name_rs( new ResiduePDBInfoHasLabelSelector ); try { name_rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -93,7 +93,7 @@ public: try { name_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // should fail with a message TS_ASSERT( e.msg() != "" ); } diff --git a/source/test/core/select/residue_selector/ResidueSelectorFactory.cxxtest.hh b/source/test/core/select/residue_selector/ResidueSelectorFactory.cxxtest.hh index 40aedcc32d..411573d5c9 100644 --- a/source/test/core/select/residue_selector/ResidueSelectorFactory.cxxtest.hh +++ b/source/test/core/select/residue_selector/ResidueSelectorFactory.cxxtest.hh @@ -127,9 +127,9 @@ public: factory->set_throw_on_double_registration(); factory->factory_register( ResidueSelectorCreatorOP( new DummyResidueSelectorCreator ) ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_err_msg = "Factory Name Conflict: Two or more ResidueSelectorCreators registered with the name DummyResidueSelector"; - TS_ASSERT( expected_err_msg == e.msg() ); + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } @@ -143,9 +143,9 @@ public: basic::datacache::DataMap dm; ResidueSelectorOP selector = factory->new_residue_selector( "DummyResidueSelector2", 0, dm ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_err_msg = "No ResidueSelectorCreator with the name 'DummyResidueSelector2' has been registered with the ResidueSelectorFactory"; - TS_ASSERT( expected_err_msg == e.msg() ); + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } diff --git a/source/test/core/select/residue_selector/SecondaryStructureSelector.cxxtest.hh b/source/test/core/select/residue_selector/SecondaryStructureSelector.cxxtest.hh index e1a198a24c..e9ac19a661 100644 --- a/source/test/core/select/residue_selector/SecondaryStructureSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/SecondaryStructureSelector.cxxtest.hh @@ -57,7 +57,7 @@ public: SecondaryStructureSelectorOP rs( new SecondaryStructureSelector ); try { rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -110,7 +110,7 @@ public: ResidueSelectorOP rs( new SecondaryStructureSelector ); try { rs->parse_my_tag( tag, dm ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Exception!" << e.msg() << std::endl; TS_ASSERT( false ); // this parsing should succeed } @@ -159,7 +159,7 @@ public: try { name_rs->parse_my_tag( tag, dm ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // should fail with a message TS_ASSERT( e.msg() != "" ); } @@ -172,7 +172,7 @@ public: try { ResidueSubset subset = rs->apply( trpcage ); TS_ASSERT( false ); //parsing should fail! - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { // should fail with a message TS_ASSERT( e.msg() != "" ); } @@ -188,7 +188,7 @@ public: ResidueSelectorOP name_rs( new SecondaryStructureSelector( names ) ); name_rs->apply( trpcage ); TS_ASSERT( false ); - } catch( utility::excn::EXCN_Msg_Exception e) { + } catch (utility::excn::Exception e) { TS_ASSERT( e.msg() != "" ); } } diff --git a/source/test/core/select/residue_selector/TaskSelector.cxxtest.hh b/source/test/core/select/residue_selector/TaskSelector.cxxtest.hh index 74309f9901..0248e378c0 100644 --- a/source/test/core/select/residue_selector/TaskSelector.cxxtest.hh +++ b/source/test/core/select/residue_selector/TaskSelector.cxxtest.hh @@ -58,12 +58,12 @@ public: basic::datacache::DataMap dm; TaskSelectorOP rs( new TaskSelector ); - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::RosettaScriptsOptionError ); std::stringstream ssgood; ssgood << ""; tag->read( ssgood ); - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::RosettaScriptsOptionError ); protocols::toolbox::task_operations::DesignAroundOperationOP des_around( new protocols::toolbox::task_operations::DesignAroundOperation ); des_around->include_residue( 2 ); diff --git a/source/test/devel/mmt_msd/MMTDriver.cxxtest.hh b/source/test/devel/mmt_msd/MMTDriver.cxxtest.hh index 1bf9efe588..da0be613ef 100644 --- a/source/test/devel/mmt_msd/MMTDriver.cxxtest.hh +++ b/source/test/devel/mmt_msd/MMTDriver.cxxtest.hh @@ -240,7 +240,7 @@ public: std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag '" << message_tag << "': " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -254,7 +254,7 @@ public: std::string msg; try { msg = utility::receive_string_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag '" << message_tag << "': " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -275,7 +275,7 @@ public: std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -289,7 +289,7 @@ public: double msg; try { msg = utility::receive_double_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -369,7 +369,7 @@ public: mmt_driver.run(); solutions = mmt_driver.retrieve_optimal_solutions(); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/devel/mmt_msd/MMTReceiver.cxxtest.hh b/source/test/devel/mmt_msd/MMTReceiver.cxxtest.hh index b0a6a089bb..a34ab3bc24 100644 --- a/source/test/devel/mmt_msd/MMTReceiver.cxxtest.hh +++ b/source/test/devel/mmt_msd/MMTReceiver.cxxtest.hh @@ -151,7 +151,7 @@ public: std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -165,7 +165,7 @@ public: std::string msg; try { msg = utility::receive_string_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -186,7 +186,7 @@ public: std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -200,7 +200,7 @@ public: double msg( 0 ); try { msg = utility::receive_double_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag " << message_tag << ": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -220,7 +220,7 @@ public: mmtr.set_max_capacity( 1 ); try { mmtr.initial_handshake(); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << e.msg() << std::endl; TS_ASSERT( false ); } @@ -247,7 +247,7 @@ public: mmtr.initial_handshake(); mmtr.main_optimization_loop(); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/devel/sewing/SewHashTests.cxxtest.cc b/source/test/devel/sewing/SewHashTests.cxxtest.cc index 762bff42a7..982497ec00 100644 --- a/source/test/devel/sewing/SewHashTests.cxxtest.cc +++ b/source/test/devel/sewing/SewHashTests.cxxtest.cc @@ -20,7 +20,7 @@ #include //catch unhandled exceptions in unit tests -#include +#include #include "SewHashTests.cxxtest.hh" static SewHashTests suite_SewHashTests; diff --git a/source/test/devel/sewing/SewHashTests.cxxtest.cpp b/source/test/devel/sewing/SewHashTests.cxxtest.cpp index bd488fa4e7..0a8ab8a739 100644 --- a/source/test/devel/sewing/SewHashTests.cxxtest.cpp +++ b/source/test/devel/sewing/SewHashTests.cxxtest.cpp @@ -11,7 +11,7 @@ #include //catch unhandled exceptions in unit tests -#include +#include #include "SewHashTests.cxxtest.hh" static SewHashTests suite_SewHashTests; diff --git a/source/test/protocols/abinitio/GunnCost.cxxtest.hh b/source/test/protocols/abinitio/GunnCost.cxxtest.hh index a3dd735c9d..20816bdd2c 100644 --- a/source/test/protocols/abinitio/GunnCost.cxxtest.hh +++ b/source/test/protocols/abinitio/GunnCost.cxxtest.hh @@ -116,7 +116,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/source/test/protocols/abinitio/PseudocontactShiftEnergy.cxxtest.hh b/source/test/protocols/abinitio/PseudocontactShiftEnergy.cxxtest.hh index ccf615f8ce..814df7a2c7 100644 --- a/source/test/protocols/abinitio/PseudocontactShiftEnergy.cxxtest.hh +++ b/source/test/protocols/abinitio/PseudocontactShiftEnergy.cxxtest.hh @@ -85,7 +85,7 @@ #include #include #include -#include +#include #include #include #include @@ -214,7 +214,7 @@ public: try { add_cmdline_claims(*top_bro_OP_, false); } -catch ( utility::excn::EXCN_Exception &excn ) { +catch (utility::excn::Exception &excn ) { excn.show( std::cerr ); utility_exit(); } diff --git a/source/test/protocols/abinitio/abscript/RigidChunkTest.cxxtest.hh b/source/test/protocols/abinitio/abscript/RigidChunkTest.cxxtest.hh index 913ab25a1e..757e764567 100644 --- a/source/test/protocols/abinitio/abscript/RigidChunkTest.cxxtest.hh +++ b/source/test/protocols/abinitio/abscript/RigidChunkTest.cxxtest.hh @@ -278,7 +278,7 @@ public: env->register_mover( rigid_chunk ); core::pose::Pose ppose; - TS_ASSERT_THROWS( ppose = env->start( pose ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( ppose = env->start( pose ), utility::excn::BadInput ); simple_moves::SwitchResidueTypeSetMover( "centroid" ).apply( pose ); TS_ASSERT_THROWS_NOTHING( ppose = env->start( pose ) ); diff --git a/source/test/protocols/analysis/InterfaceDdGMoverTests.cxxtest.hh b/source/test/protocols/analysis/InterfaceDdGMoverTests.cxxtest.hh index 5fe7a487ed..22f0efed20 100644 --- a/source/test/protocols/analysis/InterfaceDdGMoverTests.cxxtest.hh +++ b/source/test/protocols/analysis/InterfaceDdGMoverTests.cxxtest.hh @@ -107,7 +107,7 @@ public: void test_uninitialized() { // Tests that exception is thrown if which chain to move is not defined; via c++ interface - TS_ASSERT_THROWS( test_instantiation_->unbind( *test_dimer_pose_ ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( test_instantiation_->unbind( *test_dimer_pose_ ), utility::excn::BadInput ); } void test_dimer_unbind_jump1() { @@ -121,7 +121,7 @@ public: void test_dimer_unbind_jump2() { // Tests that failure is caught with out of range jump_id - TS_ASSERT_THROWS( test_instantiation_->add_jump_id( 2, *test_dimer_pose_ ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( test_instantiation_->add_jump_id( 2, *test_dimer_pose_ ), utility::excn::BadInput ); } void test_dimer_unbind_chain1() { @@ -140,7 +140,7 @@ public: void test_dimer_unbind_chain3() { // Tests that failure is caught with out of range chain_id - TS_ASSERT_THROWS( test_instantiation_->add_chain_id( 3, *test_dimer_pose_ ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( test_instantiation_->add_chain_id( 3, *test_dimer_pose_ ), utility::excn::BadInput ); } void test_dimer_unbind_chainA() { @@ -159,7 +159,7 @@ public: void test_dimer_unbind_chainC() { // Tests that failure is caught with out of range chain name - TS_ASSERT_THROWS( test_instantiation_->add_chain_name( "C", *test_dimer_pose_ ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( test_instantiation_->add_chain_name( "C", *test_dimer_pose_ ), utility::excn::BadInput ); } void test_8mer_unbind_by_single_chain_id() { @@ -236,7 +236,7 @@ public: }; for ( auto tag_str : bad_tags ) { TagCOP tag = tagptr_from_string(tag_str); - TS_ASSERT_THROWS( test_instantiation_->parse_my_tag(tag, data_, filters_, movers_, *test_dimer_pose_), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( test_instantiation_->parse_my_tag(tag, data_, filters_, movers_, *test_dimer_pose_), utility::excn::RosettaScriptsOptionError ); } } diff --git a/source/test/protocols/analysis/LoopAnalyzerMoverTests.cxxtest.hh b/source/test/protocols/analysis/LoopAnalyzerMoverTests.cxxtest.hh index 323f379754..99a4aec669 100644 --- a/source/test/protocols/analysis/LoopAnalyzerMoverTests.cxxtest.hh +++ b/source/test/protocols/analysis/LoopAnalyzerMoverTests.cxxtest.hh @@ -267,7 +267,7 @@ public: set_throw_on_next_assertion_failure(); LAM_bad1.apply(double_pose); TS_ASSERT( false ); //should have thrown - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string const expected_error_message = "Loops::Error, loop crosses chain boundary"; std::size_t const found = e.msg().find(expected_error_message); //look for the substring TS_ASSERT_DIFFERS( found, std::string::npos ); //assert we did not fail to find @@ -276,7 +276,7 @@ public: set_throw_on_next_assertion_failure(); LAM_bad2.apply(double_pose); TS_ASSERT( false ); //should have thrown - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string const expected_error_message = "LoopRebuild::ERROR Loop definition out of boundary \n"; std::size_t const found = e.msg().find(expected_error_message); //look for the substring TS_ASSERT_DIFFERS( found, std::string::npos ); //assert we did not fail to find diff --git a/source/test/protocols/constraint_generator/ConstraintGeneratorFactory.cxxtest.hh b/source/test/protocols/constraint_generator/ConstraintGeneratorFactory.cxxtest.hh index 5ee32eb473..39e6936896 100644 --- a/source/test/protocols/constraint_generator/ConstraintGeneratorFactory.cxxtest.hh +++ b/source/test/protocols/constraint_generator/ConstraintGeneratorFactory.cxxtest.hh @@ -115,7 +115,7 @@ public: basic::datacache::DataMap dm; set_throw_on_next_assertion_failure(); TS_ASSERT_THROWS( ConstraintGeneratorFactory::get_instance()->new_constraint_generator( "DummyConstraintGenerator2", 0, dm ), - utility::excn::EXCN_Msg_Exception ); + utility::excn::Exception ); } }; diff --git a/source/test/protocols/denovo_design/movers/ExtendChainMover.cxxtest.hh b/source/test/protocols/denovo_design/movers/ExtendChainMover.cxxtest.hh index f3f5c68058..30a3b4f701 100644 --- a/source/test/protocols/denovo_design/movers/ExtendChainMover.cxxtest.hh +++ b/source/test/protocols/denovo_design/movers/ExtendChainMover.cxxtest.hh @@ -92,13 +92,13 @@ public: std::stringstream xml; xml << ""; utility::tag::TagOP tag = utility::tag::Tag::create( xml ); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); std::stringstream xml2; xml2 << ""; tag = utility::tag::Tag::create( xml2 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); std::stringstream xml3; xml3 << ""; @@ -117,14 +117,14 @@ public: xml5 << ""; tag = utility::tag::Tag::create( xml5 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); // must have motif specified, not length! std::stringstream xml6; xml6 << ""; tag = utility::tag::Tag::create( xml6 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); } void test_append() { diff --git a/source/test/protocols/denovo_design/movers/ExtendChainMoverTests.cxxtest.hh b/source/test/protocols/denovo_design/movers/ExtendChainMoverTests.cxxtest.hh index f9e6401f45..744b9d2af5 100644 --- a/source/test/protocols/denovo_design/movers/ExtendChainMoverTests.cxxtest.hh +++ b/source/test/protocols/denovo_design/movers/ExtendChainMoverTests.cxxtest.hh @@ -91,13 +91,13 @@ public: std::stringstream xml; xml << ""; utility::tag::TagOP tag = utility::tag::Tag::create( xml ); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); std::stringstream xml2; xml2 << ""; tag = utility::tag::Tag::create( xml2 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); std::stringstream xml3; xml3 << ""; @@ -116,14 +116,14 @@ public: xml5 << ""; tag = utility::tag::Tag::create( xml5 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); // must have motif specified, not length! std::stringstream xml6; xml6 << ""; tag = utility::tag::Tag::create( xml6 ); extend = ExtendChainMover(); - TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( extend.parse_my_tag( tag, datamap, filters, movers, input_pose ), utility::excn::RosettaScriptsOptionError ); } void test_append() { diff --git a/source/test/protocols/environment/EnvironmentJump.cxxtest.hh b/source/test/protocols/environment/EnvironmentJump.cxxtest.hh index d7cc02289c..3c5e08669c 100644 --- a/source/test/protocols/environment/EnvironmentJump.cxxtest.hh +++ b/source/test/protocols/environment/EnvironmentJump.cxxtest.hh @@ -144,7 +144,7 @@ public: TS_ASSERT_THROWS( no_claim_mover->apply( protected_pose, boost::bind( set_jump_, &protected_pose, 1, new_jump ) ), EXCN_Env_Security_Exception ); TS_ASSERT_THROWS( unreg_mover->apply( protected_pose, boost::bind( set_jump_, &protected_pose, 1, new_jump ) ), - utility::excn::EXCN_NullPointer ); + utility::excn::NullPointerError ); TS_ASSERT_EQUALS( protected_pose.jump( 1 ).get_translation(), init_jump.get_translation() ); TS_ASSERT_EQUALS( protected_pose.jump( 1 ).get_rotation(), init_jump.get_rotation() ); @@ -188,7 +188,7 @@ public: Environment & env = *env_op; env.register_mover( allowed_mover ); - TS_ASSERT_THROWS( core::pose::Pose ppose = env.start( pose ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( core::pose::Pose ppose = env.start( pose ), utility::excn::BadInput ); env.auto_cut( true ); core::pose::Pose ppose; @@ -235,7 +235,7 @@ public: core::pose::Pose ppose; //Verify unbrokerable - TS_ASSERT_THROWS( ppose = env.start( pose ) , utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( ppose = env.start( pose ) , utility::excn::BadInput ); //Verify allowing cut inheritance allows brokering. env.inherit_cuts( true ); diff --git a/source/test/protocols/environment/EnvironmentTorsion.cxxtest.hh b/source/test/protocols/environment/EnvironmentTorsion.cxxtest.hh index e1e6ff523f..dd60f24109 100644 --- a/source/test/protocols/environment/EnvironmentTorsion.cxxtest.hh +++ b/source/test/protocols/environment/EnvironmentTorsion.cxxtest.hh @@ -111,7 +111,7 @@ public: { core::pose::Pose protected1; TS_ASSERT_THROWS_NOTHING( protected1 = env1.start( pose ) ); - TS_ASSERT_THROWS( tier2_mover->apply( protected1 ), utility::excn::EXCN_NullPointer ); + TS_ASSERT_THROWS( tier2_mover->apply( protected1 ), utility::excn::NullPointerError ); TS_ASSERT_EQUALS( protected1.phi( CLAIMED_RESID ), init_phis[ CLAIMED_RESID ] ); { core::pose::Pose protected2; @@ -124,7 +124,7 @@ public: } TS_ASSERT_DELTA( protected1.phi( CLAIMED_RESID ), NEW_PHI, 0.001 ); TS_ASSERT_THROWS_NOTHING( tier1_mover->apply( protected1) ); - TS_ASSERT_THROWS( tier2_mover->apply( protected1 ), utility::excn::EXCN_NullPointer ); + TS_ASSERT_THROWS( tier2_mover->apply( protected1 ), utility::excn::NullPointerError ); TS_ASSERT_THROWS_NOTHING( final_pose = env1.end( protected1 ) ); } @@ -174,7 +174,7 @@ public: TS_ASSERT_DELTA( protected_pose.phi( CLAIMED_RESID ), init_phis[ CLAIMED_RESID ], 1e-12 ); // Verify that unregistered mover lacks a passport for protected_pose conformation - TS_ASSERT_THROWS( unreg_mover->apply( protected_pose ), utility::excn::EXCN_NullPointer ); + TS_ASSERT_THROWS( unreg_mover->apply( protected_pose ), utility::excn::NullPointerError ); TS_ASSERT_DELTA( protected_pose.phi( CLAIMED_RESID ), init_phis[ CLAIMED_RESID ], 1e-12 ); // Verify that allowed_mover can change it's claimed angle @@ -288,7 +288,7 @@ public: env.register_mover( must_mover ); core::pose::Pose protected_pose; - TS_ASSERT_THROWS( protected_pose = env.start( pose ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( protected_pose = env.start( pose ), utility::excn::BadInput ); TR << "End: test_torsion_must_exclusive_incompatibility" << std::endl; } @@ -320,7 +320,7 @@ public: env.register_mover( must_init_mover ); env.register_mover( must_init_mover2 ); - TS_ASSERT_THROWS( protected_pose = env.start( pose ), utility::excn::EXCN_BadInput ); + TS_ASSERT_THROWS( protected_pose = env.start( pose ), utility::excn::BadInput ); } { // MUST_INIT takes precedence over CAN_INIT and does not complain. diff --git a/source/test/protocols/features/BetaTurnDetectionFeatures.cxxtest.hh b/source/test/protocols/features/BetaTurnDetectionFeatures.cxxtest.hh index a2abc851d8..9170fc3886 100644 --- a/source/test/protocols/features/BetaTurnDetectionFeatures.cxxtest.hh +++ b/source/test/protocols/features/BetaTurnDetectionFeatures.cxxtest.hh @@ -171,9 +171,9 @@ public: test_string = "XX"; beta_turns->validate_ramachandran_hash( test_string ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "The Ramachandran hash 'XX' contains 'X,' which is not valid. Valid Ramachandran hashes are 'A', 'B', 'L' and 'E' for trans peptide bonds, and 'a', 'b', 'l' and 'e' for cis peptide bonds."; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } } diff --git a/source/test/protocols/jd2/JD2ResourceManager.cxxtest.hh b/source/test/protocols/jd2/JD2ResourceManager.cxxtest.hh index efeb0b3f8c..e2f2d476a0 100644 --- a/source/test/protocols/jd2/JD2ResourceManager.cxxtest.hh +++ b/source/test/protocols/jd2/JD2ResourceManager.cxxtest.hh @@ -404,9 +404,9 @@ public: try { ResourceOP my_resource = lazy_resource_manager->get_resource_by_job_tag( rDesc, jTag ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Unable to find resource options for the resource options tag 'options_tag_without_a_corresponding_object'."; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } } @@ -438,9 +438,9 @@ public: try { ResourceOP my_resource = lazy_resource_manager->get_resource_by_job_tag( rDesc, jTag ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "LoopsFileLoader expected to be given a LoopsFileOptions object, but was given a non-LoopsFileOptions object of type 'DummyResourceOptions', which has the name 'unnamed'."; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } } @@ -459,14 +459,14 @@ public: utility::tag::TagCOP resource_options_tags = utility::tag::Tag::create( resource_options_stream ); try { jd2rm->read_resource_options_tags( resource_options_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } try { TS_ASSERT( jd2rm->has_resource_options( "dummyopt1" ) ); TS_ASSERT( dynamic_cast< DummyResourceOptions * > ( jd2rm->find_resource_options( "dummyopt1" ).get() )); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -485,7 +485,7 @@ public: utility::tag::TagCOP resource_options_tags = utility::tag::Tag::create( resource_options_stream ); try { jd2rm->read_resource_options_tags( resource_options_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -496,7 +496,7 @@ public: TS_ASSERT( jd2rm->has_resource_options( "dummyopt2" ) ); TS_ASSERT( dynamic_cast< DummyResourceOptions * > ( jd2rm->find_resource_options( "dummyopt2" ).get() )); TS_ASSERT( dynamic_cast< DummyResourceOptions * > ( jd2rm->find_resource_options( "dummyopt2" ).get() )->somevar_ == 6 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -517,7 +517,7 @@ public: try { jd2rm->read_resource_options_tags( resource_options_tags ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Duplicated tag, 'dummyopt1' assigned to a ResourceOptions object with type 'DummyResourceOptions'.\n" "Prevous ResourceOptions object with this tag was of type 'DummyResourceOptions'\n"; @@ -525,7 +525,7 @@ public: std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -542,13 +542,13 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } try { TS_ASSERT( jd2rm->has_resource_configuration( "dummyresource" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -566,14 +566,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource subtag with LoaderType 'DummyResource' was not supplied with a locatorID tag, which is required.\n"; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -590,14 +590,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Duplicated tag, 'dummyresource' assigned to a Resource object with ResourceLoader type 'DummyResource'.\n"; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -621,13 +621,13 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cout << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } try { TS_ASSERT( jd2rm->has_resource_configuration( "dummyresource" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -646,14 +646,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource 'dummyresource' with LoaderType 'DummyResource' was given the tag for a ResourceLoaderOptions, 'dummyopt1', which has not previously been declared."; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -669,14 +669,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource 'dummyresource' with LoaderType 'DummyResource' was given the tag for a ResourceLoaderOptions, 'dummyopt1', which has not previously been declared."; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -692,14 +692,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource subtag with LoaderType 'DummyResource' has both file='1ten.pdb' and locatorID='1ten.pdb' but it is only allowed to have one.\n"; if ( e.msg() != expected_error ) { std::cout << "'" << e.msg() << "'" << std::endl; std::cout << "'" << expected_error << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -715,14 +715,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource 'dummyresource' with LoaderType 'DummyResource' has locator=\"\" and file='1ten.pdb'. But specifying a file only compatible with the FileSystemResourceLocator."; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -738,14 +738,14 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Resource subtag with LoaderType 'DummyResource' was given the ResourceLocator tag 'FileSystemResourceLocator', which has not previously been declared."; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -762,7 +762,7 @@ public: utility::tag::TagCOP resource_locators_tags = utility::tag::Tag::create( resource_locators_stream ); try { jd2rm->read_resource_locators_tags( resource_locators_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -798,13 +798,13 @@ public: utility::tag::TagCOP resources_tags = utility::tag::Tag::create( resources_stream ); try { jd2rm->read_resources_tags( resources_tags ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); std::cout << "Raised exception " << e.msg() << std::endl; } try { TS_ASSERT( jd2rm->has_resource_configuration( "dummyresource" ) ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -824,7 +824,7 @@ public: ResourceOP dummy; try { dummy = jd2rm->get_resource( "DummyResource1" ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -850,7 +850,7 @@ public: try { dummy = jd2rm->get_resource( "DummyResource2" ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_error = "JD2ResourceManager does not have a resource corresponding to the resource description 'DummyResource2'. for job 'EMPTY_JOB_use_jd2'.\n" "Resources may be specified on the command line or through the JD2ResourceManagerJobInputter resource-declaration file.\n" @@ -861,7 +861,7 @@ public: std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -880,7 +880,7 @@ public: try { dummy = jd2rm->get_resource( "DummyResource3" ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_error = "JD2ResourceManager does not have a resource corresponding to the resource description 'DummyResource3'. for job 'EMPTY_JOB_use_jd2'.\n" "Resources may be specified on the command line or through the JD2ResourceManagerJobInputter resource-declaration file.\n" @@ -890,7 +890,7 @@ public: std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } diff --git a/source/test/protocols/jd2/JD2ResourceManagerJobInputter.cxxtest.hh b/source/test/protocols/jd2/JD2ResourceManagerJobInputter.cxxtest.hh index c484eae7fb..ff5f52a00a 100644 --- a/source/test/protocols/jd2/JD2ResourceManagerJobInputter.cxxtest.hh +++ b/source/test/protocols/jd2/JD2ResourceManagerJobInputter.cxxtest.hh @@ -57,7 +57,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -83,7 +83,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -110,18 +110,19 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Failed to find a data description (desc) amongst the options pairs listed reading a 'Data' tag in a Job tag.\n A desc option must always be given.\n" "Error: 'pdb' tag given for a non-'startstruct' option in the 'Data' tag of a Job tag.\nProblem encountered for job named 'firstjob'.\n" "Options given:\n" "\t(pdb, 1ten.pdb)\n" "Thrown from protocols::jd2::JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + bool flag = e.msg().find(expected_error) != std::string::npos; + if ( !flag ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT(flag); } } @@ -146,19 +147,20 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Failed to find a resource name or a pdb name reading a 'Data' tag in a Job tag. Either a 'resource_tag' or a 'pdb' option must be provided.\n" "Problem encountered for job named 'firstjob'.\n" "Options given:\n" "\t(desc, startstruct)\n" "Thrown from protocols::jd2::JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + bool flag = e.msg().find(expected_error) != std::string::npos; + if ( !flag ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT(flag); } } @@ -182,7 +184,7 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error: Both a 'resource_tag' and a 'pdb' tag were found for a 'Data' tag in the Job tag.\nProblem encountered for job named 'firstjob'.\n" "Options given:\n" @@ -190,12 +192,13 @@ public: "\t(pdb, 1ten.pdb)\n" "\t(resource_tag, 1ten_native)\n" "Thrown from protocols::jd2::JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + bool flag = e.msg().find(expected_error) != std::string::npos; + if ( !flag ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT(flag); } } @@ -220,19 +223,19 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error: 'pdb' tag given for a non-'startstruct' option in the 'Data' tag of a Job tag.\nProblem encountered for job named 'firstjob'.\n" "Options given:\n" "\t(desc, whatever)\n" "\t(pdb, 1ten.pdb)\n" "Thrown from protocols::jd2::JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -256,14 +259,14 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error: Job 'first' given without a 'startstruct'"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -288,7 +291,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cout << e.msg() << std::endl; TS_ASSERT( false ); } @@ -316,15 +319,15 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error converting value 'four' given for option 'packing:ex1:level' to an integer from within JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -348,7 +351,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cout << e.msg() << std::endl; TS_ASSERT( false ); } @@ -376,15 +379,15 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error converting value '0fge.3' given for option 'out:scorecut' to a floating point number from within JD2ResourceManagerJobInputter::parse_job_tag\n"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -408,7 +411,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); std::cout << e.msg() << std::endl; } @@ -436,16 +439,16 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error converting value 'true' given for option 'packing:ex1' to a boolean from within JD2ResourceManagerJobInputter::parse_job_tag\n" " Boolean options must be given either a '1' or a '0'"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -471,14 +474,14 @@ public: try { inputter.fill_jobs_from_stream( jobstream, jobvector ); TS_ASSERT( false ); // should throw an exception - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::string expected_error = "Error: Option key 'packing::ex1' not found. Please remember to use only one colon when giving options.\n"; - if ( e.msg() != expected_error ) { + if ( e.msg().find(expected_error) == std::string::npos ) { std::cout << "expected error: '" << expected_error << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -503,7 +506,7 @@ public: Jobs jobvector; try { inputter.fill_jobs_from_stream( jobstream, jobvector ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT( false ); // shouldn't throw an exception } diff --git a/source/test/protocols/jd2/JD2ResourceManagerJobInputterMultipleJobTags.cxxtest.hh b/source/test/protocols/jd2/JD2ResourceManagerJobInputterMultipleJobTags.cxxtest.hh index 673f133a98..c12ab896ab 100644 --- a/source/test/protocols/jd2/JD2ResourceManagerJobInputterMultipleJobTags.cxxtest.hh +++ b/source/test/protocols/jd2/JD2ResourceManagerJobInputterMultipleJobTags.cxxtest.hh @@ -77,8 +77,8 @@ public: " \n" " \n" " \n" - " \n" " \n" - " \n" + " \n" " \n" " \n" " \n" " \n" " \n" - " \n" "\n"; } @@ -143,7 +143,7 @@ public: try { a_inputter.fill_jobs_from_stream( a_jobstream, a_jobvector ); lazy_resource_manager->clear(); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "The following resource manager XML definitions file produced an exception:" << std::endl; std::cerr << "XML a:" << std::endl << a << std::endl; std::cerr << "Raised exception:" << std::endl << e.msg() << std::endl; @@ -158,7 +158,7 @@ public: try { b_inputter.fill_jobs_from_stream( b_jobstream, b_jobvector ); lazy_resource_manager->clear(); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "The following resource manager XML definitions file produced an exception:" << std::endl; std::cerr << "XML b:" << std::endl << b << std::endl; std::cerr << "Raised exception:" << std::endl << e.msg() << std::endl; @@ -225,7 +225,7 @@ public: try { b_inputter.fill_jobs_from_stream( b_jobstream, b_jobvector ); TS_ASSERT(false); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TS_ASSERT(true); } } diff --git a/source/test/protocols/jd2/JD2ResourceManagerJobInputterSimplifiedInput.cxxtest.hh b/source/test/protocols/jd2/JD2ResourceManagerJobInputterSimplifiedInput.cxxtest.hh index 17c4f9e50f..ad19046189 100644 --- a/source/test/protocols/jd2/JD2ResourceManagerJobInputterSimplifiedInput.cxxtest.hh +++ b/source/test/protocols/jd2/JD2ResourceManagerJobInputterSimplifiedInput.cxxtest.hh @@ -180,7 +180,7 @@ public: try { a_inputter.fill_jobs_from_stream( a_jobstream, a_jobvector ); lazy_resource_manager->clear(); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "The following resource manager XML definitions file produced an exception:" << std::endl; std::cerr << "XML a:" << std::endl << a << std::endl; std::cerr << "Raised exception:" << std::endl << e.msg() << std::endl; @@ -195,7 +195,7 @@ public: try { b_inputter.fill_jobs_from_stream( b_jobstream, b_jobvector ); lazy_resource_manager->clear(); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "The following resource manager XML definitions file produced an exception:" << std::endl; std::cerr << "XML b:" << std::endl << b << std::endl; std::cerr << "Raised exception:" << std::endl << e.msg() << std::endl; diff --git a/source/test/protocols/jd3/StandardJobQueen.cxxtest.hh b/source/test/protocols/jd3/StandardJobQueen.cxxtest.hh index a8cc7b2f17..74c52415c5 100644 --- a/source/test/protocols/jd3/StandardJobQueen.cxxtest.hh +++ b/source/test/protocols/jd3/StandardJobQueen.cxxtest.hh @@ -357,7 +357,7 @@ public: DummyJobQueen djq; try { djq.determine_preliminary_job_list_from_xml_file( jobdef_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg() << std::endl; TS_ASSERT( false ); } @@ -398,7 +398,7 @@ public: DummyJobQueen djq; try { djq.determine_preliminary_job_list_from_xml_file( jobdef_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg() << std::endl; TS_ASSERT( false ); } @@ -521,7 +521,7 @@ public: DummyJobQueen djq; try { djq.determine_preliminary_job_list_from_xml_file( jobdef_file ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/protocols/jd3/StandardJobQueenOverrideInputter.cxxtest.hh b/source/test/protocols/jd3/StandardJobQueenOverrideInputter.cxxtest.hh index 516eef1b3d..bcdf7bd5b3 100644 --- a/source/test/protocols/jd3/StandardJobQueenOverrideInputter.cxxtest.hh +++ b/source/test/protocols/jd3/StandardJobQueenOverrideInputter.cxxtest.hh @@ -322,9 +322,9 @@ public: // This should fail because PDB shouldn't be an acceptible input type djq2.determine_preliminary_job_list_from_xml_file( jobdef_file ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - std::string gold = "Job definition file failed to validate against the schema for this application\nUse the option -jd3::job_definition_schema to output the schema to a file.\nError messages were: From line 4:\nError: Element \'PDB\': This element is not expected. Expected is ( Dummy ).\n\n1: \n2: \n3: \n4: \n5: \n6: \n7: \n8: \n\nWarning messages were: \n"; - TS_ASSERT_EQUALS( e.msg(), gold ); + } catch (utility::excn::Exception const & e ) { + std::string expected_err_msg = "Job definition file failed to validate against the schema for this application\nUse the option -jd3::job_definition_schema to output the schema to a file.\nError messages were: From line 4:\nError: Element \'PDB\': This element is not expected. Expected is ( Dummy ).\n\n1: \n2: \n3: \n4: \n5: \n6: \n7: \n8: \n\nWarning messages were: \n"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } diff --git a/source/test/protocols/jd3/StandardJobQueenOverrideOutputter.cxxtest.hh b/source/test/protocols/jd3/StandardJobQueenOverrideOutputter.cxxtest.hh index 827d5faf63..8ed4f38d55 100644 --- a/source/test/protocols/jd3/StandardJobQueenOverrideOutputter.cxxtest.hh +++ b/source/test/protocols/jd3/StandardJobQueenOverrideOutputter.cxxtest.hh @@ -262,9 +262,9 @@ public: // This should fail because PDB shouldn't be an acceptible output type djq2.determine_preliminary_job_list_from_xml_file( jobdef_file ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - std::string gold = "Job definition file failed to validate against the schema for this application\nUse the option -jd3::job_definition_schema to output the schema to a file.\nError messages were: From line 7:\nError: Element \'PDB\': This element is not expected. Expected is ( Dummy ).\n\n 2: \n 3: \n 4: \n 5: \n 6: \n 7: \n 8: \n 9: \n10: \n11: \n\nWarning messages were: \n"; - TS_ASSERT_EQUALS( e.msg(), gold ); + } catch (utility::excn::Exception const & e ) { + std::string expected_err_msg = "Job definition file failed to validate against the schema for this application\nUse the option -jd3::job_definition_schema to output the schema to a file.\nError messages were: From line 7:\nError: Element \'PDB\': This element is not expected. Expected is ( Dummy ).\n\n 2: \n 3: \n 4: \n 5: \n 6: \n 7: \n 8: \n 9: \n10: \n11: \n\nWarning messages were: \n"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } diff --git a/source/test/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cxxtest.hh b/source/test/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cxxtest.hh index 8eaacd4b44..b27995a4c8 100644 --- a/source/test/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cxxtest.hh +++ b/source/test/protocols/jd3/job_distributors/MPIWorkPoolJobDistributor.cxxtest.hh @@ -288,9 +288,9 @@ public: run() override { CompletedJobOutput output = MoverAndPoseJob::run(); if ( throw_ ) { - throw utility::excn::EXCN_Msg_Exception( "PoolMnPJob2 exception" ); + throw CREATE_EXCEPTION(utility::excn::Exception, "PoolMnPJob2 exception" ); } else if ( throw_bad_inputs_ ) { - throw utility::excn::EXCN_BadInput( "PoolMnPJob2 bad input exception" ); + throw CREATE_EXCEPTION(utility::excn::BadInput, "PoolMnPJob2 bad input exception" ); } else { output.status = status_; } @@ -3204,9 +3204,10 @@ public: try { jd.go( jq3 ); TS_ASSERT( false ); // this should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Failed to retrieve job result (1, 1) which was requested from node 1 by node 2" - " but was not present there.\nJobDistributor on node 0 thinks the result should have been on node 1\n" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Failed to retrieve job result (1, 1) which was requested from node 1 by node 2" + " but was not present there.\nJobDistributor on node 0 thinks the result should have been on node 1"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif @@ -3322,9 +3323,10 @@ public: try { jd.go( jq3b ); TS_ASSERT( false ); // this should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Failed to retrieve job result (1, 1) which was requested from node 1 by node 3" - " but was not present there.\nThis job is not listed as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already.\n" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Failed to retrieve job result (1, 1) which was requested from node 1 by node 3" + " but was not present there.\nThis job is not listed as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already."; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif @@ -3449,9 +3451,10 @@ public: try { jd.go( jq3b ); TS_ASSERT( false ); // this should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Failed to retrieve job result (1, 1) which was requested from node 1 by node 3" - " but was not present there.\nThis job is not listed as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already.\n" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Failed to retrieve job result (1, 1) which was requested from node 1 by node 3" + " but was not present there.\nThis job is not listed as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already."; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif @@ -3535,11 +3538,11 @@ public: try { jd.go( jq3b ); TS_ASSERT( false ); // this should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Failed to retrieve job result (1, 1) which was requested from node 0 by node 1" + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Failed to retrieve job result (1, 1) which was requested from node 0 by node 1" " but was not present there.\nThis job is not listed" - " as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already.\n" ); - + " as still running nor as having its JobResult stored on any archive node; it perhaps has been output or discarded already."; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif } @@ -3567,10 +3570,10 @@ public: try { jd.go( jq3b ); TS_ASSERT( false ); // this should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Internal Error in the MPIWorkPoolJobDistributor: " - "received inappropriate signal on node 0 from node 1: " - + utility::to_string( mpi_work_pool_jd_spin_down ) ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Internal Error in the MPIWorkPoolJobDistributor: " + "received inappropriate signal on node 0 from node 1: " + utility::to_string( mpi_work_pool_jd_spin_down ); + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif } @@ -3709,7 +3712,7 @@ public: try { jd.go( jq ); TS_ASSERT( false ); // we should not reach here - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::ostringstream oss; oss << "Failed to serialize LarvalJob 1 because it holds an unserializable object. The following error message comes from the cereal library:\n" << "Trying to save an unregistered polymorphic type (Unserializable).\n" << @@ -3718,7 +3721,7 @@ public: "If your type is already registered and you still see this error, you may need to use CEREAL_REGISTER_DYNAMIC_INIT."; //std::cout << "Caught exception\n" << e.msg() << "----\n"; - TS_ASSERT_EQUALS( e.msg(), oss.str() ); + TS_ASSERT( e.msg().find(oss.str()) != std::string::npos ); } #endif @@ -4007,10 +4010,11 @@ public: try { jd.go( jq ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cerr << e.msg() << std::endl; - TS_ASSERT_EQUALS( e.msg(), "Failed to deserialize the JobSummary array for job #1\nError message from" - " the cereal library:\nPoolJobSummary2 could not be deserialized\n" ); + std::string expected_err_msg = "Failed to deserialize the JobSummary array for job #1\nError message from" + " the cereal library:\nPoolJobSummary2 could not be deserialized"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif @@ -4071,10 +4075,11 @@ public: try { jd.go( jq ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cerr << e.msg() << std::endl; - TS_ASSERT_EQUALS( e.msg(), "Failed to deserialize LarvalJob & JobResult pair for job #1 result index #1\nError message from" - " the cereal library:\nUndeserializable could not be deserialized\n" ); + std::string expected_err_msg = "Failed to deserialize LarvalJob & JobResult pair for job #1 result index #1\nError message from" + " the cereal library:\nUndeserializable could not be deserialized"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } #endif diff --git a/source/test/protocols/loop_modeling/LoopModelerTests.cxxtest.hh b/source/test/protocols/loop_modeling/LoopModelerTests.cxxtest.hh index a42cd88c59..688da97e62 100644 --- a/source/test/protocols/loop_modeling/LoopModelerTests.cxxtest.hh +++ b/source/test/protocols/loop_modeling/LoopModelerTests.cxxtest.hh @@ -58,7 +58,7 @@ using namespace protocols::loop_modeler; using namespace protocols::rosetta_scripts; using core::import_pose::pose_from_file; -using utility::excn::EXCN_Msg_Exception; +using utility::excn::Exception; // Brainstorming {{{1 // Look at the TaskOperationRegistrator class to see how to register KIC @@ -464,7 +464,7 @@ public: // Case 3: Illegal value. tag = " "; - TS_ASSERT_THROWS(parse_tag(tag), EXCN_Msg_Exception); + TS_ASSERT_THROWS(parse_tag(tag), Exception); } void test_custom_movers() { // {{{1 @@ -510,7 +510,7 @@ public: // Can only use LoopMover subclasses within LoopModeler, not regular // Movers. - TS_ASSERT_THROWS(parse_tag(tag), EXCN_Msg_Exception); + TS_ASSERT_THROWS(parse_tag(tag), Exception); } void test_custom_centroid_movers() { // {{{1 diff --git a/source/test/protocols/loops/LoopsFileFallbackConfiguration.cxxtest.hh b/source/test/protocols/loops/LoopsFileFallbackConfiguration.cxxtest.hh index 33d73983d6..e995ff8e8b 100644 --- a/source/test/protocols/loops/LoopsFileFallbackConfiguration.cxxtest.hh +++ b/source/test/protocols/loops/LoopsFileFallbackConfiguration.cxxtest.hh @@ -57,9 +57,9 @@ public: FallbackConfigurationOP fallback = FallbackConfigurationFactory::get_instance()->create_fallback_configuration( "LoopsFile" ); std::string loopfilename = fallback->get_locator_id("LoopsFile" ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "The fallback LoopsFile resource option has no loops files associated with it! Was the option omitted from the command line?"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } basic::options::option[ basic::options::OptionKeys::loops::loop_file ].def( loop_filename ); diff --git a/source/test/protocols/loops/closers/CCDLoopClosureMover.cxxtest.hh b/source/test/protocols/loops/closers/CCDLoopClosureMover.cxxtest.hh index fbcc66c3f3..78edd9c8d1 100644 --- a/source/test/protocols/loops/closers/CCDLoopClosureMover.cxxtest.hh +++ b/source/test/protocols/loops/closers/CCDLoopClosureMover.cxxtest.hh @@ -38,7 +38,7 @@ #include // Utility header -#include +#include #include // C++ header @@ -210,7 +210,7 @@ public: set_throw_on_next_assertion_failure(); mover.max_per_move_torsion_delta_per_residue( 'w' ); TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { // We get a PyAssert in debug mode, and a regular message exception in release mode // These have different formats -- just check for contents we need TR << "Error message is:\n"; @@ -225,7 +225,7 @@ public: set_throw_on_next_assertion_failure(); mover.max_total_torsion_delta_per_residue( '!' ); TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { // We get a PyAssert in debug mode, and a regular message exception in release mode // These have different formats -- just check for contents we need TR << "Error message is:\n"; @@ -253,9 +253,10 @@ public: set_throw_on_next_assertion_failure(); mover.apply( pose ); TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_BadInput const & e ) { - TS_ASSERT_EQUALS( e.msg(), "CCDLoopClosureMover::get_anchors( core::conformation::Residue const & residue ): " - "Residue is not a cutpoint variant! You must add cutpoint variants before applying this Mover." ); + } catch (utility::excn::BadInput const & e ) { + std::string expected_err_msg = "CCDLoopClosureMover::get_anchors( core::conformation::Residue const & residue ): " + "Residue is not a cutpoint variant! You must add cutpoint variants before applying this Mover." ; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } TR << "------------ The previous error message was expected -------------" << std::endl; diff --git a/source/test/protocols/membrane/MembraneUtil.cxxtest.hh b/source/test/protocols/membrane/MembraneUtil.cxxtest.hh index 70e26ce39d..d9144ec974 100644 --- a/source/test/protocols/membrane/MembraneUtil.cxxtest.hh +++ b/source/test/protocols/membrane/MembraneUtil.cxxtest.hh @@ -617,9 +617,9 @@ public: // test functions // check for validity try { check_vector( v1 ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Unreasonable range for center or normal! Check your input vectors!"; - TS_ASSERT( expected_error_message == e.msg() ); + TS_ASSERT( e.msg().find(expected_error_message) != std::string::npos ); } } diff --git a/source/test/protocols/pack_daemon/DynamicAggregateFunction.cxxtest.hh b/source/test/protocols/pack_daemon/DynamicAggregateFunction.cxxtest.hh index 5d48f75350..b1c5193c62 100644 --- a/source/test/protocols/pack_daemon/DynamicAggregateFunction.cxxtest.hh +++ b/source/test/protocols/pack_daemon/DynamicAggregateFunction.cxxtest.hh @@ -132,10 +132,11 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Expected to read secondary resfile name in the DynamicAggregateFunction input file after reading STATE correspondence file on line 1\nSTATE trpcage 1l2y.pdb 1l2y.correspondence.txt"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT(flag); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -161,10 +162,11 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Expected to read secondary resfile name in the DynamicAggregateFunction input file after reading STATE correspondence file on line 1\nSTATE trpcage 1l2y.pdb"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT(flag); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -190,13 +192,14 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read pdb file name in the DynamicAggregateFunction input file after reading STATE pdb file on line 1\n" "STATE trpcage"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT(flag); + if (!flag) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -222,11 +225,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read secondary resfile name in the DynamicAggregateFunction input file after reading STATE correspondence file on line 1\nSTATE trpcage 1l2y.pdb 1l2y.correspondence.txt"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -252,11 +256,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read secondary resfile name in the DynamicAggregateFunction input file after reading STATE correspondence file on line 1\nSTATE trpcage 1l2y.pdb"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -282,13 +287,14 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read pdb file name in the DynamicAggregateFunction input file after reading STATE pdb file on line 1\n" "STATE trpcage"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -314,12 +320,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_command_varname_bad" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "Illegal name for variable, 'max' in the STATE command on line 1\nSTATE max 1l2y.pdb 1l2y.correspondence.txt 1l2y.secondary.resfile"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -345,15 +352,16 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_command_varname_function_name" << std::endl; //std::cout << e.msg() << std::endl; //std::string expected_error_message = "Declaration of variable 'pow' in STATE conflicts with a function name. Line 1\nSTATE pow 1l2y.pdb 1l2y.correspondence.txt 1l2y.secondary.resfile"; std::string expected_error_message = "Declaration of variable 'pow' in STATE command conflicts with a function name. Line 1\n" "STATE pow 1l2y.pdb 1l2y.correspondence.txt 1l2y.secondary.resfile"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -379,7 +387,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_command_varname_duplicated" << std::endl; //std::cout << e.msg() << std::endl << std::endl; //std::string expected_error_message = "Variable name trpcage appears multiple times in the DynamicAggregateFunction file.\nFirst occurrance was found on line 1. Second occurrance found while reading STATE command\nSTATE trpcage 1l2y.pdb 1l2y.correspondence.txt 1l2y.secondary.resfile\nLine # 2"; @@ -388,8 +396,9 @@ public: "Second occurrance found while reading a STATE command\n" "STATE trpcage 1l2y.pdb 1l2y.correspondence.txt 1l2y.secondary.resfile\n" "Line # 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -416,7 +425,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg(); TS_ASSERT( false ); } @@ -441,11 +450,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read state-vector file name in the DynamicAggregateFunction input file after reading STATE_VECTOR variable name on line 1\nSTATE_VECTOR trpcage"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -470,11 +480,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read state-vector variable name in the DynamicAggregateFunction input file after reading STATE_VECTOR on line 1\nSTATE_VECTOR"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -499,11 +510,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read state-vector file name in the DynamicAggregateFunction input file after reading STATE_VECTOR variable name on line 1\nSTATE_VECTOR trpcage"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -528,11 +540,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read state-vector variable name in the DynamicAggregateFunction input file after reading STATE_VECTOR on line 1\nSTATE_VECTOR"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -557,12 +570,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_VECTOR_command_illegal_varname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "Illegal name for variable, 'min' in the STATE_VECTOR command on line 1\nSTATE_VECTOR min trpcage.list"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -587,14 +601,15 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_VECTOR_command_function_varname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = //"Declaration of variable 'sqrt' in STATE_VECTOR conflicts with a function name. Line 1\nSTATE_VECTOR sqrt trpcage.list"; "Declaration of variable 'sqrt' in STATE_VECTOR command conflicts with a function name. Line 1\n" "STATE_VECTOR sqrt trpcage.list"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -619,7 +634,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_STATE_VECTOR_command_duplicate_varname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = //"Variable name trpcage appears multiple times in the DynamicAggregateFunction file.\nFirst occurrance was found on line 1. Second occurrance found while reading STATE_VECTOR command\nSTATE_VECTOR trpcage trpcage.list\nLine # 2"; @@ -627,8 +642,9 @@ public: "Second occurrance found while reading a STATE_VECTOR command\n" "STATE_VECTOR trpcage trpcage.list\n" "Line # 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } @@ -674,7 +690,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << "Caught exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -713,7 +729,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << "Caught exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -763,7 +779,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg(); TS_ASSERT( false ); } @@ -788,7 +804,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg(); TS_ASSERT( false ); } @@ -813,7 +829,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg(); TS_ASSERT( false ); } @@ -838,12 +854,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_VECTOR_EXPRESSION_command_two_local_variables_misplaced_comma" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "The vector-variable name 'trpcage1,' given for local-variable 'x' does not belong to an already-declared vector variable. Error in the VECTOR_EXPRESSION command on line 3\nVECTOR_EXPRESSION FOR x IN trpcage1, y IN trpcage2 : trpcage_plus_2 = x + y + 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -869,11 +886,12 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read 'IN' in the DynamicAggregateFunction input file following the declaration of local variable 'x', but read 'in' in the VECTOR_EXPRESSION command on line 2\nVECTOR_EXPRESSION FOR x in trpcage : trpcage_plus_2 = x + 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -898,12 +916,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_VECTOR_EXPRESSION_command_duplicated_local_varname()" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "Local variable, 'x' in VECTOR_EXPRESSION command appears multiple times on line 3\nVECTOR_EXPRESSION FOR x IN trpcage , x IN trpcage2 : trpcage_plus_2 = x + 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -928,7 +947,7 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( true ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cout << e.msg(); TS_ASSERT( false ); } @@ -953,12 +972,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_VECTOR_VARIABLE_command_bad_varname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "Unknown variable 'trpcage3' requested in the VECTOR_VARIABLE command on line 3\nVECTOR_VARIABLE trpcage_v = trpcage1 trpcage3"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -983,12 +1003,13 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_VECTOR_VARIABLE_command_bad_vecvarname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = "Illegal name for variable, 'min' in the VECTOR_VARIABLE command on line 3\nVECTOR_VARIABLE min = trpcage1 trpcage2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1017,14 +1038,15 @@ public: try { daf->initialize_from_input_file( ds, iss ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_daf_VECTOR_VARIABLE_command_func_vecvarname" << std::endl; //std::cout << e.msg() << std::endl; std::string expected_error_message = //"Declaration of variable 'exp' in VECTOR_VARIABLE conflicts with a function name. Line 3\nVECTOR_VARIABLE exp = trpcage1 trpcage2"; "Declaration of variable 'exp' in VECTOR_VARIABLE command conflicts with a function name. Line 3\n" "VECTOR_VARIABLE exp = trpcage1 trpcage2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1065,14 +1087,15 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read comma or a right curly brace, but found 'e'.\n" "Error encountered while reading AA_SET command\n" "AA_SET polar = { d e,h,k,n,q,r,s,t}\n" "Line # 1"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1086,15 +1109,20 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); - TS_ASSERT( - "Expected to read an equals sign after reading amino-acid-set name'polar' but found '{'\n" + std::string expected_error_message = + "Expected to read an equals sign after reading amino-acid-set name'polar' but found '{'\n" "Error encountered while reading AA_SET command\n" "AA_SET polar { d, e,h,k,n,q,r,s,t}\n" - "Line # 1" == e.msg() ); - } + "Line # 1"; + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { + std::cout << "Actual error message\n\n" << e.msg() << std::endl; + } + } } void test_EntityFunc_AA_SET_command_missing_right_curly_brace() { @@ -1104,15 +1132,16 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read a right curly bracket ('}') or a 1-letter amino acid code, but found an end-of-line.\n" "Error encountered while reading AA_SET command\n" "AA_SET polar = { d, e,h,k,n,q,r,s,t\n" "Line # 1"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1164,13 +1193,14 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::string expected_error_message = "Amino-acid-set name 'ppolar' has not previously been declared.\n" "Error encountered while reading SET_CONDITION command\n" "SET_CONDITION pol1 = ee_1 in ppolar\n" "Line # 2"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1186,14 +1216,15 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Expected to read comma or a right curly brace, but found 'e'.\n" "Error encountered while reading SET_CONDITION command\n" "SET_CONDITION pol1 = ee_1 in { d e,h,k,n,q,r,s,t}\n" "Line # 1"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1206,14 +1237,15 @@ public: std::istringstream iss( efuncfile ); try { entfunc.initialize_from_input_file( iss ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << e.msg(); std::string expected_error_message = "Amino-acid-set name 'd,' has not previously been declared.\n" "Error encountered while reading SET_CONDITION command\n" "SET_CONDITION pol1 = ee_1 in d, e,h,k,n,q,r,s,t}\n" "Line # 1"; - TS_ASSERT( expected_error_message == e.msg() ); - if ( expected_error_message != e.msg() ) { + bool flag = e.msg().find(expected_error_message) != std::string::npos; + TS_ASSERT( flag ); + if ( !flag ) { std::cout << "Actual error message\n\n" << e.msg() << std::endl; } } @@ -1237,5 +1269,3 @@ public: TS_ASSERT( score == -6.0 ); } }; - - diff --git a/source/test/protocols/pack_daemon/EntityCorrespondence.cxxtest.hh b/source/test/protocols/pack_daemon/EntityCorrespondence.cxxtest.hh index 070ee424a0..b21a411c78 100644 --- a/source/test/protocols/pack_daemon/EntityCorrespondence.cxxtest.hh +++ b/source/test/protocols/pack_daemon/EntityCorrespondence.cxxtest.hh @@ -113,9 +113,10 @@ public: try { corr.n_residues_for_entity( 3 ); TS_ASSERT( false ); // should never reach here. - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - TS_ASSERT( excn.msg() == "EntityCorrespondence::n_residues_for_entity attempted to access information for entity 3 (only 2 entities exist)" ); + std::string expected_err_msg = "EntityCorrespondence::n_residues_for_entity attempted to access information for entity 3 (only 2 entities exist)"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -125,9 +126,10 @@ public: try { corr.entity_for_residue( 21 ); TS_ASSERT( false ); // should never reach here. - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - TS_ASSERT( excn.msg() == "EntityCorrespondence::entity_for_residue attempted to access information for residue 21 (only 20 residues exist)" ); + std::string expected_err_msg = "EntityCorrespondence::entity_for_residue attempted to access information for residue 21 (only 20 residues exist)"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -144,7 +146,7 @@ public: try { corr.initialize_from_correspondence_file( corr_stream ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { std::cout << excn.msg() << std::endl; TS_ASSERT( false ); } @@ -193,7 +195,7 @@ public: try { corr.initialize_from_correspondence_file( corr_stream ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { std::cout << excn.msg() << std::endl; TS_ASSERT( false ); } @@ -243,9 +245,10 @@ public: try { corr.initialize_from_correspondence_file( corr_stream ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - TS_ASSERT( excn.msg() == "Failed to read entity id on line 1 of the EntityCorrespondence file:\none 10" ); + std::string expected_err_msg = "Failed to read entity id on line 1 of the EntityCorrespondence file:\none 10"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -263,10 +266,10 @@ public: try { corr.initialize_from_correspondence_file( corr_stream ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - //TS_ASSERT( excn.msg() == "Failed to read residue id on line 1 of the EntityCorrespondence file:\n1 ten" ); - TS_ASSERT( excn.msg() == "Failed to read PDB residue id on line 1 of the EntityCorrespondence file:\n1 ten A\nCharacter1 of 'ten' is not a digit"); + std::string expected_err_msg = "Failed to read PDB residue id on line 1 of the EntityCorrespondence file:\n1 ten A\nCharacter1 of 'ten' is not a digit"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -280,13 +283,13 @@ public: std::string corr_file( "3 10 A\n1 11 A\n2 12 A\n" ); std::istringstream corr_stream( corr_file ); - try { corr.initialize_from_correspondence_file( corr_stream ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - TS_ASSERT( excn.msg() == "Entity ID read on line 1 of the EntityCorrespondence file exceeds the number of entities: 3 vs 2" ); + std::string expected_err_msg = "Entity ID read on line 1 of the EntityCorrespondence file exceeds the number of entities: 3 vs 2"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -304,14 +307,13 @@ public: try { corr.initialize_from_correspondence_file( corr_stream ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; //TS_ASSERT( excn.msg() == "Residue ID read on line 1 of the EntityCorrespondence file exceeds the number of residues: 21 vs 20" ); - TS_ASSERT( excn.msg() == "Residue ID read on line 1 of the EntityCorrespondence file is not present in the pose: 21 ch: A vs pose.size()= 20"); + std::string expected_err_msg = "Residue ID read on line 1 of the EntityCorrespondence file is not present in the pose: 21 ch: A vs pose.size()= 20"; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } }; - - diff --git a/source/test/protocols/pack_daemon/PackDaemon.cxxtest.hh b/source/test/protocols/pack_daemon/PackDaemon.cxxtest.hh index 68ff16959f..d819d64be8 100644 --- a/source/test/protocols/pack_daemon/PackDaemon.cxxtest.hh +++ b/source/test/protocols/pack_daemon/PackDaemon.cxxtest.hh @@ -240,9 +240,10 @@ public: try { ds.compute_energy_for_assignment( bad_ent ); TS_ASSERT( false ); /// This should not be reached. - } catch ( utility::excn::EXCN_Msg_Exception & excn ) { + } catch (utility::excn::Exception & excn ) { //std::cout << excn.msg() << std::endl; - TS_ASSERT( excn.msg() == "Failed to find any rotamers for residue 6 corresponding to entity 2 when looking for ARG rotamers." ); + std::string expected_err_msg = "Failed to find any rotamers for residue 6 corresponding to entity 2 when looking for ARG rotamers."; + TS_ASSERT( excn.msg().find(expected_err_msg) != std::string::npos ); } } @@ -542,5 +543,3 @@ public: }; - - diff --git a/source/test/protocols/peptide_deriver/PeptideDeriverFilterTests.cxxtest.hh b/source/test/protocols/peptide_deriver/PeptideDeriverFilterTests.cxxtest.hh index e4fe1ca679..f06ceaa72b 100644 --- a/source/test/protocols/peptide_deriver/PeptideDeriverFilterTests.cxxtest.hh +++ b/source/test/protocols/peptide_deriver/PeptideDeriverFilterTests.cxxtest.hh @@ -192,7 +192,7 @@ public: TS_ASSERT_EQUALS(filter.get_restrict_partners_to_chains()[1], 'B'); TS_ASSERT_EQUALS(filter.get_restrict_partners_to_chains()[2], 'C'); } -catch ( utility::excn::EXCN_Msg_Exception e ) { +catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -222,7 +222,7 @@ catch ( utility::excn::EXCN_Msg_Exception e ) { void test_report_format_parsing() { TS_ASSERT_EQUALS(protocols::peptide_deriver::PeptideDeriverFilter::parse_report_format_string("basic"), protocols::peptide_deriver::PRF_BASIC); TS_ASSERT_EQUALS(protocols::peptide_deriver::PeptideDeriverFilter::parse_report_format_string("markdown"), protocols::peptide_deriver::PRF_MARKDOWN); - TS_ASSERT_THROWS(protocols::peptide_deriver::PeptideDeriverFilter::parse_report_format_string(""), utility::excn::EXCN_KeyError); + TS_ASSERT_THROWS(protocols::peptide_deriver::PeptideDeriverFilter::parse_report_format_string(""), utility::excn::KeyError); } void assert_peptiderive_filter_equal( protocols::peptide_deriver::PeptideDeriverFilter const & lhs, diff --git a/source/test/protocols/qsar/scoring_grid/ScoreNormalization.cxxtest.hh b/source/test/protocols/qsar/scoring_grid/ScoreNormalization.cxxtest.hh index fd23ec8990..86e749e3eb 100644 --- a/source/test/protocols/qsar/scoring_grid/ScoreNormalization.cxxtest.hh +++ b/source/test/protocols/qsar/scoring_grid/ScoreNormalization.cxxtest.hh @@ -57,7 +57,7 @@ public: normalization_class = protocols::qsar::scoring_grid::get_score_normalization_function("NonExistantNormalization"); TS_ASSERT(false); // last line ought to throw an exception - }catch(utility::excn::EXCN_RosettaScriptsOption const &) + }catch (utility::excn::RosettaScriptsOptionError const &) { TS_ASSERT(true); } diff --git a/source/test/protocols/residue_selectors/HBondSelector.cxxtest.hh b/source/test/protocols/residue_selectors/HBondSelector.cxxtest.hh index 640e10b670..eeaae00bb1 100644 --- a/source/test/protocols/residue_selectors/HBondSelector.cxxtest.hh +++ b/source/test/protocols/residue_selectors/HBondSelector.cxxtest.hh @@ -87,7 +87,7 @@ public: std::stringstream ss_two_selectors; ss_two_selectors << ""; tag->read( ss_two_selectors ); - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_Msg_Exception ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::Exception ); std::stringstream ssgood_resnums; ssgood_resnums << ""; diff --git a/source/test/protocols/residue_selectors/TaskSelector.cxxtest.hh b/source/test/protocols/residue_selectors/TaskSelector.cxxtest.hh index cd3ed30271..0c2779e8d5 100644 --- a/source/test/protocols/residue_selectors/TaskSelector.cxxtest.hh +++ b/source/test/protocols/residue_selectors/TaskSelector.cxxtest.hh @@ -59,12 +59,12 @@ public: basic::datacache::DataMap dm; TaskSelectorOP rs( new TaskSelector ); - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::RosettaScriptsOptionError ); std::stringstream ssgood; ssgood << ""; tag->read( ssgood ); - TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::EXCN_RosettaScriptsOption ); + TS_ASSERT_THROWS( rs->parse_my_tag( tag, dm ), utility::excn::RosettaScriptsOptionError ); protocols::toolbox::task_operations::DesignAroundOperationOP des_around( new protocols::toolbox::task_operations::DesignAroundOperation ); des_around->include_residue( 2 ); diff --git a/source/test/protocols/rosetta_scripts/MultiplePoseMover.cxxtest.hh b/source/test/protocols/rosetta_scripts/MultiplePoseMover.cxxtest.hh index c7589abead..3c25cfe318 100644 --- a/source/test/protocols/rosetta_scripts/MultiplePoseMover.cxxtest.hh +++ b/source/test/protocols/rosetta_scripts/MultiplePoseMover.cxxtest.hh @@ -233,7 +233,7 @@ public: TS_ASSERT( tag3->getParent().lock() == tag2 ); TS_ASSERT( tag1->getParent().expired() ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -278,7 +278,7 @@ public: try { RosettaScriptsParser parser; MoverOP mover = parser.parse_protocol_tag( script_tags, basic::options::option ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -335,7 +335,7 @@ public: try { RosettaScriptsParser parser; MoverOP mover = parser.parse_protocol_tag( script_tags, basic::options::option ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -375,7 +375,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT_EQUALS( i, 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -414,7 +414,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT_EQUALS( i, 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -464,7 +464,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT( i == 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -520,7 +520,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT( i == 3 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -581,7 +581,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT( i == 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -635,7 +635,7 @@ public: while ( mover->get_additional_output() ) ++i; TS_ASSERT( i == 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -689,7 +689,7 @@ public: TR << "i = " << i << std::endl; TS_ASSERT( i == 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -731,14 +731,14 @@ public: try { RosettaScriptsParser parser; MoverOP mover = parser.parse_protocol_tag( script_tags, basic::options::option ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_error = "Exception in MultiplePoseMover with name \"mpm\": Failed to import mover2 from MOVERS"; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -773,14 +773,14 @@ public: try { RosettaScriptsParser parser; MoverOP mover = parser.parse_protocol_tag( script_tags, basic::options::option ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_error = "Exception in MultiplePoseMover with name \"mpm\": Cannot import mover mpm into itself; recursion detected"; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -830,14 +830,14 @@ public: try { RosettaScriptsParser parser; MoverOP mover = parser.parse_protocol_tag( script_tags, basic::options::option ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_error = "Exception in MultiplePoseMover with name \"mpm\": Failed to import filter3 from FILTERS"; if ( e.msg() != expected_error ) { std::cout << e.msg() << std::endl; std::cout << expected_error << std::endl; } - TS_ASSERT( e.msg() == expected_error ); + TS_ASSERT( e.msg().find(expected_error) != std::string::npos ); } } @@ -921,7 +921,7 @@ public: TS_ASSERT( i == 5 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -1015,7 +1015,7 @@ public: TS_ASSERT( i == 50 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception:: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -1099,7 +1099,7 @@ public: TS_ASSERT( i == 30 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception:: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -1168,7 +1168,7 @@ public: TS_ASSERT( unique_poses == 1 ); TS_ASSERT( total_poses == 10 ); - } catch ( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { std::cerr << "Raised exception:: " << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/protocols/rosetta_scripts/RosettaScriptsParser.cxxtest.hh b/source/test/protocols/rosetta_scripts/RosettaScriptsParser.cxxtest.hh index 62e69c2cf2..5126523817 100644 --- a/source/test/protocols/rosetta_scripts/RosettaScriptsParser.cxxtest.hh +++ b/source/test/protocols/rosetta_scripts/RosettaScriptsParser.cxxtest.hh @@ -67,7 +67,7 @@ public: TR << "===THIS SHOULD NOT TRIGGER AN EXCEPTION===" << std::endl; std::string substituted_contents; parser.read_in_and_recursively_replace_includes( "protocols/rosetta_scripts/permitted1.xml", substituted_contents, files_read_in, 0 ); - } catch( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TR << "CAUGHT EXCEPTION [" << e.msg() << "]" << std::endl; TS_ASSERT(false); //We shouldn't get here. } @@ -85,10 +85,12 @@ public: TR << "===THIS SHOULD TRIGGER AN EXCEPTION===" << std::endl; std::string substituted_contents; parser.read_in_and_recursively_replace_includes( "protocols/rosetta_scripts/prohibited1.xml", substituted_contents, files_read_in, 0 ); - } catch( utility::excn::EXCN_Msg_Exception e ) { + } catch (utility::excn::Exception e ) { TR << "CAUGHT EXCEPTION [" << e.msg() << "]" << std::endl; TR << "===THE ABOVE SHOULD HAVE TRIGGERED AN EXCEPTION===" << std::endl; - TS_ASSERT( e.msg() == "Error in protocols::rosetta_scipts::RosettaScriptsParser::read_in_and_recursively_replace_includes(): Circular inclusion pattern detected when reading \"protocols/rosetta_scripts/prohibited1.xml\"."); + + std::string expected_err_msg = "Error in protocols::rosetta_scipts::RosettaScriptsParser::read_in_and_recursively_replace_includes(): Circular inclusion pattern detected when reading \"protocols/rosetta_scripts/prohibited1.xml\"."; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); return; } TR << "Error in RosettaScriptsParserTests::test_prohibit_circular_dependencies(): an exception should have been thrown by the circular dependencies, but wasn't." << std::endl; diff --git a/source/test/protocols/rosetta_scripts/XmlObjects.cxxtest.hh b/source/test/protocols/rosetta_scripts/XmlObjects.cxxtest.hh index b85a953941..888358dd54 100644 --- a/source/test/protocols/rosetta_scripts/XmlObjects.cxxtest.hh +++ b/source/test/protocols/rosetta_scripts/XmlObjects.cxxtest.hh @@ -82,7 +82,7 @@ public: TR << "Getting ScoreFunction" << std::endl; try { core::scoring::ScoreFunctionOP scorefxn = objs->get_score_function("scorefxn"); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -92,7 +92,7 @@ public: protocols::filters::FilterOP filter = objs->get_filter("true"); protocols::simple_filters::PoseCommentOP casted = std::dynamic_pointer_cast< protocols::simple_filters::PoseComment >( filter ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -102,7 +102,7 @@ public: protocols::moves::MoverOP mover = objs->get_mover("min_mover"); protocols::simple_moves::MinMoverOP casted = std::dynamic_pointer_cast< protocols::simple_moves::MinMover >( mover ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -112,7 +112,7 @@ public: core::pack::task::operation::TaskOperationOP taskop = objs->get_task_operation("prevent_repacking"); core::pack::task::operation::PreventRepackingOP casted = std::dynamic_pointer_cast< core::pack::task::operation::PreventRepacking >( taskop ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -122,7 +122,7 @@ public: core::select::residue_selector::ResidueSelectorOP selector = objs->get_residue_selector("true_sel"); core::select::residue_selector::TrueResidueSelectorOP casted = std::dynamic_pointer_cast< core::select::residue_selector::TrueResidueSelector >( selector ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -141,14 +141,14 @@ public: try { core::scoring::ScoreFunctionOP scorefxn = XmlObjects::static_get_score_function( "\n"); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } try { core::scoring::ScoreFunctionOP scorefxn = XmlObjects::static_get_score_function( "\n"); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -159,7 +159,7 @@ public: "\n"); protocols::simple_filters::PoseCommentOP casted = std::dynamic_pointer_cast< protocols::simple_filters::PoseComment >( filter ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -168,7 +168,7 @@ public: "\n"); protocols::simple_filters::PoseCommentOP casted = std::dynamic_pointer_cast< protocols::simple_filters::PoseComment >( filter ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -179,7 +179,7 @@ public: "\n"); protocols::simple_moves::MinMoverOP casted = std::dynamic_pointer_cast< protocols::simple_moves::MinMover >( mover ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -188,7 +188,7 @@ public: "\n"); protocols::simple_moves::MinMoverOP casted = std::dynamic_pointer_cast< protocols::simple_moves::MinMover >( mover ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -199,7 +199,7 @@ public: "\n"); core::pack::task::operation::PreventRepackingOP casted = std::dynamic_pointer_cast< core::pack::task::operation::PreventRepacking >( taskop ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -208,7 +208,7 @@ public: "\n"); core::pack::task::operation::PreventRepackingOP casted = std::dynamic_pointer_cast< core::pack::task::operation::PreventRepacking >( taskop ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -219,7 +219,7 @@ public: "\n"); core::select::residue_selector::TrueResidueSelectorOP casted = std::dynamic_pointer_cast< core::select::residue_selector::TrueResidueSelector >( selector ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -228,7 +228,7 @@ public: "\n"); core::select::residue_selector::TrueResidueSelectorOP casted = std::dynamic_pointer_cast< core::select::residue_selector::TrueResidueSelector >( selector ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -247,7 +247,7 @@ public: core::select::residue_selector::ResidueSelectorOP selector = objs->get_residue_selector( "posPhi" ); core::select::residue_selector::PhiSelectorOP casted = std::dynamic_pointer_cast< core::select::residue_selector::PhiSelector >( selector ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -267,7 +267,7 @@ public: core::select::residue_selector::ResidueSelectorOP selector = objs->get_residue_selector( "posPhi" ); core::select::residue_selector::PhiSelectorOP casted = std::dynamic_pointer_cast< core::select::residue_selector::PhiSelector >( selector ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } @@ -289,7 +289,7 @@ public: protocols::moves::MoverOP mover = objs->get_mover( "ParsedProtocol" ); protocols::rosetta_scripts::ParsedProtocolOP casted = std::dynamic_pointer_cast< protocols::rosetta_scripts::ParsedProtocol >( mover ); (void)casted; - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { TR << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/protocols/simple_moves/DisulfideInsertionMoverTests.cxxtest.hh b/source/test/protocols/simple_moves/DisulfideInsertionMoverTests.cxxtest.hh index 5245a47c95..64237b3a7e 100644 --- a/source/test/protocols/simple_moves/DisulfideInsertionMoverTests.cxxtest.hh +++ b/source/test/protocols/simple_moves/DisulfideInsertionMoverTests.cxxtest.hh @@ -75,7 +75,7 @@ public: protocols::simple_moves::DisulfideCyclizationViability existing_disulfide_maintained (inserter_edges_->determine_cyclization_viability(*test_shorter_pose_, N_TER, C_TER-1)); TS_ASSERT_EQUALS(existing_disulfide_maintained, protocols::simple_moves::DCV_ALREADY_CYCLIZED); } -catch ( utility::excn::EXCN_Msg_Exception e ) { +catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -91,7 +91,7 @@ catch ( utility::excn::EXCN_Msg_Exception e ) { inserter_edges_->apply(*test_shorter_pose_); TS_ASSERT_EQUALS(inserter_edges_->get_last_move_status(), protocols::moves::MS_SUCCESS); } -catch ( utility::excn::EXCN_Msg_Exception e ) { +catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -124,7 +124,7 @@ catch ( utility::excn::EXCN_Msg_Exception e ) { TS_ASSERT_DELTA(mover->get_constraint_weight(), 0.1, 1e-6); } -catch ( utility::excn::EXCN_Msg_Exception e ) { +catch (utility::excn::Exception e ) { std::cerr << "Raised exception: " << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/protocols/simple_moves/FAVirtMoverTests.cxxtest.hh b/source/test/protocols/simple_moves/FAVirtMoverTests.cxxtest.hh index 0c7907671f..5a581ab065 100644 --- a/source/test/protocols/simple_moves/FAVirtMoverTests.cxxtest.hh +++ b/source/test/protocols/simple_moves/FAVirtMoverTests.cxxtest.hh @@ -64,7 +64,7 @@ public: #endif pose_from_file( pose, "protocols/carbohydrates/N-linked_14-mer_glycan.pdb" , core::import_pose::PDB_file); #ifdef MULTI_THREADED - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -98,7 +98,7 @@ public: #endif pose_from_file( pose, "protocols/carbohydrates/N-linked_14-mer_glycan.pdb" , core::import_pose::PDB_file); #ifdef MULTI_THREADED - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); @@ -139,7 +139,7 @@ public: #endif pose_from_file( pose, "protocols/carbohydrates/N-linked_14-mer_glycan.pdb" , core::import_pose::PDB_file); #ifdef MULTI_THREADED - } catch( utility::excn::EXCN_Base& excn ) { + } catch (utility::excn::Exception& excn ) { TR << excn.msg() << std::endl; std::string expected( "ERROR: Error in ScoringManager: the carbohydrate CHIEnergyFunction is fundamentally not threadsafe, and cannot be used in a multithreaded environment. Please contact Jason Labonte (JWLabonte@jhu.edu) to complain about this." ); TS_ASSERT_EQUALS( excn.msg().substr( excn.msg().find( "ERROR: " ), expected.size() ), expected ); diff --git a/source/test/util/mpi_funcs.hh b/source/test/util/mpi_funcs.hh index dfc99ec365..2e9c61e239 100644 --- a/source/test/util/mpi_funcs.hh +++ b/source/test/util/mpi_funcs.hh @@ -56,13 +56,16 @@ void ts_assert_mpi_buffer_has_string( ) { try { std::string msg = utility::receive_string_from_node( source ); - TS_ASSERT( msg == expected_message ); - if ( msg != expected_message ) { + + bool flag = msg.find(expected_message) != std::string::npos; + + TS_ASSERT(flag); + if ( !flag ) { std::cerr << "SimulateMPI string for tag \"" << message_tag << "\" did not match expected string:\n"; std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -75,7 +78,7 @@ std::string ts_assert_mpi_buffer_has_string( std::string msg; try { msg = utility::receive_string_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -98,7 +101,7 @@ void ts_assert_mpi_buffer_has_integer( std::cerr << "Expected: \"" << expected_message << "\"\n"; std::cerr << "Actual: \"" << msg << "\"\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -120,7 +123,7 @@ void ts_assert_mpi_buffer_has_size( std::cerr << "Expected: " << expected_message << "\n"; std::cerr << "Actual: " << msg << "\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -133,7 +136,7 @@ double ts_assert_mpi_buffer_has_double( double msg( 0 ); try { msg = utility::receive_double_from_node( source ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -166,7 +169,7 @@ void ts_assert_mpi_buffer_has_integers( } std::cerr << " ]\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } @@ -198,7 +201,7 @@ void ts_assert_mpi_buffer_has_sizes( } std::cerr << " ]\n"; } - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "Exception caught for tag \"" << message_tag << "\": " << e.msg() << std::endl; TS_ASSERT( false ); } diff --git a/source/test/utility/integer_mapping.cxxtest.hh b/source/test/utility/integer_mapping.cxxtest.hh index 0f498a480f..c6e2216322 100644 --- a/source/test/utility/integer_mapping.cxxtest.hh +++ b/source/test/utility/integer_mapping.cxxtest.hh @@ -119,10 +119,11 @@ public: try { sm.set_next_correspondence( 11 ); TS_ASSERT( false ); /// should not reach here. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_subset_mapping_out_of_bounds_set_next_coorespondence" << std::endl; //std::cout << e.msg() << std::endl; - TS_ASSERT( e.msg() == "subset_mapping::set_next_correspondence recieved an out-of-bounds source id (11) with a source-enumeration size of 10" ); + std::string expected_err_msg = "subset_mapping::set_next_correspondence recieved an out-of-bounds source id (11) with a source-enumeration size of 10"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -132,12 +133,12 @@ public: try { sm.set_next_correspondence( 5 ); TS_ASSERT( false ); /// should not reach here. - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { //std::cout << "test_subset_mapping_overwrite_correspondence" << std::endl; //std::cout << e.msg() << std::endl; - TS_ASSERT( e.msg() == "subset_mapping::set_next_correspondence recieved an already-mapped source id (5) which had been previously assigned to destination id 1" ); + std::string expected_err_msg = "subset_mapping::set_next_correspondence recieved an already-mapped source id (5) which had been previously assigned to destination id 1"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } }; // class heapTests - diff --git a/source/test/utility/io/FileContentsMap.cxxtest.hh b/source/test/utility/io/FileContentsMap.cxxtest.hh index 40da9eba85..026603d516 100644 --- a/source/test/utility/io/FileContentsMap.cxxtest.hh +++ b/source/test/utility/io/FileContentsMap.cxxtest.hh @@ -82,8 +82,9 @@ public: try { fcm.get_file_contents( fname ); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Unexpected file-read requested: " + fname ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Unexpected file-read requested: " + fname; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -100,7 +101,7 @@ public: try { std::string file_contents = fcm.get_file_contents( fname ); TS_ASSERT_EQUALS( file_contents, "Testing testing 123\n" ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "oops! we shouldn't have gotten an exception here\n" << e.msg() << std::endl; TS_ASSERT( false ); } @@ -123,7 +124,7 @@ public: TS_ASSERT_EQUALS( file_contents, "Testing testing 123\n" ); TS_ASSERT( ! fcm.has_file_contents( fname ) ); TS_ASSERT( fcm.nreads_for_file( fname ) == 1 ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "oops! we shouldn't have gotten an exception here\n" << e.msg() << std::endl; TS_ASSERT( false ); } @@ -153,7 +154,7 @@ public: TS_ASSERT_EQUALS( file_contents2, "Testing testing 123\n" ); TS_ASSERT( fcm.nreads_for_file( fname ) == 2 ); TS_ASSERT( ! fcm.has_file_contents( fname ) ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { + } catch (utility::excn::Exception & e ) { std::cerr << "oops! we shouldn't have gotten an exception here\n" << e.msg() << std::endl; TS_ASSERT( false ); } @@ -162,4 +163,3 @@ public: }; - diff --git a/source/test/utility/simulate_mpi.cxxtest.hh b/source/test/utility/simulate_mpi.cxxtest.hh index 51a9669c5c..dd138f780a 100644 --- a/source/test/utility/simulate_mpi.cxxtest.hh +++ b/source/test/utility/simulate_mpi.cxxtest.hh @@ -49,8 +49,9 @@ public: try { std::string m2 = receive_string_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_string message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_string message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -68,8 +69,9 @@ public: try { /*char m2 =*/ receive_char_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_char message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_char message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -88,8 +90,9 @@ public: try { /*int m2 =*/ receive_integer_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_integer message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_integer message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -109,8 +112,9 @@ public: try { vector1< int > m2 = receive_integers_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_integers message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_integers message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -129,8 +133,9 @@ public: try { /*double m2 =*/ receive_double_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_double message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_double message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -150,8 +155,9 @@ public: try { vector1< double > m2 = receive_doubles_from_node(2); TS_ASSERT( false ); - } catch ( utility::excn::EXCN_Msg_Exception & e ) { - TS_ASSERT_EQUALS( e.msg(), "Could not retrieve a smpi_doubles message to 0 from 2; message queue is empty" ); + } catch (utility::excn::Exception & e ) { + std::string expected_err_msg = "Could not retrieve a smpi_doubles message to 0 from 2; message queue is empty"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } diff --git a/source/test/utility/tag/Tag.cxxtest.hh b/source/test/utility/tag/Tag.cxxtest.hh index 53cd00c3ae..51b8594b6b 100644 --- a/source/test/utility/tag/Tag.cxxtest.hh +++ b/source/test/utility/tag/Tag.cxxtest.hh @@ -37,7 +37,7 @@ public: try { utility::tag::TagCOP tags(utility::tag::Tag::create(in)); TS_ASSERT(false); - } catch ( utility::excn::EXCN_BadInput e ){ + } catch (utility::excn::BadInput e ){ std::stringstream expected_error; if(col==0){ expected_error @@ -51,12 +51,12 @@ public: << "Tag::read - parse error - file:istream line:1 column:" << col << " -" << std::string(col, ' ') << "^" << std::endl << std::endl; } - if( e.msg() != expected_error.str() ) { + if( e.msg().find( expected_error.str() ) == std::string::npos ) { std::cout << "expected error: '" << expected_error.str() << "'" << std::endl; std::cout << "actual error: '" << e.msg() << "'" << std::endl; } - TS_ASSERT( e.msg() == expected_error.str() ); + TS_ASSERT( e.msg().find( expected_error.str() ) != std::string::npos ); } } diff --git a/source/test/utility/tag/XMLSchemaGeneration.cxxtest.hh b/source/test/utility/tag/XMLSchemaGeneration.cxxtest.hh index bcbc2d312d..19ea0d8ecd 100644 --- a/source/test/utility/tag/XMLSchemaGeneration.cxxtest.hh +++ b/source/test/utility/tag/XMLSchemaGeneration.cxxtest.hh @@ -579,10 +579,11 @@ public: xsd.add_top_level_element( rs_int ); //xsd.add_top_level_element( "RosettaScripts", "\n" ); TS_ASSERT( false ); // we should not have reached this point - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - TS_ASSERT_EQUALS( e.msg(), "Name collision in creation of XML Schema definition: top level element with name \"RosettaScripts\" already has been defined.\n" + } catch (utility::excn::Exception const & e ) { + std::string expected_err_msg = "Name collision in creation of XML Schema definition: top level element with name \"RosettaScripts\" already has been defined.\n" "Old definition:\n\nNew definition:\n" - "\n"); + "\n"; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -604,8 +605,9 @@ public: try { xsd.add_top_level_element( imp ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - TS_ASSERT_EQUALS( e.msg(), "top level tag with presumed name \"imposter\" has an actual name of \"RosettaScripts\"" ); + } catch (utility::excn::Exception const & e ) { + std::string expected_err_msg = "top level tag with presumed name \"imposter\" has an actual name of \"RosettaScripts\""; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -626,8 +628,9 @@ public: } imp; try { xsd.add_top_level_element( imp ); - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { - TS_ASSERT_EQUALS( e.msg(), "top level tag \"RosettaScripts\" does not have a name attribute (a.k.a. option)." ); + } catch (utility::excn::Exception const & e ) { + std::string expected_err_msg = "top level tag \"RosettaScripts\" does not have a name attribute (a.k.a. option)."; + TS_ASSERT( e.msg().find(expected_err_msg) != std::string::npos ); } } @@ -739,7 +742,7 @@ public: // now for the duplicated element xsd.add_top_level_element( res_select_ct2 ); TS_ASSERT( false ); // this should not be reached - } catch ( utility::excn::EXCN_Msg_Exception const & e ) { + } catch (utility::excn::Exception const & e ) { std::string expected_message = "Name collision in creation of XML Schema definition: top level element with " "name \"ResidueSelectorType\" already has been defined.\n" "Old definition:\n" @@ -750,7 +753,7 @@ public: "\n" " \n" "\n"; - TS_ASSERT_EQUALS( e.msg(), expected_message ); + TS_ASSERT( e.msg().find(expected_message) != std::string::npos ); // std::cout << std::endl << std::endl; // std::cout << e.msg() << std::endl << std::endl; // std::cout << expected_message << std::endl << std::endl; diff --git a/source/test/utility/vector0.cxxtest.hh b/source/test/utility/vector0.cxxtest.hh index a4f7a4dcc1..f06d6351f8 100644 --- a/source/test/utility/vector0.cxxtest.hh +++ b/source/test/utility/vector0.cxxtest.hh @@ -168,7 +168,7 @@ class Vector0Tests : public CxxTest::TestSuite { set_throw_on_next_assertion_failure(); v.index_of( 7 ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: vectorL:index_of: element not found\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); } diff --git a/source/test/utility/vector1.cxxtest.hh b/source/test/utility/vector1.cxxtest.hh index c4a81210e9..675f85b049 100644 --- a/source/test/utility/vector1.cxxtest.hh +++ b/source/test/utility/vector1.cxxtest.hh @@ -17,7 +17,7 @@ #include // Utility header -#include +#include #include // C++ headers @@ -167,7 +167,7 @@ class Vector1_Tests : public CxxTest::TestSuite { set_throw_on_next_assertion_failure(); v.index_of( 7 ); // This should force an exit. TS_ASSERT( false ); // Exception was not thrown! - } catch ( utility::excn::EXCN_Base const & e) { + } catch (utility::excn::Exception const & e) { std::string expected( "ERROR: vectorL:index_of: element not found\n" ); TS_ASSERT_EQUALS( e.msg().substr( e.msg().find( "ERROR: " ), expected.size() ), expected ); }