I try to get a file that does not exist on my site, like:
try {
$.getScript('app/controllers/arquivo-errado.js', function(){});
} catch (e) {
// caso de erro
}
The error is returned in the console:
GET URL ... app / controllers / wrong-file.js? _ = 1484154145345 404 (Not Found)
I want to know how I can change or hide this error, for example, change it to a 'File does not exist' error, or without displaying the error.