comparison src/error.cc @ 4452:f3c21a1d1c62

[project @ 2003-07-09 23:20:18 by jwe]
author jwe
date Wed, 09 Jul 2003 23:20:19 +0000
parents dcdca99fe2f0
children 5e2c68946f30
comparison
equal deleted inserted replaced
4451:ea1d3e1a4b1b 4452:f3c21a1d1c62
98 bool buffer_error_messages = false; 98 bool buffer_error_messages = false;
99 99
100 // TRUE means error messages are turned off. 100 // TRUE means error messages are turned off.
101 bool discard_error_messages = false; 101 bool discard_error_messages = false;
102 102
103 // TRUE means warning messages are turned off.
104 bool discard_warning_messages = false;
105
103 // The message buffer. 106 // The message buffer.
104 static OSSTREAM *error_message_buffer = 0; 107 static OSSTREAM *error_message_buffer = 0;
105 108
106 void 109 void
107 reset_error_handler (void) 110 reset_error_handler (void)
115 // Warning messages are never buffered. 118 // Warning messages are never buffered.
116 119
117 static void 120 static void
118 vwarning (const char *name, const char *fmt, va_list args) 121 vwarning (const char *name, const char *fmt, va_list args)
119 { 122 {
123 if (discard_warning_messages)
124 return;
125
120 flush_octave_stdout (); 126 flush_octave_stdout ();
121 127
122 OSSTREAM output_buf; 128 OSSTREAM output_buf;
123 129
124 if (name) 130 if (name)
356 { 362 {
357 if (Vwarning_option != "off") 363 if (Vwarning_option != "off")
358 { 364 {
359 if (curr_sym_tab != top_level_sym_tab 365 if (curr_sym_tab != top_level_sym_tab
360 && Vwarning_option == "backtrace" 366 && Vwarning_option == "backtrace"
361 && ! warning_state) 367 && ! warning_state
368 && ! discard_warning_messages)
362 pr_where ("warning"); 369 pr_where ("warning");
363 370
364 va_list args; 371 va_list args;
365 va_start (args, fmt); 372 va_start (args, fmt);
366 vwarning ("warning", fmt, args); 373 vwarning ("warning", fmt, args);