Exceptions more flexible

Tested manually, not entirely sure how to add an automated test case
for this. Will leave a Todo note when I document the exception.