If you're using the Python client library and encounter a server error, an exception will be generated, causing Python to stop in its tracks and print out the contents of the exception. While this is useful for debugging, in a production application you'll probably want your application to fail gracefully, perhaps displaying a nice error message to your users.
You can do this by wrapping your code in a try
block and using an except
statement:
try: # Do something that accesses the network except gdata.service.RequestError, inst: response = inst[0] status = response['status'] reason = response['reason'] body = response['body'] # Handle the error here
Other exceptions may be thrown depending on the situation. For more information, see the gdata.service
documentation.
3 comments:
Girl Xinh | Hot Girl | Cute Girl | Sexy Girl | Hot Girl Asian
Hot Girl | Lexi Belle | Sexy Girl | Cute Girl | Hot Asian Girl | Leah Dizon | Hot Girl Asian | Girl Xinh
socks proxy | socks5 | proxy free |proxy list
healthtips
healthtips
healthtips
healthtips
healthtips
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
socks proxy
check socks proxy
socks proxy
socks proxy
funnystory
funnystory
funnystory
funnystory
funnystory
funny pictures
funny pictures
funny pictures
funny pictures
funny pictures
funny pictures
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
Girl Xinh
cute animal
food news
internet
football news
bank news
marketing
science news
travel vietnamt
real estate vietnam
business news
music news
health news
software
seo news
Amazing, learn how to resolve Canon Printer Error u052 and solve canon printer error 6a81 Also canon printer error 5200 and this is good Canon Printer Error Code 1007 find out canon printer error e04 as well as canon printer error code p22
Post a Comment