Added custom error handler for XServer.