Added error class

I added an error class for javascript errors
Complete