PennController for IBEX › Forums › Support › File Error Handling Behavior › Reply To: File Error Handling Behavior
April 16, 2021 at 4:16 pm
#6872
![](https://www.pcibex.net/wp-content/uploads/2018/10/IMG_8365-e1540835663655-150x150.jpg)
Keymaster
Hi Doug,
PennController should already report when a resource fails to preload in the results file: look for lines with “_PreloadFailed_” in them, they also report the name of the resource
You could run a Function element at the beginning of your trial and end it prematurely if the resource’s status is not “ready”:
newFunction( ()=>getAudio("file.wav")._element.resource.status ) .test.is("ready") .failure( end() )
replace "myAudio"
with the name of your Audio element
Let me know if you have questions
Jeremy