Skip to content

Commit

Permalink
increase debuggability of error strings
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Apr 26, 2012
1 parent e80ec09 commit 7061200
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions gpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int gpgCheckSignResult(SHOWERROR_FN showerror_cb, gpgme_sign_result_t result,
}

if (error)
{ showerror_cb(_("GpgMe error"), buffer); }
{ showerror_cb(_("GpgMe sign error"), buffer); }

memFree(__FILE__, __LINE__, buffer, STDBUFFERLENGTH);

Expand Down Expand Up @@ -352,7 +352,7 @@ int gpgCheckVerifyResult(SHOWERROR_FN showerror_cb,
}

if (error)
{ showerror_cb(_("GpgMe error"), buffer); }
{ showerror_cb(_("GpgMe verify error"), buffer); }

memFree(__FILE__, __LINE__, buffer, STDBUFFERLENGTH);

Expand Down Expand Up @@ -567,7 +567,7 @@ int gpgDecrypt(char* buffer, int size, char** newbuffer, int* newsize,
error = gpgme_new(&context);
if (error)
{
(showerror_cb)(_("GpgMe error"), gpgme_strerror(error));
(showerror_cb)(_("GpgMe context error"), gpgme_strerror(error));
return 1;
}
else
Expand Down Expand Up @@ -643,7 +643,7 @@ int gpgDecrypt(char* buffer, int size, char** newbuffer, int* newsize,
if (error)
{
if (showerror)
{ (showerror_cb)(_("GpgMe error"), gpgme_strerror(error)); }
{ (showerror_cb)(_("GpgMe decrypt error"), gpgme_strerror(error)); }
return 1;
}
else
Expand Down Expand Up @@ -808,7 +808,7 @@ int gpgEncrypt(char* buffer, int size, char** newbuffer, int* newsize,
if (error)
{
if (showerror)
{ (showerror_cb)(_("GpgMe error"), gpgme_strerror(error)); }
{ (showerror_cb)(_("GpgMe encrypt error"), gpgme_strerror(error)); }
return 1;
}
else
Expand Down Expand Up @@ -977,7 +977,7 @@ int gpgGetRecipients(gpgme_recipient_t recipients,
tmpbuffer = memAlloc(__FILE__, __LINE__, STDBUFFERLENGTH);
snprintf(tmpbuffer, STDBUFFERLENGTH,
_("unknown recipient id %s"), recipient -> keyid);
(showerror_cb)(_("GpgMe error"), tmpbuffer);
(showerror_cb)(_("GpgMe recipient error"), tmpbuffer);
memFree(__FILE__, __LINE__, tmpbuffer, STDBUFFERLENGTH);
}

Expand Down
2 changes: 1 addition & 1 deletion interface_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int cliInterface(void)
if (!initUTF8Encoding(config -> encoding))
{
fprintf(stderr, _("error: %s\n"),
_("failed to initialize the character encoding."));
_("cli failed to initialize the character encoding."));
exit(1);
}

Expand Down
4 changes: 2 additions & 2 deletions interface_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ void interfaceLoop(void)
nodenames = xmlInterfaceGetNames();
nodes = listCount(nodenames);

listwidget[id] = newCDKAlphalist(cdkscreen, CENTER, 0,
listwidget[id] = newCDKAlphalist(cdkscreen, RIGHT, 0,
#ifdef CDK_VERSION_5
LINES - infobox -> boxHeight - 1, 0,
#else
Expand Down Expand Up @@ -2281,7 +2281,7 @@ void userInterface(void)
if (!initUTF8Encoding(config -> encoding))
{
destroyScreen(__LINE__,
_("failed to initialize the character encoding."));
_("gui failed to initialize the character encoding."));
}

if (xmlDataFileRead(runtime -> dbfile, &errormsg, guiDialogPassphrase,
Expand Down

0 comments on commit 7061200

Please sign in to comment.