Inheritance for better exception handling