Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Exception Handling block gives error - Use of unconstructed message

I got this compile time Error today while trying to build the solution am working upon now. And this error was thrown by Exception Handling Block.





Why it happened



Upon exception, an email is sent to emailAdress which is available in the incoming message, the first message received in Orchestration (MSG_Main). For this that particular field is marked as distinguished and it is checked, if it is blank no mail sent and if not blank then send mail.


MSG_Main.Header.EmailAddress!=""


But exception block reports it as error when compiling the solution, for it the MSG_Main is not constructed. Its confusing as MSG_Main is received and that actually triggered the orchestration then why the error?

The reason is Exception block considers following - exception can occur anywhere within the Scope, even before you receive the message, so the only thing available to exception block is the exception object from that scope(nothing else from that particular scope) and the things before the scope. And as can be seen from image below, the First Receive shape is in scope and that's the reason for error.







What to do


In order to get rid of this I moved the receive shape out of scope and error vanished!!!

'); }());


This post first appeared on TechFindings, please read the originial post: here

Share the post

Exception Handling block gives error - Use of unconstructed message

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×