OSSP CVS Repository

ossp - Check-in [3459]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3459
Date: 2003-Jun-24 11:35:39 (local)
2003-Jun-24 09:35:39 (UTC)
User:ms
Branch:
Comment: Make error messages more descriptive.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_error.c      1.2 -> 1.3     18 inserted, 9 deleted

ossp-pkg/rc/rc_error.c 1.2 -> 1.3

--- rc_error.c   2003/06/23 16:09:47     1.2
+++ rc_error.c   2003/06/24 09:35:39     1.3
@@ -41,23 +41,32 @@
         if ((rc_return_t)Localerr.ex_value == RC_ERR_TRM)
             exit(0);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_USE)
-            fprintf(stderr, "    Error condition, API usage is wrong.\n");
+            fprintf(stderr, "    Error condition, API usage is wrong in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_MEM)
-            fprintf(stderr, "    Error condition, memory allocation failure.\n");
+            fprintf(stderr, "    Error condition, memory allocation failure in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_SYS)
-            fprintf(stderr, "    Error condition, underlying system failure.\n");
+            fprintf(stderr, "    Error condition, underlying system failure in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_IO)
-            fprintf(stderr, "    Error condition, input output failure.\n");
+            fprintf(stderr, "    Error condition, input output failure in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_INT)
-            fprintf(stderr, "    Error condition, internal failure.\n");
+            fprintf(stderr, "    Error condition, internal failure in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_FNC)
-            fprintf(stderr, "    Error condition, function file could not be opened.\n");
+            fprintf(stderr, "    Error condition, function file could not be opened in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_DIR)
-            fprintf(stderr, "    Error condition, location dir could not be opened.\n");
+            fprintf(stderr, "    Error condition, location dir could not be opened in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_RCF)
-            fprintf(stderr, "    Error condition, rc file could not be opened.\n");
+            fprintf(stderr, "    Error condition, rc file could not be opened in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else if ((rc_return_t)Localerr.ex_value == RC_ERR_CFG)
-            fprintf(stderr, "    Error condition, configuration and options failure.\n");
+            fprintf(stderr, "    Error condition, configuration and options failure in %s:%s():%d.\n", \
+                Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         else
             fprintf(stderr, "    Error condition of class '%s',\n    exception %d in %s:%s():%d.\n", (char *)Localerr.ex_class, (int)Localerr.ex_value, Localerr.ex_file, Localerr.ex_func, Localerr.ex_line);
         exit(1); /* Return failure */

CVSTrac 2.0.1