Android exceptions

Android build doesn't like code with exceptions.