Unfortunately, CPMessageException is part of Apple's private frameworks, in the case of office files, OfficeImport.framework. This is thrown when the environment receives an unusable file.
The reason your application is not crashing is because it is probably being processed by the import code itself. Even setting NSSetUncaughtExceptionHandler will not work (as I tried in the past).
The best way around this is to use the shouldStartLoadWithRequest delegate method for the UIWebView:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
Here you can proactively stop the file from being downloaded to the web view and avoid a blank screen.
(Not sure if there is a way to read the NSLog output on the fly so you can control it. But this is probably not the right way to do it!)
: . , Apple .