Menu

stopping the webharvest by a tag

Help
yairbm
2007-08-26
2012-09-04
  • yairbm

    yairbm - 2007-08-26

    hi
    is there some way i can stop the process and return to my java code in the middle of the web-harvest xml?
    for example, i m trying to log-in in to a site, and i check the result (the returned html). if it indicates that the login failed, i want to stop and return to the application.

    thanks
    yair

     
    • yairbm

      yairbm - 2007-08-27

      Ignore the previous message... this is what i mean:

      hi,
      I was trying to avoid the case-if tag...
      It is just that when i write methods, i first like to check everything and throw exceptions/return if something is wrong, and not put the logic in an if-else block.:

      wrong:
      if (init condition is ok)
      {
      do logic
      }
      else
      {
      do something with the error
      }

      right:
      if (init condition is not ok)
      {
      do something with the error
      }

      do logic

      thanks!

       
      • Vladimir Nikic

        Vladimir Nikic - 2007-09-05

        Sorry for delayed response.
        Again I'm not quite sure why IF-THEN logic is not good enough.
        But never mind - you need something like <exit> to stop excution?

        Vladimir.

         
    • Vladimir Nikic

      Vladimir Nikic - 2007-08-26

      There is no construction in web-harvest to immidiately stop a config execution.
      However you could use case-if structure to achive desired behaviour.

      Regards, Vladimir.

       
    • yairbm

      yairbm - 2007-08-27

      hi,
      I was trying to avoid the case-if tag...
      It is just that when i write methods, i first like to check everything and throw exceptions/return if something is wrong, and not put the logic in an if-else block.:

      wrong:
      if (init condition is ok)
      {
      do logic
      }
      else
      {

      }

      thanks!

       

Log in to post a comment.