Mercurial > octave
comparison libinterp/octave-value/ov-classdef.cc @ 21102:dfcb9d74b253
Rename local gripe_XXX functions to err_XXX or warn_XXX.
* graphics.cc (err_set_invalid): Add OCTAVE_NORETURN attribute.
* graphisc.cc: Rename gripe_set_invalid to err_set_invalid.
* jit-typeinfo.cc (err_bad_result): Rename from gripe_bad_result.
* load-save.cc (err_file_open): Rename from gripe_file_open.
* ls-mat5.cc (warn_dim_too_large): Rename from gripe_dim_too_large.
* oct-stream.cc (err_invalid_file_id): Rename from gripe_invalid_file_id.
* txt-eng-ft.cc (warn_missing_glyph, warn_glyph_render): Rename from
gripe_missing_glyph, gripe_glyph_render.
* xpow.cc: Add FIXME about strange gripe_failed_diagonalization function.
* ov-base-int.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-bool.cc, ov-cell.cc,
ov-class.cc, ov-complex.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-mat.cc,
ov-flt-re-mat.cc, ov-range.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-scalar.cc,
ov-str-mat.cc, ov-struct.cc
(warn_load, warn_save):
ov-base.cc (warn_load, warn_save, err_indexed_assignment,
err_assign_conversion_failed, err_no_conversion): Rename from gripe_XXX
version.
* ov-base.h (warn_load, warn_save): Rename from gripe_load, gripe_save.
* ov-classdef.cc (err_method_access, err_property_access): Rename from
gripe_method_access, gripe_property_access.
* ov-classdef.h (err_invalid_object): Rename from gripe_invalid_object.
* ov-oncleanup.h (gripe_internal): Delete function. Place single calling
instance directly in code.
* ov.cc (err_binary_op, err_binary_op_conv, err_unary_op, err_unary_op_conv,
err_unary_op_conversion_failed): Add OCTAVE_NORETURN attribute. Rename from
gripe_XXX.
* ov.cc (err_cat_op, err_cat_op_conv, ): Rename from gripe_XXX.
* lex.h (warn_single_quote_string, warn_language_extension,
maybe_warn_language_extension_comment, warn_language_extension_continuation,
warn_language_extension_operator): Rename from gripe_XXX.
* lex.ll (warn_single_quote_string, warn_language_extension,
maybe_warn_language_extension_comment, warn_language_extension_continuation,
warn_language_extension_operator): Rename from gripe_XXX.
* pt-check.cc (errmsg): Rename from gripe.
* pt-check.h (errmsg): Add OCTAVE_NORETURN attribute. Rename from gripe.
* PermMatrix.cc (err_invalid_permutation): Add OCTAVE_NORETURN attribute.
Rename from gripe_invalid_permutation.
* idx-vector.cc (err_invalid_range): Add OCTAVE_NORETURN attribute.
Rename from gripe_invalid_range.
liboctave/numeric/lo-specfun.cc (err_betainc_nonconformant): Add
OCTAVE_NORETURN attribute. Rename from gripe_betainc_nonconformant.
* oct-group.cc (err_invalid): New static function.
* oct-group.h (gripe_invalid): Delete private function.
* oct-passwd.cc (err_invalid): New static function.
* oct-passwd.h (gripe_invalid): Delete private function.
* data-conv.cc (err_unrecognized_float_fmt): Add OCTAVE_NORETURN attribute.
Rename from gripe_unrecognized_float_fmt.
* lo-cutils.c (warn_missing_wait_macro): Rename from gripe_missing_wait_macro.
* unwind-prot.cc (err_unhandled_exception): Rename from gripe_exception.
* unwind-prot.h (err_unhandled_exception): Rename from gripe_exception.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 18 Jan 2016 21:06:26 -0800 |
parents | 5e00ed38a58b |
children | f5b17eb2508b |
comparison
equal
deleted
inserted
replaced
21101:2e8aea678f2a | 21102:dfcb9d74b253 |
---|---|
48 // Define to 1 to enable debugging statements. | 48 // Define to 1 to enable debugging statements. |
49 #define DEBUG_TRACE 0 | 49 #define DEBUG_TRACE 0 |
50 | 50 |
51 OCTAVE_NORETURN static | 51 OCTAVE_NORETURN static |
52 void | 52 void |
53 gripe_method_access (const std::string& from, const cdef_method& meth) | 53 err_method_access (const std::string& from, const cdef_method& meth) |
54 { | 54 { |
55 octave_value acc = meth.get ("Access"); | 55 octave_value acc = meth.get ("Access"); |
56 std::string acc_s; | 56 std::string acc_s; |
57 | 57 |
58 if (acc.is_string ()) | 58 if (acc.is_string ()) |
64 from.c_str (), meth.get_name ().c_str (), acc_s.c_str ()); | 64 from.c_str (), meth.get_name ().c_str (), acc_s.c_str ()); |
65 } | 65 } |
66 | 66 |
67 OCTAVE_NORETURN static | 67 OCTAVE_NORETURN static |
68 void | 68 void |
69 gripe_property_access (const std::string& from, const cdef_property& prop, | 69 err_property_access (const std::string& from, const cdef_property& prop, |
70 bool is_set = false) | 70 bool is_set = false) |
71 { | 71 { |
72 octave_value acc = prop.get (is_set ? "SetAccess" : "GetAccess"); | 72 octave_value acc = prop.get (is_set ? "SetAccess" : "GetAccess"); |
73 std::string acc_s; | 73 std::string acc_s; |
74 | 74 |
2909 const std::string& who) | 2909 const std::string& who) |
2910 { | 2910 { |
2911 octave_value retval; | 2911 octave_value retval; |
2912 | 2912 |
2913 if (do_check_access && ! check_get_access ()) | 2913 if (do_check_access && ! check_get_access ()) |
2914 gripe_property_access (who, wrap (), false); | 2914 err_property_access (who, wrap (), false); |
2915 | 2915 |
2916 if (! obj.is_constructed ()) | 2916 if (! obj.is_constructed ()) |
2917 { | 2917 { |
2918 cdef_class cls (to_cdef (get ("DefiningClass"))); | 2918 cdef_class cls (to_cdef (get ("DefiningClass"))); |
2919 | 2919 |
2945 octave_value | 2945 octave_value |
2946 cdef_property::cdef_property_rep::get_value (bool do_check_access, | 2946 cdef_property::cdef_property_rep::get_value (bool do_check_access, |
2947 const std::string& who) | 2947 const std::string& who) |
2948 { | 2948 { |
2949 if (do_check_access && ! check_get_access ()) | 2949 if (do_check_access && ! check_get_access ()) |
2950 gripe_property_access (who, wrap (), false); | 2950 err_property_access (who, wrap (), false); |
2951 | 2951 |
2952 return get ("DefaultValue"); | 2952 return get ("DefaultValue"); |
2953 } | 2953 } |
2954 | 2954 |
2955 bool | 2955 bool |
2964 const octave_value& val, | 2964 const octave_value& val, |
2965 bool do_check_access, | 2965 bool do_check_access, |
2966 const std::string& who) | 2966 const std::string& who) |
2967 { | 2967 { |
2968 if (do_check_access && ! check_set_access ()) | 2968 if (do_check_access && ! check_set_access ()) |
2969 gripe_property_access (who, wrap (), true); | 2969 err_property_access (who, wrap (), true); |
2970 | 2970 |
2971 if (! obj.is_constructed ()) | 2971 if (! obj.is_constructed ()) |
2972 { | 2972 { |
2973 cdef_class cls (to_cdef (get ("DefiningClass"))); | 2973 cdef_class cls (to_cdef (get ("DefiningClass"))); |
2974 | 2974 |
3081 const std::string& who) | 3081 const std::string& who) |
3082 { | 3082 { |
3083 octave_value_list retval; | 3083 octave_value_list retval; |
3084 | 3084 |
3085 if (do_check_access && ! check_access ()) | 3085 if (do_check_access && ! check_access ()) |
3086 gripe_method_access (who, wrap ()); | 3086 err_method_access (who, wrap ()); |
3087 | 3087 |
3088 if (get ("Abstract").bool_value ()) | 3088 if (get ("Abstract").bool_value ()) |
3089 error ("%s: cannot execute abstract method", | 3089 error ("%s: cannot execute abstract method", |
3090 get ("Name").string_value ().c_str ()); | 3090 get ("Name").string_value ().c_str ()); |
3091 | 3091 |
3104 const std::string& who) | 3104 const std::string& who) |
3105 { | 3105 { |
3106 octave_value_list retval; | 3106 octave_value_list retval; |
3107 | 3107 |
3108 if (do_check_access && ! check_access ()) | 3108 if (do_check_access && ! check_access ()) |
3109 gripe_method_access (who, wrap ()); | 3109 err_method_access (who, wrap ()); |
3110 | 3110 |
3111 if (get ("Abstract").bool_value ()) | 3111 if (get ("Abstract").bool_value ()) |
3112 error ("%s: cannot execute abstract method", | 3112 error ("%s: cannot execute abstract method", |
3113 get ("Name").string_value ().c_str ()); | 3113 get ("Name").string_value ().c_str ()); |
3114 | 3114 |