İçereği Atla
Menü
Bu soru işaretlendi
7006 Görünümler

Hi guys,

Here is my code

try:
     raise UserError(_('foo'))
except Exception as e:
     raise UserError(_(str(e)))

The warning box shows (u'foo', None) instead of foo.

Warning
    (u'foo', None)

[OK]

But exception shows correctly

Example

try:
     print 100 / 0
     raise UserError(_('foo'))
except Exception as e:
     raise UserError(_(str(e)))

Result is

Warning
integer division or modulo by zero
[OK]  
This Problem is only inside the try.
Please tell me what can I do?
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Nis 25
1765
1
Mar 22
4387
2
May 21
13529
2
Eyl 20
3200
2
Haz 20
8274