Hi All,
I have made custom flat file disassembler. Its selecting schema runtime. Now I have to catch all parser errors and log those errors at 1 place.
My problem is I am able to catch any parser error. My code snippet is
public IBaseMessage GetNext(IPipelineContext pContext)
{
IBaseMessage newMsg = null;
try
{
if (blnProduceMsgs)
newMsg = objFFDasm.GetNext(pContext);
}
catch(Exception objEx)
{
if(objEx.GetType().Equals(typeof(Microsoft.BizTalk.Message.Interop.BTSException)))
{
Microsoft.BizTalk.Message.Interop.BTSException objBTSEx = ((Microsoft.BizTalk.Message.Interop.BTSException)objEx);
strErrMsg = objBTSEx.GetArgument(0);
}
else
strErrMsg = objEx.Message;
LogError(strErrMsg) }
return newMsg;
}
What I have found that control doesn’t come at catch block. Could anybody help me.
Thanks in advance 🙂