diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-01-27 00:49:03 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-01-27 00:49:03 +0000 |
commit | ba9119ec894e7151e50cc5889fe3b6381d096e8c (patch) | |
tree | 5ac96d9ed6f5b575800e2c989c91fdf9a70e88ab /libstdc++-v3 | |
parent | efc8d3d2728b2b6308b8d440b91335af003e8187 (diff) | |
download | gcc-ba9119ec894e7151e50cc5889fe3b6381d096e8c.zip gcc-ba9119ec894e7151e50cc5889fe3b6381d096e8c.tar.gz gcc-ba9119ec894e7151e50cc5889fe3b6381d096e8c.tar.bz2 |
c_locale.cc: Fix throw messages to use the __N marker.
2004-01-26 Paolo Carlini <pcarlini@suse.de>
* config/locale/generic/c_locale.cc: Fix throw messages
to use the __N marker.
* config/locale/gnu/c_locale.cc: Likewise.
* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
Likewise.
* docs/html/17_intro/C++STYLE: Likewise.
* include/bits/basic_ios.tcc: Likewise.
* include/bits/fstream.tcc: Likewise.
* include/bits/vector.tcc: Likewise.
* include/ext/ropeimpl.h: Likewise.
* include/std/std_bitset.h: Likewise.
* src/ios.cc: Likewise.
* src/locale.cc: Likewise.
* src/localename.cc: Likewise.
From-SVN: r76684
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 17 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/generic/c_locale.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/c_locale.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/17_intro/C++STYLE | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/basic_ios.tcc | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/fstream.tcc | 16 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/vector.tcc | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/ropeimpl.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_bitset.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/src/ios.cc | 6 | ||||
-rw-r--r-- | libstdc++-v3/src/locale.cc | 6 | ||||
-rw-r--r-- | libstdc++-v3/src/localename.cc | 2 |
13 files changed, 53 insertions, 32 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e18870b..91b866e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,22 @@ 2004-01-26 Paolo Carlini <pcarlini@suse.de> + * config/locale/generic/c_locale.cc: Fix throw messages + to use the __N marker. + * config/locale/gnu/c_locale.cc: Likewise. + * config/locale/ieee_1003.1-2001/codecvt_specializations.h: + Likewise. + * docs/html/17_intro/C++STYLE: Likewise. + * include/bits/basic_ios.tcc: Likewise. + * include/bits/fstream.tcc: Likewise. + * include/bits/vector.tcc: Likewise. + * include/ext/ropeimpl.h: Likewise. + * include/std/std_bitset.h: Likewise. + * src/ios.cc: Likewise. + * src/locale.cc: Likewise. + * src/localename.cc: Likewise. + +2004-01-26 Paolo Carlini <pcarlini@suse.de> + * include/bits/basic_string.h (_M_replace_aux): Use the __N marker in throw message. * include/bits/basic_string.tcc (assign(const _CharT*, diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc index a214e00..730c366 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.cc +++ b/libstdc++-v3/config/locale/generic/c_locale.cc @@ -152,8 +152,8 @@ namespace std // See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html __cloc = NULL; if (strcmp(__s, "C")) - __throw_runtime_error("locale::facet::_S_create_c_locale " - "name not valid"); + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " + "name not valid")); } void diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc index b808f70..bf975b9 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.cc +++ b/libstdc++-v3/config/locale/gnu/c_locale.cc @@ -100,8 +100,8 @@ namespace std if (!__cloc) { // This named locale is not supported by the underlying OS. - __throw_runtime_error("locale::facet::_S_create_c_locale " - "name not valid"); + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " + "name not valid")); } } diff --git a/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h b/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h index 93d0e5a..efa8c37 100644 --- a/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h +++ b/libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h @@ -130,15 +130,15 @@ { _M_in_desc = iconv_open(_M_int_enc, _M_ext_enc); if (_M_in_desc == __err) - __throw_runtime_error("__enc_traits::_M_init " - "creating iconv input descriptor failed"); + __throw_runtime_error(__N("__enc_traits::_M_init " + "creating iconv input descriptor failed")); } if (!_M_out_desc) { _M_out_desc = iconv_open(_M_ext_enc, _M_int_enc); if (_M_out_desc == __err) - __throw_runtime_error("__enc_traits::_M_init " - "creating iconv output descriptor failed"); + __throw_runtime_error(__N("__enc_traits::_M_init " + "creating iconv output descriptor failed")); } } diff --git a/libstdc++-v3/docs/html/17_intro/C++STYLE b/libstdc++-v3/docs/html/17_intro/C++STYLE index 90dc879..87f53d0 100644 --- a/libstdc++-v3/docs/html/17_intro/C++STYLE +++ b/libstdc++-v3/docs/html/17_intro/C++STYLE @@ -210,7 +210,7 @@ Notable areas of divergence from what may be previous local practice All start with the name of the function where the exception is thrown, and then (optional) descriptive text is added. Example: - __throw_logic_error("basic_string::_S_construct NULL not valid"); + __throw_logic_error(__N("basic_string::_S_construct NULL not valid")); Reason: The verbose terminate handler prints out exception::what(), as well as the typeinfo for the thrown exception. As this is the diff --git a/libstdc++-v3/include/bits/basic_ios.tcc b/libstdc++-v3/include/bits/basic_ios.tcc index 6f690e0..ce7af0d 100644 --- a/libstdc++-v3/include/bits/basic_ios.tcc +++ b/libstdc++-v3/include/bits/basic_ios.tcc @@ -43,7 +43,7 @@ namespace std else _M_streambuf_state = __state | badbit; if (this->exceptions() & this->rdstate()) - __throw_ios_failure("basic_ios::clear"); + __throw_ios_failure(__N("basic_ios::clear")); } template<typename _CharT, typename _Traits> diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index de6379b..f28160c 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -255,9 +255,9 @@ namespace std // codecvt::max_length() is bogus. if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size) { - __throw_ios_failure("basic_filebuf::underflow " + __throw_ios_failure(__N("basic_filebuf::underflow " "codecvt::max_length() " - "is not valid"); + "is not valid")); } streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen); if (__elen == 0) @@ -309,15 +309,15 @@ namespace std // However, reaching it while looping on partial means that // the file has got an incomplete character. if (__r == codecvt_base::partial) - __throw_ios_failure("basic_filebuf::underflow " - "incomplete character in file"); + __throw_ios_failure(__N("basic_filebuf::underflow " + "incomplete character in file")); } else if (__r == codecvt_base::error) - __throw_ios_failure("basic_filebuf::underflow " - "invalid byte sequence in file"); + __throw_ios_failure(__N("basic_filebuf::underflow " + "invalid byte sequence in file")); else - __throw_ios_failure("basic_filebuf::underflow " - "error reading the file"); + __throw_ios_failure(__N("basic_filebuf::underflow " + "error reading the file")); } return __ret; } diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index 6342743..caa2762 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -69,7 +69,7 @@ namespace __gnu_norm reserve(size_type __n) { if (__n > this->max_size()) - __throw_length_error("vector::reserve"); + __throw_length_error(__N("vector::reserve")); if (this->capacity() < __n) { const size_type __old_size = size(); diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index b8357ee..0c92de4 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -1121,7 +1121,7 @@ rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) } if (__result->_M_depth > _RopeRep::_S_max_rope_depth) - __throw_length_error("rope::_S_balance"); + __throw_length_error(__N("rope::_S_balance")); return(__result); } diff --git a/libstdc++-v3/include/std/std_bitset.h b/libstdc++-v3/include/std/std_bitset.h index e649897..04249ec 100644 --- a/libstdc++-v3/include/std/std_bitset.h +++ b/libstdc++-v3/include/std/std_bitset.h @@ -709,7 +709,8 @@ namespace __gnu_norm size_t __position = 0) : _Base() { if (__position > __s.size()) - __throw_out_of_range("bitset::bitset initial position not valid"); + __throw_out_of_range(__N("bitset::bitset initial position " + "not valid")); _M_copy_from_string(__s, __position, basic_string<_CharT, _Traits, _Alloc>::npos); } @@ -728,7 +729,8 @@ namespace __gnu_norm size_t __position, size_t __n) : _Base() { if (__position > __s.size()) - __throw_out_of_range("bitset::bitset initial position not valid"); + __throw_out_of_range(__N("bitset::bitset initial position " + "not valid")); _M_copy_from_string(__s, __position, __n); } @@ -1070,7 +1072,8 @@ namespace __gnu_norm template<size_t _Nb> template<class _CharT, class _Traits, class _Alloc> void - bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, size_t __pos, size_t __n) + bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT, _Traits, + _Alloc>& __s, size_t __pos, size_t __n) { reset(); const size_t __nbits = std::min(_Nb, std::min(__n, __s.size() - __pos)); @@ -1084,7 +1087,7 @@ namespace __gnu_norm set(__i); break; default: - __throw_invalid_argument("bitset::_M_copy_from_string"); + __throw_invalid_argument(__N("bitset::_M_copy_from_string")); } } } @@ -1092,7 +1095,8 @@ namespace __gnu_norm template<size_t _Nb> template<class _CharT, class _Traits, class _Alloc> void - bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const + bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits, + _Alloc>& __s) const { __s.assign(_Nb, '0'); for (size_t __i = 0; __i < _Nb; ++__i) diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc index b36165e..0dec323 100644 --- a/libstdc++-v3/src/ios.cc +++ b/libstdc++-v3/src/ios.cc @@ -163,8 +163,8 @@ namespace std { _M_streambuf_state |= badbit; if (_M_streambuf_state & _M_exception) - __throw_ios_failure("ios_base::_M_grow_words " - "allocation failed"); + __throw_ios_failure(__N("ios_base::_M_grow_words " + "allocation failed")); return _M_word_zero; } for (int i = 0; i < _M_word_size; i++) @@ -179,7 +179,7 @@ namespace std { _M_streambuf_state |= badbit; if (_M_streambuf_state & _M_exception) - __throw_ios_failure("ios_base::_M_grow_words is not valid"); + __throw_ios_failure(__N("ios_base::_M_grow_words is not valid")); return _M_word_zero; } } diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index c9562e2..4e1aebb 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -141,8 +141,8 @@ namespace std __ret = all; break; default: - __throw_runtime_error("locale::_S_normalize_category " - "category not found"); + __throw_runtime_error(__N("locale::_S_normalize_category " + "category not found")); } } return __ret; @@ -264,7 +264,7 @@ namespace std { size_t __index = __idp->_M_id(); if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index]) - __throw_runtime_error("locale::_Impl::_M_replace_facet"); + __throw_runtime_error(__N("locale::_Impl::_M_replace_facet")); _M_install_facet(__idp, __imp->_M_facets[__index]); } diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index c6a7de9..4cd1af1 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -144,7 +144,7 @@ namespace std } } else - __throw_runtime_error("locale::locale NULL not valid"); + __throw_runtime_error(__N("locale::locale NULL not valid")); } locale::locale(const locale& __base, const char* __s, category __cat) |