lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 38df10a 4/9: Simplify diagnostics


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 38df10a 4/9: Simplify diagnostics
Date: Wed, 4 Apr 2018 21:27:37 -0400 (EDT)

branch: master
commit 38df10aea7d2a007d2dae4c9c1c880ab60cd4a0d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Simplify diagnostics
    
    The argument for simpler diagnostics in the preceding commit applies
    here, but there is a stronger reason in this case: construction of the
    replaced diagnostic message could throw, causing an exception to escape
    from a destructor.
---
 pdf_writer_wx.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index e25408f..ffff225 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -34,7 +34,6 @@
 
 #include <exception>                    // uncaught_exceptions()
 #include <limits>
-#include <sstream>
 
 namespace
 {
@@ -272,12 +271,6 @@ pdf_writer_wx::~pdf_writer_wx()
     // would just result in incorrectly skipping the check, i.e. not critical.
     if(!std::uncaught_exceptions() && !save_has_been_called_)
         {
-        std::ostringstream oss;
-        oss
-            << "Please report this: PDF file \""
-            << print_data_.GetFilename().ToStdString(wxConvUTF8)
-            << "\" was not saved."
-            ;
-        safely_show_message(oss.str());
+        safely_show_message("Please report this: save() not called for PDF.");
         }
 }



reply via email to

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