System.Exception vs. General Exception

by eliasen 12. december 2007 18:53

So...

People sometimes ask, what is the difference between catching System.Exception and the General Exception in a Catch Exception shape in the orchestration designer in BizTalk.

Off course, an obvious difference is, that with the General Exception, you don't get an object with properties to investigate. But then it seems that the General Exception is useless... surely there is a point to it?

Well, I was curious about this myself, so I investigated a bit, and found this post. So basically, I think the catch of the general exception in BizTalk 2006 is a left over from BizTalk 2004. In BizTalk 2004 it made sense, since you actually have exceptions thrown at you that didn't derive from System.Exception. That is no longer possible in .NET 2.0 - they just haven't removed it from the designer - probably just to be backwards compatible.

That's it...

--
eliasen

Tags:

BizTalk 2004 | BizTalk 2006

Comments (4) -

Andy C. Mater
Andy C. Mater
21-12-2007 15:10:32 #

The timing couldn't be more perfect. I'm investigating a current orchestration and it's error messages and I stumbled upon empty error messages. Now I know the reason why. Thnx.

Reply

Jan Eliasen
Jan Eliasen
21-12-2007 17:54:27 #

Hi

Glad I could help Smile

--
eliasen

Reply

Jereme
Jereme
06-11-2008 20:16:31 #

What about errors raised from external components called from an orchestration that are not based on the .Net framework? Wouldn't a failed C++ object call be caught by a General Exception block and not the System.Exception block?

Reply

Jan Eliasen
Jan Eliasen
09-11-2008 00:26:44 #

Hi

No, I don't think so. In order to call the c++ component from your orchestration, you will have to reference it from your project, and this will create a .NET wrapper for it. So exceptions thrown by the c++ component is caught and converted into a .NET exception deriving from System.Exception.

This is my best guess...

--
eliasen

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List