views:

1294

answers:

1

I have a BizTalk (2006 R2) scope with a "Catch Exception" part in which I have put a simple Expression shape to store the exception message in an orchestration variable.

The problem is that if I choose the exception type to be "General Exception" the I do not get to supply an exception object name. Where do I retrieve exception info in this situation?

The I thought I would just choose the exception type to System.Exception but that is not possible. I can only select more specific .NET exception types.

Am I doing it wrong or is this how BizTalk works?

+3  A: 

Think of catching a "Generic Exception" as the equivalent of doing a "catch { }" block in C# with no exception declared. So, yes, there's no way to get the exception message at that point because the exception that comes up might (potentially) be an object not derived from System.Exception.

I'm not sure what you mean, though, when you say that you cannot choose System.Exception as the exception type to catch. You can most certainly do that and I've done it several times in the past. Heck, just tried it again and it's there.

Are you getting any errors? Is it not appearing in the type selection dialog?

tomasr
You are right. I found System.Exception. Just figured out how the selection dialog actually works.
lox