Skip to Content
Menu
This question has been flagged
7079 Rodiniai

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?
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
bal. 25
1878
1
kov. 22
4490
2
geg. 21
13746
2
rugs. 20
3270
2
birž. 20
8437