تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
7087 أدوات العرض

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?
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أبريل 25
1882
1
مارس 22
4494
2
مايو 21
13751
2
سبتمبر 20
3271
2
يونيو 20
8447