diff libinterp/corefcn/toplev.cc @ 20652:7a8096f8df5d

more cleanup of indexing exceptions * data.cc (index_error): New function. (Fnth_element, F__accumarray_sum__, __accumdim_sum__): Use it. * lo-array-gripes.h, lo-array-gripes.cc (index_exception::message): Rename from index_exception::err. Return std::string instead of const char *. Change all uses. (index_exception::expression): Rename from index_exception::access. (index_exception::index_exception, invalid_index::invalid_index, out_of_range::out_of_range): Accept const string& instead of const char *. Change all uses. (invalid_index::details): Rename from invalid_index::explain. Return std::string instead of const char *. Change all uses. (invalid_index::err_idx): Rename from invalid_index::id. Return std::string instead of const char *. Change all uses. (gripe_invalid_index): Accept const std::string& argument instead of const char *. (index_exception::~index_exception): Don't declare with "throw ()". (index_exception::details): Rename from index_exception::explain. Return std::string instead of const char *. Change all uses. (index_exception::err_idx): Rename from index_exception::id. Return std::string instead of const char *. Change all uses. (index_exception::idx): Return std::string instead of const char *. Change all uses. (index_exception::err_id): Rename from index_exception::id. (index_exception::msg): Delete member variable. (index_expression::expression): Rename from index_expression::access. Change all uses.
author John W. Eaton <jwe@octave.org>
date Wed, 21 Oct 2015 23:43:46 -0400
parents c1d94e5cd5ea
children e0e2c2ce7e94
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.cc	Wed Oct 21 15:23:08 2015 -0400
+++ b/libinterp/corefcn/toplev.cc	Wed Oct 21 23:43:46 2015 -0400
@@ -662,7 +662,7 @@
         {
           recover_from_exception ();
           std::cerr << "error: unhandled index exception: "
-                    << e.err () << " -- trying to return to prompt"
+                    << e.message () << " -- trying to return to prompt"
                     << std::endl;
         }
       catch (const octave_execution_exception&)