comparison libinterp/corefcn/error.cc @ 20546:9502e0142c19

Simplify error output if max_recursion_depth is exceeded (Bug #45843). * error.cc (pr_where): Call unique on std::list frames. * toplev.h (operator==): Declare equality operator for octave_call_stack::stack_frame. * toplev.cc (operator==): Implement equality operator for octave_call_stack::stack_frame.
author Stefan Miereis <stefan.miereis@gmx.de>
date Sat, 05 Sep 2015 01:02:27 +0200
parents aa36fb998a4d
children b70cc4bd8109
comparison
equal deleted inserted replaced
20545:315b7d51d6c8 20546:9502e0142c19
311 311
312 size_t nframes = frames.size (); 312 size_t nframes = frames.size ();
313 313
314 if (nframes > 0) 314 if (nframes > 0)
315 pr_where_1 ("%s: called from\n", who); 315 pr_where_1 ("%s: called from\n", who);
316
317 // Print the error message only if it is different from the previous one;
318 // Makes the output more concise and readable.
319 frames.unique ();
316 320
317 for (std::list<octave_call_stack::stack_frame>::const_iterator p = frames.begin (); 321 for (std::list<octave_call_stack::stack_frame>::const_iterator p = frames.begin ();
318 p != frames.end (); p++) 322 p != frames.end (); p++)
319 { 323 {
320 const octave_call_stack::stack_frame& elt = *p; 324 const octave_call_stack::stack_frame& elt = *p;