add chapter 8 exception handler