This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: minor error reporting patch


>>>>> "David" == David Brownell <david-b@pacbell.net> writes:

David> Running that API test suite, I noticed that file open errors
David> gave a different exception string.  That shouldn't be a
David> big deal, except that since Java doesn't really provide good
David> ways to distinguish many errors except by such strings,
David> programs often end up needing to compare them.

This is not really something I like to do, since it means we're
indirectly supporting bad programming habits.  However this particular
patch is pretty innocuous, and it is hard to argue against it, so I am
going to check it in.

There are certain kinds of bug compatibility changes we probably ought
to reject.  We can do that on a case-by-case basis though.

David> --- natFdOrig.cc Mon Jun 25 11:14:44 2001
David> +++ natFileDescriptorPosix.cc Mon Jun 25 11:15:17 2001
David> @@ -111,7 +111,7 @@
David>    if (fd == -1)
David>      {
David>        char msg[MAXPATHLEN + 200];
David> -      sprintf (msg, "%s: %s", buf, strerror (errno));
David> +      sprintf (msg, "%s (%s)", buf, strerror (errno));
David>        JvThrow (new FileNotFoundException (JvNewStringLatin1 (msg)));
David>      }
David>    return fd;

Thanks,
Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]