more verbose reporting of unexpected errors
authorKen Raeburn <raeburn@mit.edu>
Thu, 7 Mar 2002 00:29:07 +0000 (00:29 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 7 Mar 2002 00:29:07 +0000 (00:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14235 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/testing/util/ChangeLog
src/kadmin/testing/util/tcl_kadm5.c
src/kadmin/testing/util/tcl_ovsec_kadm.c

index 4845d653dcffadb0eee26b9f1a7a8df6e2ca97f7..5c3f1068a54b8bdef1d7d738cc259dd49a854a58 100644 (file)
@@ -1,3 +1,8 @@
+
+       * tcl_kadm5.c (unparse_err): Print error message, not just number,
+       to stderr for unrecognized error code.
+       * tcl_ovsec_kadm.c (unparse_err): Likewise.
+
 2001-09-01  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (SRCS): All files live in srcdir.
index 9e0e2ea2570cdc93158ed7677d7cc361917ac210..abc39b07e57f99343fc8b5b09d1813e98392a652 100644 (file)
@@ -405,9 +405,11 @@ static Tcl_DString *unparse_err(kadm5_ret_t code)
      case KRB5_CONFIG_BADFORMAT: code_string = "KRB5_CONFIG_BADFORMAT"; break;
      case EINVAL: code_string = "EINVAL"; break;
      case ENOENT: code_string = "ENOENT"; break;
-     default: 
-       fprintf(stderr, "**** CODE %ld ***\n", (long) code); 
-       code_string = "UNKNOWN"; break;
+     default:
+        fprintf(stderr, "**** CODE %d (%s) ***\n", code,
+                error_message (code));
+        code_string = "UNKNOWN";
+        break;
      }
 
      error_string = error_message(code);
index b8a39bde25de9bd291ee05bd1df283a783bc378a..004b5d134029cf62d9e0d10e44ca66fe0ee2a924 100644 (file)
@@ -374,7 +374,11 @@ static Tcl_DString *unparse_err(ovsec_kadm_ret_t code)
      case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN: code_string = "KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN"; break;
      case EINVAL: code_string = "EINVAL"; break;
      case ENOENT: code_string = "ENOENT"; break;
-     default: fprintf(stderr, "**** CODE %ld ***\n", (long) code); code_string = "UNKNOWN"; break;
+     default:
+        fprintf(stderr, "**** CODE %d (%s) ***\n", code,
+                error_message (code));
+        code_string = "UNKNOWN";
+        break;
      }
 
      error_string = error_message(code);