This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients docs@python, facundobatista, leewz, mark.dickinson, rhettinger, skrah, tim.peters
Date 2014-04-16.22:45:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20140416224551.GA20042@sleipnir.bytereef.org>
In-reply-to <1397681548.14.0.431648250759.issue21227@psf.upfronthosting.co.za>
Content
leewz <report@bugs.python.org> wrote:
> - Error message for `DivisionImpossible` is
>       [<class 'decimal.DivisionImpossible'>]
>   instead of an actual error message.

No, the error message for the *signal*  that is raised (InvalidOperation) lists
the *condition* that triggered the signal (DivisionImpossible).

I followed the recommendation at:

http://speleotrove.com/decimal/daexcep.html#refexcep

"It is recommended that implementations distinguish the different conditions
 listed above, and also provide additional information about exceptional
 conditions where possible (for example, the operation being attempted and
 the values of the operand or operands involved)."

Distinguishing the conditions is easy, adding additional information in
all cases would require changes to libmpdec.
History
Date User Action Args
2014-04-16 22:45:52skrahsetrecipients: + skrah, tim.peters, rhettinger, facundobatista, mark.dickinson, docs@python, leewz
2014-04-16 22:45:52skrahlinkissue21227 messages
2014-04-16 22:45:52skrahcreate