# Exceptions for Android

**URL:** <https://discourse.processing.org/t/exceptions-for-android/29210>\
**Category:** Processing for Android\
**Created:** [April 8, 2021, 6:14am UTC](https://discourse.processing.org/t/exceptions-for-android/29210 "2021-04-08T06:14:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xyu](https://avatars.discourse-cdn.com/v4/letter/x/e274bd/32.png) [@Xyu](https://discourse.processing.org/u/Xyu)\
**Post date:** [April 8, 2021, 6:14am UTC](https://discourse.processing.org/t/exceptions-for-android/29210/1 "2021-04-08T06:14:37Z")

</div>

How do I handle an exception thrown when trying to access a non-existent file?

The code from here [try \ Language (API) \ Processing 3+](https://processing.org/reference/try.html) does not work on Android

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [April 8, 2021, 6:14pm UTC](https://discourse.processing.org/t/exceptions-for-android/29210/2 "2021-04-08T18:14:53Z")

</div>

@Xyu === try catch works with android; in your case i think the exception trhrown is fileNotFoundException,; yet can you put the code you are using and the error you get in condole?
