Following on from a question about handling-com-exceptions-busy-codes handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the Excel COM object model:
private void AskExcelToDoSomething()
{
bool retry = true;
do
{
try
{
// Call Excel OM
retry = false;
}
catch (COMException e)
{}
} while (retry);
}
Assuming that IMessageFilter has been implemented and catches the errors for which it is intended and retries, is the above model the 'accepted' way of handling these busy exceptions? If so, is it not vulnerable to hanging if for some reason it keeps being rejected? Is there no better way of doing this that guarantees success?
Following on from a question about handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the Excel COM object model:
private void AskExcelToDoSomething()
{
bool retry = true;
do
{
try
{
// Call Excel OM
retry = false;
}
catch (COMException e)
{}
} while (retry);
}
Assuming that IMessageFilter has been implemented and catches the errors for which it is intended and retries, is the above model the 'accepted' way of handling these busy exceptions? If so, is it not vulnerable to hanging if for some reason it keeps being rejected? Is there no better way of doing this that guarantees success?
Following on from a question about handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the Excel COM object model:
private void AskExcelToDoSomething()
{
bool retry = true;
do
{
try
{
// Call Excel OM
retry = false;
}
catch (COMException e)
{}
} while (retry);
}
Assuming that IMessageFilter has been implemented and catches the errors for which it is intended and retries, is the above model the 'accepted' way of handling these busy exceptions? If so, is it not vulnerable to hanging if for some reason it keeps being rejected? Is there no better way of doing this that guarantees success?
Is brute force the accepted best practice for handling Excel COM 'busy' exceptions?
Following on from a question about handling-com-exceptions-busy-codes I would like to know if the following model is the accepted best practice of handling Excel COM busy messages when accessing the Excel COM object model:
private void AskExcelToDoSomething()
{
bool retry = true;
do
{
try
{
// Call Excel OM
retry = false;
}
catch (COMException e)
{}
} while (retry);
}
Assuming that IMessageFilter has been implemented and catches the errors for which it is intended and retries, is the above model the 'accepted' way of handling these busy exceptions? If so, is it not vulnerable to hanging if for some reason it keeps being rejected? Is there no better way of doing this that guarantees success?