Mercurial > hg > octave-lyh
diff src/pt-select.cc @ 8011:3100283874d7
improve backtrace error messages
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Aug 2008 23:09:32 -0400 |
parents | 71f068b22fcc |
children | 8302788f09db |
line wrap: on
line diff
--- a/src/pt-select.cc +++ b/src/pt-select.cc @@ -124,10 +124,6 @@ { if (list) list->eval (); - - if (error_state) - ::error ("evaluating if command near line %d, column %d", - line (), column ()); } tree_command * @@ -195,10 +191,7 @@ bool match = equal (val, cell(i,j)); if (error_state) - { - eval_error (); - return false; - } + return false; else if (match) return true; } @@ -209,16 +202,11 @@ bool match = equal (val, label_value); if (error_state) - { - eval_error (); - return false; - } + return false; else return match; } } - else - eval_error (); return false; } @@ -239,12 +227,6 @@ return retval; } -void -tree_switch_case::eval_error (void) -{ - ::error ("evaluating switch case label"); -} - tree_switch_case * tree_switch_case::dup (symbol_table::scope_id scope, symbol_table::context_id context) @@ -313,29 +295,14 @@ { octave_value val = expr->rvalue (); - if (! error_state) - { - if (list) - list->eval (val); - - if (error_state) - eval_error (); - } - else - eval_error (); + if (! error_state && list) + list->eval (val); } else ::error ("missing value in switch command near line %d, column %d", line (), column ()); } -void -tree_switch_command::eval_error (void) -{ - ::error ("evaluating switch command near line %d, column %d", - line (), column ()); -} - tree_command * tree_switch_command::dup (symbol_table::scope_id scope, symbol_table::context_id context)