[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.");
}
}
- [lmi-commits] [lmi] master updated (d9f9215 -> f4580cf), Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master 035e5a0 2/9: Simplify, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master afdbbeb 6/9: Consolidate commentary, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master 38df10a 4/9: Simplify diagnostics,
Greg Chicares <=
- [lmi-commits] [lmi] master 6586cab 1/9: Simplify, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master ecd1362 3/9: Shorten diagnostics, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master 783f4dd 5/9: Consolidate and revise documentation, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master f4580cf 9/9: Don't ref-qualify save(), Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master 5d225f5 7/9: Move commentary to point of member-function definition, Greg Chicares, 2018/04/04
- [lmi-commits] [lmi] master f5651d1 8/9: Prevent save() from being called twice, Greg Chicares, 2018/04/04