lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 515cb51 2/5: Rename a function


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 515cb51 2/5: Rename a function
Date: Thu, 19 Nov 2020 19:00:12 -0500 (EST)

branch: master
commit 515cb51b0e4ee68016efee9dbb5ce9b117859146
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Rename a function
    
    Two report_exception() functions was one too many.
    
    Incidentally shortened an 81-character line.
---
 catch_exceptions.hpp | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/catch_exceptions.hpp b/catch_exceptions.hpp
index 19c0482..9474ba9 100644
--- a/catch_exceptions.hpp
+++ b/catch_exceptions.hpp
@@ -73,7 +73,7 @@ namespace lmi_test
   namespace detail
   {
     // A separate reporting function was requested during formal review.
-    inline void report_exception
+    inline void herald_exception
         (std::ostream& os
         ,char const*   name
         ,char const*   info
@@ -117,42 +117,42 @@ namespace lmi_test
     // required, but it doesn't hurt and some programmers ask for it.
 
         catch(char const*& e)
-            {detail::report_exception(out, ""                      , e);}
+            {detail::herald_exception(out, ""                      , e);}
         catch(std::string const& e)
-            {detail::report_exception(out, ""                      , 
e.c_str());}
+            {detail::herald_exception(out, ""                      
,e.c_str());}
 
         // std:: exceptions
         catch(std::bad_alloc const& e)
-            {detail::report_exception(out, "std::bad_alloc:"       , 
e.what());}
+            {detail::herald_exception(out, "std::bad_alloc:"       , 
e.what());}
         catch(std::bad_cast const& e)
-            {detail::report_exception(out, "std::bad_cast:"        , 
e.what());}
+            {detail::herald_exception(out, "std::bad_cast:"        , 
e.what());}
         catch(std::bad_typeid const& e)
-            {detail::report_exception(out, "std::bad_typeid:"      , 
e.what());}
+            {detail::herald_exception(out, "std::bad_typeid:"      , 
e.what());}
         catch(std::bad_exception const& e)
-            {detail::report_exception(out, "std::bad_exception:"   , 
e.what());}
+            {detail::herald_exception(out, "std::bad_exception:"   , 
e.what());}
         catch(std::domain_error const& e)
-            {detail::report_exception(out, "std::domain_error:"    , 
e.what());}
+            {detail::herald_exception(out, "std::domain_error:"    , 
e.what());}
         catch(std::invalid_argument const& e)
-            {detail::report_exception(out, "std::invalid_argument:", 
e.what());}
+            {detail::herald_exception(out, "std::invalid_argument:", 
e.what());}
         catch(std::length_error const& e)
-            {detail::report_exception(out, "std::length_error:"    , 
e.what());}
+            {detail::herald_exception(out, "std::length_error:"    , 
e.what());}
         catch(std::out_of_range const& e)
-            {detail::report_exception(out, "std::out_of_range:"    , 
e.what());}
+            {detail::herald_exception(out, "std::out_of_range:"    , 
e.what());}
         catch(std::range_error const& e)
-            {detail::report_exception(out, "std::range_error:"     , 
e.what());}
+            {detail::herald_exception(out, "std::range_error:"     , 
e.what());}
         catch(std::overflow_error const& e)
-            {detail::report_exception(out, "std::overflow_error:"  , 
e.what());}
+            {detail::herald_exception(out, "std::overflow_error:"  , 
e.what());}
         catch(std::underflow_error const& e)
-            {detail::report_exception(out, "std::underflow_error:" , 
e.what());}
+            {detail::herald_exception(out, "std::underflow_error:" , 
e.what());}
         catch(std::logic_error const& e)
-            {detail::report_exception(out, "std::logic_error:"     , 
e.what());}
+            {detail::herald_exception(out, "std::logic_error:"     , 
e.what());}
         catch(std::runtime_error const& e)
-            {detail::report_exception(out, "std::runtime_error:"   , 
e.what());}
+            {detail::herald_exception(out, "std::runtime_error:"   , 
e.what());}
         catch(std::exception const& e)
-            {detail::report_exception(out, "std::exception:"       , 
e.what());}
+            {detail::herald_exception(out, "std::exception:"       , 
e.what());}
 
         catch(...)
-            {detail::report_exception(out, "unknown exception"     , "");}
+            {detail::herald_exception(out, "unknown exception"     , "");}
 
         if(exception_thrown) result = lmi_test::exit_exception_failure;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]