一、什么是错误,什么是异常
错误是指在执行代码过程中发生的事件,它中断或干扰代码的正常流程并创建异常对象。当错误中断流程时,该程序将尝试寻找异常处理程序(一段告诉程序如何对错误做出响应的代码),以帮助程序恢复流程。换句话说,错误是一个事件,而异常是该事件创建的对象。
当使用短语“产生异常”时,表示存在问题的方法发生错误,并创建异常对象(包含该错误的信息及发生的时间和位置)来响应该错误。导致出现错误和随后异常的因素包括用户错误、资源失败和编程逻辑失败。这些错误与代码实现特定任务的方法有关,而与该任务的目的无关。
如果不进行异常处理,即不对错误做出响应,程序的健壮性就会大打折扣,甚至无法保证正常运行,所以必须要进行异常处理。
在项目开发中,异常处理是不可或缺的。异常处理帮助人们debug,通过更加丰富的信息,让人们更容易找到bug的所在。异常处理还可以提高程序的容错性。
二、python中的异常
在Python中,异常也是对象,可对它进行操作。所有异常都是基类 Exception的成员。所有异常都从基类Exception继承,而且都在exceptions模块中定义。
python用异常对象(exception object)来表示异常情况,遇到错误后,会引发异常。如果异常对象并未被处理或捕捉,程序就会用所谓的 回溯(Traceback, 一种错误信息)终止执行:
>>> 1/0 Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
1/0
ZeroDivisionError: integer division or modulo by zero
按自己的方式出错
raise语句
为了引发异常,可以使用一个类(Exception的子类)或者实例参数数调用raise 语句。下面的例子使用内建的Exception异常类:
>>> raise Exception # 引发一个没有任何错误信息的普通异常 Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
raise Exception
Exception
>>> raise Exception('hyperdrive overload') # 添加了一些异常错误信息 Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
raise Exception('hyperdrive overload')
Exception: hyperdrive overload
常用的内建异常类:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoUAAAEKCAIAAADrRbgTAAAgAElEQVR4nO1dy5mrvBJUII6ACLxzFATiCIjAiSgJ74iACJyI7qKu6i9agvG8zMyZqsV8mBFCL1Tqbqk7FcMwDMMwjkY6ugCGYRiGYZiPDcMwDOM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OxTWB9Bjg4/H9emyZVlUmYxjbJB6sQjW1SpFZ9qP90uL3sFw0rOUrKkuBWjntrLa+GkwHxufAuXFLooczgEJhQmd26PAEzhOBumZVJrkMDrSgxjocoRHjQMfk4e4aUgB/oDdOldtMBgLh6+ofc31wDRLkqveFa8mDYOcUF/cVPMwXz32TijpsoNvwUu58WoUC7cuDros+yR4LLj9F0Vh6ACw7mkfx4lh9gIWZ2zJUg80agm5tAp2/Sx799hKqrVq6bkIxea1qobaFxzlynXLQq6bydFrFpSNHwLzsfEpfMAC915LZ0gPm2t4rxpin8+2Nbvu5MNjbOGmHmMrpeR6nrh9Ha/Haj9+F0IBPsPBIdstfTVIDrbe7rvu9zuJFmzXrXv32bFa5d9V2qmeKnwetE9xA0e4byuy8UNgPjYMwzCM42E+NgzDMIzj8Z/7/i8BbT/YrDHP8290y2wYhmEYL0Yqu074jHcB20HHtffEtPYjyD204/rwqPEC5HpuLdwv9XjPVC3TH7Ap3u93WyINw/gw/jvRMdZz/diMSp+02Dx5BLsZhmF8Gbjfvr1jfCs0dCa21vNnuAjYuv/PIOiPbT/ug/57oXU/utf+TYxyrinX4INfAviOzvWclfEDofGgeHOLKbteVA3jtyMcgjcfG4ZhGP+ZbKZ6KowmGP4r16NrjADW3jGeR7BwmY8NwzAM43iYjw3DMAzjeJiPDcMwDON4mI8NwzAM43j8DxGW8aV+8TAWAAAAAElFTkSuQmCC" alt="" />
三、捕捉异常
我们可以使用 try/except 来实现异常的捕捉处理。
>>> try:
res = 2/0
except ZeroDivisionError:
print "Error:Divisor must not be zero!" Error:Divisor must not be zero!
看,我们真的捕获到了ZeroDivisionError异常!那如果我想捕获并处理多个异常怎么办呢?有两种办法,一种是给一个except子句传入多个异常类参数,另外一种是写多个except子句,每个子句都传入你想要处理的异常类参数。甚至,这两种用法可以混搭呢!
多个except 子句
try:
x = input('Enter the first number: ')
y = input('Enter the second number: ')
print x/y
except ZeroDivisionError:
print "The second number can't be zero!"
except TypeError: # 对字符的异常处理
print "Please enter a number!"
#再来运行:
>>>
Enter the first number: 10
Enter the second number: 'hello,word'
Please enter a number!
一个块捕捉多个异常
如果需要用一个块捕捉多个异常,那么可以将它们作为元组列出。
try:
x = input('Enter the first number: ')
y = input('Enter the second number: ')
print x/y
except (ZeroDivisionError,TypeError,NameError): # 将错误类型以列表方式列出
print "Yout numbers were bogus..."
try ... except...else 语句
现在我们来说说这个else语句。Python中有很多特殊的else用法,比如用于条件和循环。放到try语句中,其作用其实也差不多:就是当没有检测到异常的时候,则执行else语句。
while True:
try:
x = input('Enter the first numbre: ')
y = input('Enter the second numbre: ')
value = x/y
print 'x/y is',value
except:
print 'Invalid input,please try again.'
else:
break # 这里的循环只在没有异常引发的情况才会退出
finally 子句
finally子句是无论是否检测到异常,都会执行的一段代码,我们可以丢掉except子句和else子句,单独使用try...finally,也可以配合except等使用。
try:
s = 1/0
#except Exception,e:
except ZeroDivisionError, e:
print 'Error:%s' %e
finally:
print 'ok'
完整的语法结构如下:
try:
...
except exception1:
...
except exception2:
...
except:
...
else:
...
finally:
...
如果try中有异常发生时,将执行异常的归属,执行except。异常层层比较,看是否是exception1, exception2...,直到找到其归属,执行相应的except中的语句。