Hi, I have problem in my project. I want to invoke it in Main.xaml.
And if Invoked Block is finished then Job is done and process can be closed.
But if it is not and have some exceptions inside it, then I want to catch it in Main.xaml and restart main Invoke block.
My problem is that I have invoke blocks inside it too and exceptions inside cant be cought from try catch of main invoke block. How can I solve this problem?
Use rethrow inside the catch, to return the exception on the main.xaml.
Rethrow will cause exception of try catch block, thats it. Example please
Do
{
SystemError = nothing; //exception
Main Try
{
1st Invoke Try
{
2nd Invoke Try
{
}
catch
{
rethrow;
}
}
catch
{
rethrow;
}
}
catch(exception)
{
SystemError = exception;
}
}
while(SystemError IsNot Nothing)
It is not working for me cos I have a lot of activities inside like attach to window.
Is there another way to control process?