2011-05-25 18 views

cevap

11

:

try: 
    # stuff 
except Exception, e: 
    return 'exception %s' % type(e) 
+0

Mükemmel, teşekkürler! –

+2

[İşte] (http://docs.python.org/release/3.0.1/whatsnew/2.6.html#pep-3110) neden. – nmichaels

+2

"str()' yi çağırmanız gerektiğini sanmıyorum, çünkü "% s", "istisnası% s"% türünü (e) kullanarak enterpolasyonu yapıyorsunuz, sadece iyi çalışıyor – mouad

İlgili konular