selectInput() exception recovery

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

1 Like

you find in

the long way to do it,

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

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

1 Like

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.