Extension Error Only Opening File

Can I hide the errors from files which are not currently opened?