Switched to custom exceptions.