replace HTMLException class with Error methods