擅长:python、mysql、java
<pre><code>def exception(self)
try:
Something.objects.all()
except Exception, err:
print err.message #(if you want)
#raise err
raise # The 'raise' statement with no arguments inside an error
# handler tells Python to re-raise the exception with the
# original traceback intact
</code></pre>
<p>在错误消息会告诉你例外的原因</p>