[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] File open fails with error message; re-open does nothing
From: |
Václav Slavík |
Subject: |
Re: [lmi] File open fails with error message; re-open does nothing |
Date: |
Sat, 5 May 2012 19:28:08 +0200 |
Hi,
On 5 May 2012, at 13:59, Greg Chicares wrote:
> Am I somehow misusing the wx doc-view framework, so that lmi thinks
> the erroneous file is open when it is not?
It's another place where wx is not exceptions-safe. Even though
IllustrationDocument::OnCreate() throws, the document is still created
internally by wx.
This should be fixed in wx, see http://review.bakefile.org/r/414/
It can also be fixed in LMI by ensuring that the OnCreate() implementations
don't throw:
bool IllustrationDocument::OnCreate(wxString const& filename, long int flags)
{
try
{
// ...current OnCreate body...
}
catch(...)
{
report_exception();
return false;
}
}
Regards,
Vaclav