Message216615
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. |
|
Date |
User |
Action |
Args |
2014-04-16 22:45:52 | skrah | set | recipients:
+ skrah, tim.peters, rhettinger, facundobatista, mark.dickinson, docs@python, leewz |
2014-04-16 22:45:52 | skrah | link | issue21227 messages |
2014-04-16 22:45:52 | skrah | create | |
|