summaryrefslogtreecommitdiffstats
path: root/src/include/k5-err.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-03-26 20:55:59 +0000
committerKen Raeburn <raeburn@mit.edu>2006-03-26 20:55:59 +0000
commitb5a541c640dfedda7480332f4838e30f0a9e1770 (patch)
treeb5182550f1c3fb475c3b71d15f4944fbcc16c4bb /src/include/k5-err.h
parent976289e5db9426efb6aa56cf0c97b89b4e30d1b4 (diff)
downloadkrb5-b5a541c640dfedda7480332f4838e30f0a9e1770.tar.gz
krb5-b5a541c640dfedda7480332f4838e30f0a9e1770.tar.xz
krb5-b5a541c640dfedda7480332f4838e30f0a9e1770.zip
Initial enhanced error message support, similar to what I sent to
krbdev except for some function renaming (krb5_free_error was already in use, so added _message to everything), and the context is allowed to be NULL (in which case we fall back to error_message() and storing no strings) to simplify some code. Low-level routines in the support library, using a private data structure; higher-level routines in libkrb5, using a krb5_context. Added error info strings to the KRB_ERR_GENERIC case in gc_via_tkt.c and the python sample service location plugin. Added code to kinit and kvno to look up and display the strings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17776 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/k5-err.h')
-rw-r--r--src/include/k5-err.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/k5-err.h b/src/include/k5-err.h
new file mode 100644
index 000000000..0ac20802b
--- /dev/null
+++ b/src/include/k5-err.h
@@ -0,0 +1,23 @@
+#define _(X) (X)
+#define KRB5_CALLCONV
+struct errinfo {
+ long code;
+ const char *msg;
+ char scratch_buf[1024];
+};
+
+void
+krb5int_set_error (struct errinfo *ep,
+ long code,
+ const char *fmt, ...);
+void
+krb5int_vset_error (struct errinfo *ep, long code,
+ const char *fmt, va_list args);
+char *
+krb5int_get_error (struct errinfo *ep, long code);
+void
+krb5int_free_error (struct errinfo *ep, char *msg);
+void
+krb5int_clear_error (struct errinfo *ep);
+void
+krb5int_set_error_info_callout_fn (const char *(KRB5_CALLCONV *f)(long));