Try-Catch not working

@ashoks93
I was able to isolate your problem to your project.json file.

  1. I took the .zip project file you posted, extracted, and then ran your Process.xaml.
  2. I confirmed that the Try Catch 2 was not catching the error when you input a string in the input dialog accepting an output of int32.
  3. I deleted your project.json file, and then reopened the project to generate a new, clean project.json file.
  4. I re-tried your Process.xaml
  5. This time, Try Catch 2 was catching the error.

So something’s up with your project.json file, dude. I couldn’t tell you what, though! Would need more testing and isolating within the scope of your project.

2 Likes

Hi @x.Rei.Ai.x,

Thnks for figuring that out. I just figured out that. We actually had “exceptionHandlerWorkflow”: in the project.json that was causing try-catch to fail. Once after removing that part I was able to fix the issue.

Thanks for all the input guys.

Ashok

2 Likes

@ashoks93
lol nice. I was just about to comment that after removing “exceptionHandlerWorkflow” from the .json file, the Process.xaml was catching the error again.

1 Like

A reason can be that u need to run the workflow from Main because (i believe) youre invoking the workflow only of that form the trycatch will work.

image

Bleess

Its project.json which caused the issue.

Thanks,
Ashok

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.