Need to be a little bit careful here.  We're defining local variables that technically drop out of scope at the end of the try block - if the destructors did anything to tidy up, we would crash when we processed a message.  We should move these variables outside the try block.