[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] print exceptions to stderr instead of stdout
From: |
Andreas Dilger |
Subject: |
[PATCH] print exceptions to stderr instead of stdout |
Date: |
Mon, 4 Feb 2002 15:18:09 -0700 |
User-agent: |
Mutt/1.2.5.1i |
Andrew,
this patch changes error messages from exceptions to be printed to stderr
instead of stdout.
Cheers, Andreas
=================== parted-1.6.0-pre2-stderr.diff ======================
--- libparted/exception.c.orig Sun Dec 30 11:26:13 2001
+++ libparted/exception.c Fri Feb 1 15:40:07 2002
@@ -85,14 +85,15 @@
default_handler (PedException* ex)
{
if (ex->type == PED_EXCEPTION_BUG)
- printf (_("A bug has been detected in GNU parted. "
+ fprintf (stderr, _("A bug has been detected in GNU parted. "
"Please email a bug report to "
"address@hidden containing the version (%s) "
"and the following message:"),
VERSION);
else
- printf ("%s: ", ped_exception_get_type_string (ex->type));
- printf ("%s\n", ex->message);
+ fprintf (stderr,
+ "%s: ", ped_exception_get_type_string (ex->type));
+ fprintf (stderr, "%s\n", ex->message);
switch (ex->options) {
case PED_EXCEPTION_OK:
@@ -169,10 +170,10 @@
return do_throw ();
no_memory:
- printf ("Out of memory in exception handler!\n");
+ fprintf (stderr, "Out of memory in exception handler!\n");
va_start (arg_list, message);
- vprintf (message, arg_list);
+ vfprintf (stderr, message, arg_list);
va_end (arg_list);
return PED_EXCEPTION_UNHANDLED;
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
- [PATCH] print exceptions to stderr instead of stdout,
Andreas Dilger <=