From a34ac6fca7214b2efc06b714c4fb8b063c374720 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Sat, 2 Apr 2011 15:24:30 +0200 Subject: [PATCH] don't crash in absence of compounds.chemlib --- modules/io/tests/test_io_pdb.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/io/tests/test_io_pdb.cc b/modules/io/tests/test_io_pdb.cc index 19a1aae76..e890a5b6c 100644 --- a/modules/io/tests/test_io_pdb.cc +++ b/modules/io/tests/test_io_pdb.cc @@ -455,10 +455,8 @@ BOOST_AUTO_TEST_CASE(seqres_import) { SetPrefixPath(getenv("OST_ROOT")); String lib_path=GetSharedDataPath()+"/compounds.chemlib"; - conop::CompoundLibPtr compound_lib; - try { - compound_lib=conop::CompoundLib::Load(lib_path); - } catch(...) { + conop::CompoundLibPtr compound_lib=conop::CompoundLib::Load(lib_path); + if (!compound_lib) { std::cout << "WARNING: skipping SEQRES import unit test. " << "Rule-based builder is required" << std::endl; return; -- GitLab