Add showErrorMessage function.