Set up exception framework