OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.128 and 1.129
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.128 -> 1.129

--- as_slot.cpp  2003/02/19 18:23:16     1.128
+++ as_slot.cpp  2003/02/20 16:46:38     1.129
@@ -1558,12 +1558,16 @@
 //
 void Titraqform::genReport(void)
 {
-    Reportpanel *pReport = NULL;    // The local report panel
-
-    // Create a new local report window
-    pReport = new Reportpanel(m_pMaintable, m_pPrefs, this, "Locreportpanel");
-    pReport->exec();    // Modal panel handler
-    delete pReport;     // Dispose Panel object
+    try { // Create and execute a new local report window
+        std::auto_ptr<AS::Reportpanel> pReport(new AS::Reportpanel
+            (m_pMaintable, m_pPrefs, this, "Locreportpanel"));
+        pReport->exec();
+        delete pReport.release(); // Technically unnecessary, smart pointer
+    }
+    catch (Genexcept& Genex) {
+        Genex.reportErr();
+        return;
+    }
 }
 
 //

CVSTrac 2.0.1