ldtp.myfastforum.org Forum Index ldtp.myfastforum.org
Linux Desktop Testing Project - http://ldtp.freedesktop.org
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   Join! (free) Join! (free)
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Exception handling

 
Post new topic   Reply to topic    ldtp.myfastforum.org Forum Index -> LDTP Test scripts (http://ldtp.freedesktop.org)
View previous topic :: View next topic  
Author Message
nagappan



Joined: 01 Jan 2008
Posts: 8
Location: Mountain View

PostPosted: Tue Jan 01, 2008 2:49 pm    Post subject: Exception handling Reply with quote

Its always recommended to handle exception:
Script without exception handling
Code:
click ("*-gedit", "btnFind") # Clicks find button in gedit window

Script with exception handling
Code:
try:
   click ("*-gedit", "btnFind") # Clicks find button in gedit window
except LdtpExecutionError, msg:
   print "Failed", msg
   raise LdtpExecutionError (str (msg))

Advantages of exception handling
    Helpful for logging the cause for failure


Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    ldtp.myfastforum.org Forum Index -> LDTP Test scripts (http://ldtp.freedesktop.org) All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum
Linux Desktop Testing Project - http://ldtp.freedesktop.org