Update of /cvsroot/audacity/audacity-src/src/effects
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14899/effects
Modified Files:
Equalization.cpp
Log Message:
* XMLFileWriter now throws an exception if writing the .xml file fails
* Add error checking (exception handling) to most places where XML files are
written
* If the new .aup file was successfully saved, delete the old .aup.bak file in
order not to confuse users
* Never open .aup.bak files, show an informational message instead
Index: Equalization.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Equalization.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- Equalization.cpp 2 Apr 2009 23:04:51 -0000 1.90
+++ Equalization.cpp 1 May 2009 18:26:33 -0000 1.91
@@ -1079,22 +1079,26 @@
// Create/Open the file
XMLFileWriter eqFile;
- eqFile.Open( fn.GetFullPath(), wxT("wb") );
- // Complain if open failed
- if( !eqFile.IsOpened() )
+ try
{
- // Constructor will emit message
- return;
- }
+ eqFile.Open( fn.GetFullPath(), wxT("wb") );
- // Write the curves
- WriteXML( eqFile );
+ // Write the curves
+ WriteXML( eqFile );
- // Close the file
- eqFile.Close();
+ // Close the file
+ eqFile.Close();
+ }
+ catch (XMLFileWriterException* pException)
+ {
+ wxMessageBox(wxString::Format(
+ _("Couldn't write to file \"%s\": %s"),
+ fn.GetFullPath().c_str(), pException->GetMessage().c_str()),
+ _("Error saving equalization curves"), wxICON_ERROR, this);
- return;
+ delete pException;
+ }
}
//
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs