Fix cb6875

This fix will fix the FATAL EXCEPTION which kills the app process on HTC Android devices (please notice CB6875 https://issues.apache.org/jira/browse/CB-6875).

We've decided to catch the RuntimeException instead of UnsupportedOperationException to catch also the IllegalStateException without doubling the code in the catch block. I'll hope you'll accept this nevertheless.