Hi,
Is ussage of try and catch block will slow down the application execution process,even it will help the application from crashing or giving error messages etc?.
-PSB
The trick is deciding what to "wrap" in the try block: Inside a loop that may throw only one type of error would be a poor decision. Outside of loops, there is no down-side to catching errors. For example:
- try:
-
while True:
-
aValue = aList[anIndex]
-
# ...
-
except IndexError:
-
print 'got an index error'
will only do good things for you app.