diff options
author | John Wiegley <johnw@newartisans.com> | 2011-07-17 16:22:14 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2011-07-17 16:22:14 -0500 |
commit | 8da603cb813022bdf37ad0951ee6935a91557a04 (patch) | |
tree | 185bc7b35165f2481e46c29dfd3177e80fc3e4eb /src/value.cc | |
parent | 60cc99ee057d3627a24f5ba98076cb6f46a3907c (diff) | |
download | fork-ledger-8da603cb813022bdf37ad0951ee6935a91557a04.tar.gz fork-ledger-8da603cb813022bdf37ad0951ee6935a91557a04.tar.bz2 fork-ledger-8da603cb813022bdf37ad0951ee6935a91557a04.zip |
Correct argument order for several exceptions
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/value.cc b/src/value.cc index c34792b2..f6ce54e7 100644 --- a/src/value.cc +++ b/src/value.cc @@ -333,7 +333,7 @@ value_t& value_t::operator+=(const value_t& val) for (; i != end(); i++, j++) *i += *j; } else { - add_error_context(_("While adding %1 to %2:") << *this << val); + add_error_context(_("While adding %1 to %2:") << val << *this); throw_(value_error, _("Cannot add sequences of different lengths")); } } else { @@ -446,7 +446,7 @@ value_t& value_t::operator+=(const value_t& val) break; } - add_error_context(_("While adding %1 to %2:") << *this << val); + add_error_context(_("While adding %1 to %2:") << val << *this); throw_(value_error, _("Cannot add %1 to %2") << val.label() << label()); return *this; @@ -465,7 +465,7 @@ value_t& value_t::operator-=(const value_t& val) for (; i != end(); i++, j++) *i -= *j; } else { - add_error_context(_("While subtracting %1 to %2:") << *this << val); + add_error_context(_("While subtracting %1 from %2:") << val << *this); throw_(value_error, _("Cannot subtract sequences of different lengths")); } } else { @@ -588,7 +588,7 @@ value_t& value_t::operator-=(const value_t& val) break; } - add_error_context(_("While subtracting %1 from %2:") << *this << val); + add_error_context(_("While subtracting %1 from %2:") << val << *this); throw_(value_error, _("Cannot subtract %1 from %2") << val.label() << label()); return *this; @@ -670,7 +670,7 @@ value_t& value_t::operator*=(const value_t& val) break; } - add_error_context(_("While multiplying %1 with %2:") << *this << val); + add_error_context(_("While multiplying %1 with %2:") << val << *this); throw_(value_error, _("Cannot multiply %1 with %2") << label() << val.label()); return *this; @@ -748,7 +748,7 @@ value_t& value_t::operator/=(const value_t& val) break; } - add_error_context(_("While dividing %1 by %2:") << *this << val); + add_error_context(_("While dividing %1 by %2:") << val << *this); throw_(value_error, _("Cannot divide %1 by %2") << label() << val.label()); return *this; @@ -834,7 +834,7 @@ bool value_t::is_equal_to(const value_t& val) const break; } - add_error_context(_("While comparing equality of %1 to %2:") << *this << val); + add_error_context(_("While comparing equality of %1 and %2:") << *this << val); throw_(value_error, _("Cannot compare %1 to %2") << label() << val.label()); return *this; @@ -1263,8 +1263,8 @@ void value_t::in_place_cast(type_t cast_type) } add_error_context(_("While converting %1:") << *this); - throw_(value_error, - _("Cannot convert %1 to %2") << label() << label(cast_type)); + throw_(value_error, _("Cannot convert %1 to %2") + << label() << label(cast_type)); } void value_t::in_place_negate() |