Back to index

python3.2  3.2.2
Public Member Functions
decimal.DecimalException Class Reference
Inheritance diagram for decimal.DecimalException:
Inheritance graph

List of all members.

Public Member Functions

def handle

Detailed Description

Base exception class.

Used exceptions derive from this.
If an exception derives from another exception besides this (such as
Underflow (Inexact, Rounded, Subnormal) that indicates that it is only
called if the others are present.  This isn't actually used for
anything, though.

handle  -- Called when context._raise_error is called and the
           trap_enabler is not set.  First argument is self, second is the
           context.  More arguments can be given, those being after
           the explanation in _raise_error (For example,
           context._raise_error(NewError, '(-x)!', self._sign) would
           call NewError().handle(context, self._sign).)

To define a new exception, it should be sufficient to have it derive
from DecimalException.

Definition at line 159 of file

Member Function Documentation

def decimal.DecimalException.handle (   self,

Reimplemented in decimal.InvalidContext, decimal.DivisionUndefined, decimal.DivisionImpossible, decimal.ConversionSyntax, and decimal.InvalidOperation.

Definition at line 178 of file

00179     def handle(self, context, *args):
00180         pass

Here is the caller graph for this function:

The documentation for this class was generated from the following file: