Add some exceptions for more fine-grained exception handling.