Why did it take an hour to write this exception class?