lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 2fc9371 4/7: Use (default_)error_prefix in ot


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2fc9371 4/7: Use (default_)error_prefix in other appropriate cases
Date: Thu, 9 Feb 2017 19:49:26 -0500 (EST)

branch: master
commit 2fc937146ad8f079403693de6c85cefed340f9e7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use (default_)error_prefix in other appropriate cases
    
    Use default_error_prefix where literal asterisks had formerly been used.
    Specifically use default_error_prefix instead of error_prefix for these
    particular messages because they follow all client-defined tests and
    therefore should never be overridden. This commit makes it possible to
    replace each asterisk with another character, uniformly and robustly.
    
    The "see stdout" message's suffixed asterisks were simply removed (there
    is no need for any "error_suffix"); where its prefix had distinctively
    more asterisks than other messages, default_error_prefix is inserted
    twice, with a comment indicating that that is not a cut-and-pasto.
---
 catch_exceptions.hpp | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/catch_exceptions.hpp b/catch_exceptions.hpp
index d55dc2b..9e29a42 100644
--- a/catch_exceptions.hpp
+++ b/catch_exceptions.hpp
@@ -78,7 +78,13 @@ namespace lmi_test
         ,char const*   name
         ,char const*   info
         )
-      {os << "\n** uncaught exception: " << name << " " << info << std::endl;}
+      {
+      os
+          << "\n" << default_error_prefix
+          << "uncaught exception: " << name << " " << info
+          << std::endl
+          ;
+      }
   } // namespace detail
 
   // catch_exceptions  ------------------------------------------------------//
@@ -154,11 +160,13 @@ namespace lmi_test
             {
             out
                 << std::endl
-                << "**** returning with error code " << result
+                << default_error_prefix
+                << "returning with error code " << result
                 << std::endl
                 ;
             err
-                << "**********  errors detected; see stdout for details  
***********"
+                << default_error_prefix << default_error_prefix // Yes, twice.
+                << "errors detected; see stdout for details"
                 << std::endl
                 ;
             }



reply via email to

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