Commit 269a7236 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Add logging of any exception for uniprot retriever

parent f0390dc0
......@@ -58,9 +58,6 @@ def retrieve(dbxrefs, basic=True, sequence=True, organism=True, annotation=True,
output.update(read_annotation(child))
if features:
output['features'] = read_features(child)
except (KeyError, AttributeError) as e:
logger.warn('Error in retrieving %s', str(entry))
raise
except RuntimeError as e:
output['message'] = 'an error occurred'
try:
......@@ -69,6 +66,9 @@ def retrieve(dbxrefs, basic=True, sequence=True, organism=True, annotation=True,
output['message'] = 'no results found; probably invalid ID'
except:
pass
except:
logger.warn('Error in retrieving %s', str(entry))
raise
documents.append(output)
return documents
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment