Added ErrorException event handler