How to handle the situation when Java method being called via JNI does not exist?
-
If I call a Java method that does not exist with a code like this:
QAndroidJniEnvironment javaEnv; QAndroidJniObject javaAd(QtAndroid::androidActivity()); javaAd.callMethod<void>("aWrongMethodName"); if (javaEnv->ExceptionCheck()) { javaEnv->ExceptionClear(); qDebug() << " Java code has thrown an exception."; }
javaAd.callMethod executes successfully, and javaEnv->ExceptionCheck() returns false, so it is not clear how to handle the situation when Java method being called does not exist.
Is there a way to make javaAd.callMethod throw an exception or set some error flag in such a case?
-
@Dmitriano there are a lot of errors in the log if the method does not exist, but there is no way to handle this situation:
05-05 02:55:27.285 16563 16563 W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState; (declaration of 'android.graphics.drawable.RotateDrawable$RotateState' appears in /system/framework/framework.jar) 05-05 02:55:27.285 16563 16563 W System.err: at java.lang.Class.getDeclaredField(Native Method) 05-05 02:55:27.285 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getAccessibleField(ExtractStyle.java:399) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:712) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1043) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:623) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1031) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.java:1665) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBar(ExtractStyle.java:1677) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2006) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) 05-05 02:55:27.286 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) 05-05 02:55:27.286 16563 16563 W System.err: at net.geographx.MainActivity.onCreate(MainActivity.java:40) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7802) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7791) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 05-05 02:55:27.286 16563 16563 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107) 05-05 02:55:27.286 16563 16563 W System.err: at android.os.Looper.loop(Looper.java:214) 05-05 02:55:27.286 16563 16563 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) 05-05 02:55:27.286 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.286 16563 16563 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 05-05 02:55:27.286 16563 16563 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 05-05 02:55:27.286 16563 16563 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'float java.lang.reflect.Field.getFloat(java.lang.Object)' on a null object reference 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:712) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1043) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:623) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1031) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.java:1665) 05-05 02:55:27.286 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBar(ExtractStyle.java:1677) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2006) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) 05-05 02:55:27.287 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) 05-05 02:55:27.287 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) 05-05 02:55:27.287 16563 16563 W System.err: at net.geographx.MainActivity.onCreate(MainActivity.java:40) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7802) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7791) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 05-05 02:55:27.287 16563 16563 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107) 05-05 02:55:27.287 16563 16563 W System.err: at android.os.Looper.loop(Looper.java:214) 05-05 02:55:27.287 16563 16563 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) 05-05 02:55:27.287 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.287 16563 16563 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 05-05 02:55:27.287 16563 16563 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 05-05 02:55:27.304 16563 16563 W raphx.LinesGam: Accessing hidden field Landroid/graphics/drawable/RotateDrawable$RotateState;->mPivotX:F (greylist-max-o, reflection, denied) 05-05 02:55:27.305 16563 16563 W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState; (declaration of 'android.graphics.drawable.RotateDrawable$RotateState' appears in /system/framework/framework.jar) 05-05 02:55:27.305 16563 16563 W System.err: at java.lang.Class.getDeclaredField(Native Method) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getAccessibleField(ExtractStyle.java:399) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:712) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1043) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:623) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1031) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.java:1665) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBar(ExtractStyle.java:1677) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2006) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) 05-05 02:55:27.305 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) 05-05 02:55:27.305 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) 05-05 02:55:27.305 16563 16563 W System.err: at net.geographx.MainActivity.onCreate(MainActivity.java:40) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7802) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7791) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 05-05 02:55:27.305 16563 16563 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107) 05-05 02:55:27.305 16563 16563 W System.err: at android.os.Looper.loop(Looper.java:214) 05-05 02:55:27.305 16563 16563 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) 05-05 02:55:27.305 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.305 16563 16563 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 05-05 02:55:27.305 16563 16563 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 05-05 02:55:27.306 16563 16563 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'float java.lang.reflect.Field.getFloat(java.lang.Object)' on a null object reference 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:712) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1043) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:623) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1031) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.java:1665) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBar(ExtractStyle.java:1677) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2006) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) 05-05 02:55:27.306 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) 05-05 02:55:27.306 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) 05-05 02:55:27.306 16563 16563 W System.err: at net.geographx.MainActivity.onCreate(MainActivity.java:40) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7802) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7791) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 05-05 02:55:27.306 16563 16563 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107) 05-05 02:55:27.306 16563 16563 W System.err: at android.os.Looper.loop(Looper.java:214) 05-05 02:55:27.306 16563 16563 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) 05-05 02:55:27.306 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.306 16563 16563 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 05-05 02:55:27.306 16563 16563 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 05-05 02:55:27.311 16563 16563 W raphx.LinesGam: Accessing hidden field Landroid/graphics/drawable/RotateDrawable$RotateState;->mPivotX:F (greylist-max-o, reflection, denied) 05-05 02:55:27.311 16563 16563 W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState; (declaration of 'android.graphics.drawable.RotateDrawable$RotateState' appears in /system/framework/framework.jar) 05-05 02:55:27.312 16563 16563 W System.err: at java.lang.Class.getDeclaredField(Native Method) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getAccessibleField(ExtractStyle.java:399) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:712) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1043) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getLayerDrawable(ExtractStyle.java:623) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.getDrawable(ExtractStyle.java:1031) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBarInfo(ExtractStyle.java:1665) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.extractProgressBar(ExtractStyle.java:1677) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:2007) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:614) 05-05 02:55:27.312 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:267) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) 05-05 02:55:27.312 16563 16563 W System.err: at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) 05-05 02:55:27.312 16563 16563 W System.err: at net.geographx.MainActivity.onCreate(MainActivity.java:40) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7802) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.Activity.performCreate(Activity.java:7791) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 05-05 02:55:27.312 16563 16563 W System.err: at android.os.Handler.dispatchMessage(Handler.java:107) 05-05 02:55:27.312 16563 16563 W System.err: at android.os.Looper.loop(Looper.java:214) 05-05 02:55:27.312 16563 16563 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) 05-05 02:55:27.312 16563 16563 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 02:55:27.312 16563 16563 W System.err: at ...
-
@Dmitriano I guess
QAndroidJniEnvironment::ExceptionCheck()
purpose is to catch exception which occurred during function execution and not "function not exist" exception. So your use case is not covered.Don't you have hand over Java code? Just create an empty function which throw an exception, this should be catchable with
QAndroidJniEnvironment::ExceptionCheck()
.