Stefan Krah added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21227> _______________________________________