| 401 | } |
| 402 | |
| 403 | void XMLFileWriter::Write(const wxString &data) |
| 404 | // may throw |
| 405 | { |
| 406 | if (!wxFFile::Write(data, wxConvUTF8) || Error()) |
| 407 | { |
| 408 | // When writing fails, we try to close the file before throwing the |
| 409 | // exception, so it can at least be deleted. |
| 410 | wxFFile::Close(); |
| 411 | ThrowException( GetName(), mCaption ); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | /// |
| 416 | /// XMLStringWriter class |
no test coverage detected