Hi,
In Javascript, there is not an option to suppress error, like it is PHP, where you use "@".
But there is a way how to get similar behaviour in Javascript. It requires to develop the code, that expects a certain errors.
You can check if each function can be performed (validate it). To do the check, you have to use try / catch statements and typeof in condition, with strict equality operator ===.
For a files, you can use onerror event, which is triggered if an error occurs, while loading an external file.