[core/errors] Add custom exceptions
Add custom exceptions and add error handling to the engine's module loading logic. I.e. when a non-existent module is loaded, an exception is thrown now. see #23
This commit is contained in:
parent
b6eb3ee8e6
commit
8855f1155b
4 changed files with 33 additions and 2 deletions
|
@ -16,6 +16,10 @@ def main():
|
|||
engine.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
try:
|
||||
main()
|
||||
except bumblebee.error.BaseError as error:
|
||||
sys.stderr.write("fatal: {}\n".format(error))
|
||||
sys.exit(1)
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue