Skip to content

Commit

Permalink
chore: revert to raising exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Aug 13, 2024
1 parent c575dbe commit 09117fc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions neuroml/nml/generatedssupersuper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ def add(self, obj=None, hint=None, force=False, validate=True, **kwargs):
if isinstance(obj, str):
# no hint, no pass
if not hint:
self.logger.error("Received a text object to add.")
self.logger.error(
'Please pass `hint="__ANY__"` to confirm that this is what you intend.'
e = Exception(
"Received a text object to add. "
+ 'Please pass `hint="__ANY__"` to confirm that this is what you intend. '
+ "I will then try to add this to an __ANY__ member in the object."
)
self.logger.error(
"I will then try to add this to an __ANY__ member in the object."
)
return None
raise e
# hint confirmed, try to add it below
else:
self.logger.warning("Received a text object to add.")
Expand Down

0 comments on commit 09117fc

Please sign in to comment.