Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Commit

Permalink
slightly improved error message, partially addresses #1
Browse files Browse the repository at this point in the history
  • Loading branch information
gregcaporaso committed Jan 15, 2016
1 parent 9cbfb18 commit ae9fd9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion biab/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def handle_starttag(self, tag, attrs):
raise Exception("Invalid ID for section")

def get_id(self):
return self._ID
try:
return self._ID
except AttributeError:
raise ValueError("A section is missing its ID.")

class Node(object):

Expand Down

0 comments on commit ae9fd9f

Please sign in to comment.