Skip to content

Commit

Permalink
More helpful error logging when failing to load reaction library.
Browse files Browse the repository at this point in the history
Might not make a difference if you could see the logging.info call two lines earlier,
but when running unit tests (databaseTest) that is not necessarily the case.
  • Loading branch information
rwest committed Jan 31, 2019
1 parent 26befbb commit 602b7b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rmgpy/data/kinetics/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ def loadLibraries(self, path, libraries=None):
label=os.path.dirname(library_file)[len(path)+1:]
logging.info('Loading kinetics library {0} from {1}...'.format(label, library_file))
library = KineticsLibrary(label=label)
library.load(library_file, self.local_context, self.global_context)
try:
library.load(library_file, self.local_context, self.global_context)
except:
logging.error("Problem loading reaction library {0!r}".format(library_file))
raise
self.libraries[library.label] = library
self.libraryOrder.append((library.label,'Reaction Library'))

Expand Down

0 comments on commit 602b7b9

Please sign in to comment.