I want to show the "Successfully saved" message and then want to continue with next try-catch block. I tried 'finally' but it says 'control cannot leave the body of finally block'. Following is my code.
try
{
//some code
return ok(new{Message="Successfully saved"});
try
{
//some code
//return ok(new{Message="Successfully created site"});
}
catch(Exception ex)
{
//return ok(new {Message="failed to create site"});
}
}
catch(Exception ex)
{
//return ok(new {Message="failed to save"});
}
Can anyone please help me?