Added new error types

Also added a couple of tests to make sure the inheritance is working.