Catch Exception or errors at GetNext() of FFDasm

Home Page Forums BizTalk 2004 – BizTalk 2010 Catch Exception or errors at GetNext() of FFDasm

Viewing 1 reply thread
  • Author
    Posts
    • #14021

      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 🙂

    • #14022

      Apologies for typo … I am not able catch any errors or exception

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.