Skip to content

Commit

Permalink
Log warning about failing to load images that are cloud files that ar…
Browse files Browse the repository at this point in the history
…en't available

This happens when you try to open a file, but aren't connected to the internet and the file is only available via the cloud service.
  • Loading branch information
Blake-Madden committed Sep 29, 2023
1 parent 78b7b13 commit 3b68528
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/base/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,15 @@ namespace Wisteria::GraphItems

return image;
}
// weird exception that auto-buffering won't help, so explain it to the user
catch (const MemoryMappedFileCloudFileError&)
{
wxLogWarning(
wxString::Format(_(L"%s: unable to open file from Cloud service."),
filePath),
_(L"Error"), wxOK|wxICON_EXCLAMATION);
return wxNullImage;
}
catch (...)
{ return wxNullImage; }
}
Expand Down

0 comments on commit 3b68528

Please sign in to comment.