Added specific exceptions for the different types of errors.