error handling
This commit is contained in:
parent
8de06c0e52
commit
d8c28509b8
1 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,7 @@ import com.karumi.dexter.listener.single.PermissionListener;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -187,6 +188,8 @@ public class MainActivity extends FlutterActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.success(metadataMap);
|
result.success(metadataMap);
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
result.error("getOverlayMetadata-filenotfound", "failed to get metadata for path=" + path + " (" + e.getMessage() + ")", null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
result.error("getOverlayMetadata-exception", "failed to get metadata for path=" + path, e);
|
result.error("getOverlayMetadata-exception", "failed to get metadata for path=" + path, e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue