I want to have a sub folder of application data for my app storage. In App::OnLaunched, I do this :
try {
create_task(localFolder->GetFolderAsync(L"anyname")).then([this](StorageFolder^ f) {
m_dlyfolder = f;
});
}
catch(...)
{
try {
create_task(localFolder->CreateFolderAsync(L"anyname")).then([this](StorageFolder^ f){
m_dlyfolder = f;
});
}
catch(...)
{
String^ msg = e->Message;
OutputDebugString(msg->Data());
}
};
It works well, creating the subfolder on first run and getting it on the next sessions.
I would like to check which exceptions I get when CreateFolderAsync or GetFolderAsync fails, and it's not an Exception^.
What should I put in the catch() instead of "..."?