We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a93fd6b commit b7dd30eCopy full SHA for b7dd30e
JetPDFVue/src/main/java/com/pratikk/jetpdfvue/state/VueFilePicker.kt
@@ -127,7 +127,8 @@ class VueFilePicker {
127
@Composable
128
fun getLauncher(
129
interceptResult: suspend (File) -> Unit = {},
130
- onResult: (File) -> Unit = {}
+ onResult: (File) -> Unit = {},
131
+ onError:(Exception) -> Unit = {}
132
): ManagedActivityResultLauncher<Intent, ActivityResult> {
133
val context = LocalContext.current
134
LaunchedEffect(key1 = vueFilePickerState, block = {
@@ -154,7 +155,8 @@ class VueFilePicker {
154
155
}
156
} catch (e: CancellationException) {
157
throw e
- } catch (_: Exception) {
158
+ } catch (e: Exception) {
159
+ onError(e)
160
null
161
162
file?.let {
0 commit comments