Implement exception system

Very basic and needs to be extended, but it will serve its purpose.
Close #105
Merge pull request #108 from Xandaros/exceptions

Implement exception system