/* UI_FILE - a generic STDIO like output stream.
- Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008
+ Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GDB.
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
_("stdio_file_write: bad magic number"));
- fwrite (buf, length_buf, 1, stdio->file);
+ /* Calling error crashes when we are called from the exception framework. */
+ if (fwrite (buf, length_buf, 1, stdio->file))
+ ;
}
static void
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
_("stdio_file_fputs: bad magic number"));
- fputs (linebuffer, stdio->file);
+ /* Calling error crashes when we are called from the exception framework. */
+ if (fputs (linebuffer, stdio->file))
+ ;
}
static int