Użytkownik Nate Lowrie napisał:
> Ok, I have a bizobj that does validation through ValidateRecord and
> returns an error string like normal. Then, I have the following code
> under Python 2.6:
>
> try:
> self.bizobj.save()
> except dabo.dException.BusinessRuleViolation as ex:
> self._displayErrorMessages(ex.message)
> return False
> else:
> return True
>
> When it hits this block and catches the error, it complains that
> BaseException.message has been deprecated in 2.6. Is there another
> way to grab the error message returned by the bizobj validation or is
> this something we will change? Note that in 2.7 and 3.0 this would
> error because message has been removed.
>
Hi.
Use:
self._displayErrorMessages(ustr(ex))
instead.
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]