Implement new feature to switch exceptions

Close #5