Catch exception thrown by SMF code when it cannot write

to a file (#4640).


git-svn-id: svn://localhost/ardour2/branches/3.0@11259 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-01-18 02:10:40 +00:00
parent f9a3f741bf
commit 9237c7411c
3 changed files with 13 additions and 3 deletions

View file

@ -354,11 +354,11 @@ SMF::end_write() THROW_FILE_ERROR
PBD::StdioFileDescriptor d (_file_path, "w+");
FILE* f = d.allocate ();
if (f == 0) {
throw FileError ();
throw FileError (_file_path);
}
if (smf_save(_smf, f) != 0) {
throw FileError();
throw FileError (_file_path);
}
}