Jump to content

Difference between System.Exception and "General Exception" in BizTalk

Posted on:October 11, 2016 at 02:00 AM

BizTalk orchestration’s exception system

In BizTalk orchestration we can catch 2 different types of exceptions:

System.Exception and “General Exception”

As a Csoftware engineer you know that all system and custom exceptions have to inherit System.Exception. And that is absolutely true… for C#. It turns out that in .NET also other types can act as exceptions. They are called General Exceptions.

When to use it?

Rule of thumb says: “Catch only exceptions you can handle”. Like Delivery Failure Exception.

If you want to catch all exceptions catch “General Exception”. This will also catch the exceptions from external .NET Components - regardless of their language

I do not recommend catching System.Exception since it does not catch all exceptions in BizTalk context. It is also a symptom of bad programming practices.’