Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] Exceptions (OOB information)

Expand Messages
  • Paul Kulchenko
    Hi, Craig! Easiest way is just die :)) sub foo { # work if (error) { # OOOPS die error message ; } return $someDefinedValue; # OK } For
    Message 1 of 2 , Apr 26, 2001
    • 0 Attachment
      Hi, Craig!

      Easiest way is just die :))

      sub foo {

      # work

      if (error) { # OOOPS

      die "error message";

      }

      return $someDefinedValue; # OK

      }

      For better control you may use SOAP::Fault with the same syntax:

      die SOAP::Fault->faulcode(..)->faultstring(...);

      Best wishes, Paul.

      --- Craig Kelley <kellcrai@...> wrote:
      >
      > Hello, I'm pretty new to SOAP but I really like it. Everything is
      > working
      > peachy, and I was wondering what the generally accepted method for
      > returning exceptions is:
      >
      > sub foo {
      >
      > # work
      >
      > if (error) { # OOOPS
      >
      > return (undef, "error message");
      >
      > }
      >
      > return $someDefinedValue; # OK
      >
      > }
      >
      > I was thinking about using the above, but someone else must have
      > done this
      > before, so I thought I'd ask.
      >
      > Sorry if I've missed something totally obvious.
      >
      > -Craig
      >
      > --
      > Craig Kelley -- kellcrai@...
      > http://www.isu.edu/~kellcrai finger ink@... for PGP
      > block
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Auctions - buy the things you want at great prices
      http://auctions.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.