mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1888978 - Catch exceptions for PDF Viewer openAssetFileDescriptor r=geckoview-reviewers,ohall,calixte
Differential Revision: https://phabricator.services.mozilla.com/D206395
This commit is contained in:
parent
bb7a82234e
commit
42b3885ca7
@ -48,7 +48,7 @@ import org.mozilla.gecko.annotation.WrapForJNI;
|
|||||||
Log.e(LOGTAG, "Cannot open the uri: " + aUri + " (invalid header)");
|
Log.e(LOGTAG, "Cannot open the uri: " + aUri + " (invalid header)");
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
} catch (final IOException | SecurityException e) {
|
} catch (final Exception e) {
|
||||||
Log.e(LOGTAG, "Cannot open the uri: " + aUri, e);
|
Log.e(LOGTAG, "Cannot open the uri: " + aUri, e);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ import org.mozilla.gecko.annotation.WrapForJNI;
|
|||||||
Log.d(LOGTAG, "The uri is readable: " + uri);
|
Log.d(LOGTAG, "The uri is readable: " + uri);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (final IOException | SecurityException e) {
|
} catch (final Exception e) {
|
||||||
// A SecurityException could happen if the uri is no more valid or if
|
// A SecurityException could happen if the uri is no more valid or if
|
||||||
// we're in an isolated process.
|
// we're in an isolated process.
|
||||||
Log.e(LOGTAG, "Cannot read the uri: " + uri, e);
|
Log.e(LOGTAG, "Cannot read the uri: " + uri, e);
|
||||||
|
Loading…
Reference in New Issue
Block a user