From d35fd10cd8dbc2aea8dfa0e6842c66693a829e4a Mon Sep 17 00:00:00 2001 From: "Frank B. Brokken" Date: Wed, 5 May 2010 15:50:00 +0000 Subject: [PATCH] Repaired Typos etc. git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@454 f6dd340e-d3f9-0310-b409-bdd246841980 --- yo/exceptions/guarantees.yo | 11 ++++++----- yo/exceptions/standard.yo | 7 +++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yo/exceptions/guarantees.yo b/yo/exceptions/guarantees.yo index 0a009662..90d80f51 100644 --- a/yo/exceptions/guarantees.yo +++ b/yo/exceptions/guarantees.yo @@ -3,9 +3,10 @@ according to its specifications in the face of exceptions. It is not always easy to realize exception safety. In this section some guidelines and terminology is introduced when discussing exception safety. -Since exceptions may be generated from within all bf(C++) functions exceptions -may be generated in many situations, not all of which will be immediately and -intuitively clear. Consider the following function and ask yourself at which +Since exceptions may be generated from within all bf(C++) functions, +exceptions may be generated in many situations. Not all of these situations +will be immediately and intuitively recognized as situations where exceptions +can be thrown. Consider the following function and ask yourself at which points exceptions may be thrown: verb( void fun() @@ -30,8 +31,8 @@ and operator new (#5a) too. But did you realize that this latter exception might not be thrown from tt(::new), but from, e.g., tt(X)'s own overload of tt(operator new)? (#5b) it() tt(cout << (x + *xp)): we might be seduced into thinking that two -tt(X) objects are added it doesn't need to be that way. A separate class Y -might exist and tt(X) may have a conversion operator tt(operator Y() const), +tt(X) objects are added. But it doesn't have to be that way. A separate class +Y might exist and tt(X) may have a conversion operator tt(operator Y() const), and tt(operator+(Y const &lhs, X const &rhs), operator+(X const &lhs, Y const &rhs)), and tt(operator+(X const &lhs, X const &rhs)) might all exist. So, if the conversion operator exists, then depending on the kind of overload of diff --git a/yo/exceptions/standard.yo b/yo/exceptions/standard.yo index 1213d5b1..965a487e 100644 --- a/yo/exceptions/standard.yo +++ b/yo/exceptions/standard.yo @@ -48,10 +48,9 @@ value by a very small value; itht(range_error)(std::range_error): a range error should be thrown when an internal computation results in a value exceeding a permissible range; itht(runtime_error)(std::runtime_error): a runtime error should be thrown -when a problem is detected the program cannot easily be caught by syntactic -analysis of the program but are usually only detected during the program's -execution. Example: a non-integral is entered when the program's input expects -an integral value. +when a problem is encountered that can only be detected while the program is +being executed. Example: a non-integral is entered when the program's input +expects an integral value. itht(underflow_error)(std::underflow_error): an underflow error should be thrown when an arithmetic underflow is detected. Example: dividing a very small value by a very large value.