Search for "multiple rescue clauses" in this url:
http://www.rubycentral.com/pickaxe/tut_exceptions.html#multiple

Thanks,
Al Snow
Agile Software Automation JumpStart/Turnaround Architect
My Blog of Links: http://the-neatest-stuff.blogspot.com/
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow


> Date: Tue, 24 Feb 2009 11:10:44 -0800
> Subject: [wtr-general] Re: assert_exists - UnknownObjectException
> From: magn...@ifi.uio.no
> To: watir-general@googlegroups.com
> 
> 
> Hello,
> thank you for your answer.
> But in this:
> 
> #code
> begin
> 
> #My code/script
> 
> 
> rescue Exception
> print "Your message"
> 
> How do I separate between different error messages?
> As in if the error message is XXX - print this
> or if error msg. is YYY - print that.
> 
> Or maybe this is an "ugly" way to do it??
> 
> Thanks!
> 
> On Feb 20, 1:16 pm, pink hiii <pinkh...@yahoo.com> wrote:
> > Hi All,
> >
> > Put your code snippet between the following in your code :
> > #code
> > begin
> >
> > rescue Exception
> > print "Your message"
> >
> > ________________________________
> > From: Isabel <joybe...@gmail.com>
> > To: Watir General <watir-general@googlegroups.com>
> > Sent: Friday, 20 February, 2009 12:44:43 PM
> > Subject: [wtr-general] Re: assert_exists - UnknownObjectException
> >
> > I am facing the same situation.
> > Could anyone please let us know a way out????
> >
> > Thanks and Regards,
> > Isabel
> >
> > On Feb 11, 5:43 pm, magn...@ifi.uio.no wrote:
> >
> > > Hello,
> > > Is there a way to use WatiRs "UnknownObjectException" to create my own
> > > errormessages?
> > > As in every time UnknownObjectException occurs in the consol when
> > > running WatiR I would like to resume my data-driven test, but to
> > > collect the errors and print my owncustommade error message
> > > depending on what type ofExceptionWatiR raises?
> >
> > > Cheers
> >
> >       Add more friends to your messenger and enjoy! Go 
> > tohttp://messenger.yahoo.com/invite/
> > 

_________________________________________________________________
Windows Live™ Hotmail®…more than just e-mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_022009
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to