Menu

Error Handling in pipeline stage

Help
2003-11-19
2004-03-26
  • Hagop Chemedikian

    Hi,
    I want to perform an action (for exmple sent an e-mail)  every time an error occurs in a pipiline stage. How can I do this? Is there any attribute that specifies if there is an error in some pipeline stage?
    Thanks 
    Hagop

     
    • Bill Harrelson

      Bill Harrelson - 2003-11-19

      Try adding:

      yourStageName.errorStage=somewheretogoonerror

      works for me.

      Bill

       
    • Hagop Chemedikian

      I try to do so but I cannot handle the error.
      My pipeline is defined so:
      .....
      xml2xml-1.stageType=XslTransform
      xml2xml-1.transformationFile = data/invoic.xsl
      xml2xml-1.nextStage=writer-1
      xml2xml-1.tracked=true
      xml2xml-1.errorStage=emailer
      xml2xml-1.failOnError=true
      ...
      emailer.stageType=SmtpWriter
      emailer.smtpHost=mail.yahoo.com
      emailer.smtpFrom=hchemedikian@yahoo.com
      emailer.smtpTo=hchemedikian@yahoo.com
      emailer.smtpSubject=Document: Ticket: ${ticket.Value}
      emailer.nextStage=null
      emailer.tracked=true
      ....

      I also try to use the router stage but I don't know the name of the attribure that defines error status.
      Can you send me a more complete example.
      Thanks
      Hagop

       
    • Anonymous

      Anonymous - 2004-03-25

      Hi, I am using the xml pipeline definition and cannot get my errorStage to work either. Anyway, here's how specify my option
      <option>
          <option-name>errorStage</option-name>
          <option-value>writer</option-value>
      </option>

      writer is of type FileWriter. By the way, I did not set the failOnError

      And do I have to configure the <connection> tag as well.

      I could not find any examples of the XML error handling and that's why I am asking. Thanks.

       
    • Anonymous

      Anonymous - 2004-03-25

      And actually the behavior I want is to continue processing on the error path or something like that.
      Is that even possible ?

       
    • Anonymous

      Anonymous - 2004-03-25

      OK I just took a look at the source code of SoapWriter and it does not seem to have an errorStage option or am I mistaken ?

      Why can't every pipeline stage simply have an errorStage ?

       
      • Dejan Krsmanovic

        You need to set failOnError to true in order to your pipeline continue processing after an error occured.

        errorStage is an option avaliable to all pipeline stages, so it should be avaliable in SoapWriter, too.

        Error handling in Babeldoc is configurable, so if you don't like default error handling mechanism, you can provide your own error handler. For further information check http://www.babeldoc.com/development/readme/userguide.xml.html#N11819

        Dejan

         
        • Dejan Krsmanovic

          Correction:
          failOnError should be false if you want to continue processing! It is true by default.

           
    • Anonymous

      Anonymous - 2004-03-26

      Hi Dejan, Thanks a bunch !!! It works now.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.