# selectInput() exception recovery

**URL:** <https://discourse.processing.org/t/selectinput-exception-recovery/17044>\
**Category:** Beginners\
**Created:** [January 12, 2020, 10:52am UTC](https://discourse.processing.org/t/selectinput-exception-recovery/17044 "2020-01-12T10:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrih](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@harrih](https://discourse.processing.org/u/harrih)\
**Post date:** [January 12, 2020, 10:52am UTC](https://discourse.processing.org/t/selectinput-exception-recovery/17044/1 "2020-01-12T10:52:12Z")

</div>

Hi All,  
Am just learning Processing Not Java literate  
I am experimenting with selectInput() for loading files,  
All is good, as i can select a file load it etc.  
However if instead of selecting the file by mouse pointer, I **mistype** the file name  
I get the message The file \*\*\*\*\*\*\*\* is missing or inaccessible etc  
and the sketch stalls.  
Is there a way of recovering from this without stopping the sketch,  
or alternatively some safer way of loading files  
TIA  
Harry

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 12, 2020, 11:10am UTC](https://discourse.processing.org/t/selectinput-exception-recovery/17044/2 "2020-01-12T11:10:38Z")

</div>

you find in

> **[selectInput() / Reference](https://www.processing.org/reference/selectInput_.html)**
>
> Open a platform-specific file chooser dialog to select a file for input. After the selection is made, the selected File will be passed to the 'callback' function. If the dialog is closed or canceled, …

the long way to do it,

> selectInput(prompt, callbackMethod, file, callbackObject, parent, sketch)

so possibly in callback can deal with errors? ( not tested )

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [January 17, 2020, 6:38am UTC](https://discourse.processing.org/t/selectinput-exception-recovery/17044/3 "2020-01-17T06:38:29Z")

</div>

> [@harrih](#):
>
> However if instead of selecting the file by mouse pointer, I **mistype** the file name

What operating system are you doing this on? What is the file browser / dialog system? For example, in MacOS I don’t believe you get an option to type.
