Check for exception after calling constructor

Calling constructor that throws Java exception causes `JNI WARNING: JNI method called with exception pending` (at least on Android). It looks like that `NewObjectA` returns something even if object creation fails.