Added a base exception class and some constants.