[IMP] To ensure that the right error is catched when an error is raised.