Function: gnutls-error-string

gnutls-error-string is a function defined in gnutls.c.

Signature

(gnutls-error-string ERROR)

Documentation

Return a description of ERROR.

ERROR is an integer or a symbol with an integer gnutls-code property.

Source Code

// Defined in /usr/src/emacs/src/gnutls.c
{
  Lisp_Object code;

  if (EQ (err, Qt)) return build_string ("Not an error");

  if (SYMBOLP (err))
    {
      code = Fget (err, Qgnutls_code);
      if (NUMBERP (code))
	{
	  err = code;
	}
      else
	{
	  return build_string ("Symbol has no numeric gnutls-code property");
	}
    }

  if (! TYPE_RANGED_FIXNUMP (int, err))
    return build_string ("Not an error symbol or code");

  return build_string (emacs_gnutls_strerror (XFIXNUM (err)));
}