written error handler in mozilla firefox