Not sure if i am going mad (probably true) but should these lines be flipped? Your looking to set the exception handler to your implementation of it and then set defaultUEH to that updated value no? Again correct me if I am wrong the way you have it you are holding on to a old reference which no longer exists since it's being overwritten on line 58. Again could be all madness :)