1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-21 14:47:03 +01:00
Werner Koch 2ea1aebc92
gpg: New function to printed a detailed error code.
* g10/misc.c (print_reported_error): New.
--

Often the user is only interested in a catch all error code like "not
found" but sometimes it is useful to also see the real reason.  By
this function this can easily be achieved.  Example:

  err = search_for_key (keyid)
  if (err)
    {
      log_info ("error locating key '%s': %s\n",
                keyid, gpg_strerror (GPG_ERR_NOT_FOUND));
      print_reported_error (err, GPG_ERR_NOT_FOUND);
    }

results in

  gpg: error locating key 'foobar': not found
  gpg: (reported error: no keyring <keybox>)

where the second line is only printed in verbose mode and if ERR is
not GPG_ERR_NOT_FOUND.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-12-15 13:40:10 +01:00
..
2015-11-06 13:29:01 +01:00
2014-10-31 14:21:34 +01:00
2015-08-06 17:00:41 +09:00
2015-11-17 12:50:22 +01:00
2007-07-04 19:49:40 +00:00
2014-11-13 12:01:42 +01:00
2015-05-01 13:58:18 +09:00
2015-12-14 13:02:50 +01:00
2015-02-04 09:15:34 +01:00
2015-02-04 09:15:34 +01:00
2015-11-17 12:50:22 +01:00
2015-11-17 14:53:00 +01:00
2015-12-15 10:45:00 +01:00
2015-10-05 19:48:47 +02:00
2015-11-17 14:53:00 +01:00
2015-10-05 19:48:47 +02:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2008-12-12 08:54:50 +00:00
2015-11-17 12:50:22 +01:00
2015-04-06 13:07:09 +02:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2015-09-10 18:12:20 +02:00
2015-12-02 15:21:58 +01:00
2015-11-19 15:48:01 +01:00
2014-01-29 17:45:05 +01:00