mirror of
https://github.com/apache/cordova-android.git
synced 2026-03-16 00:00:02 +08:00
fix: Potential NPE when handling generic exceptions (#1878)
This commit is contained in:
@@ -112,7 +112,7 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
return new WebResourceResponse(mimeType, null, is);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LOG.e(TAG, e.getMessage());
|
||||
LOG.e(TAG, "Exception handling Web resource at \"" + path + "\"", e);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -317,7 +317,7 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
try {
|
||||
webView.getContext().unregisterReceiver(receiver);
|
||||
} catch (Exception e) {
|
||||
LOG.e(TAG, "Error unregistering configuration receiver: " + e.getMessage(), e);
|
||||
LOG.e(TAG, "Error unregistering configuration receiver", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user