Repository URL to install this package:
Version:
3.4.36 ▾
|
ó MEYc @ sâ d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d e f d YZ d Z d e f d YZ d Z d e f d YZ d S( s Exception related utilities. iÿÿÿÿN( t encodeutils( t reflection( t timeutilst CausedByExceptionc B sG e Z d Z d d Z d Z d Z d Z d d e d Z RS( s Base class for exceptions which have associated causes. NOTE(harlowja): in later versions of python we can likely remove the need to have a ``cause`` here as PY3+ have implemented :pep:`3134` which handles chaining in a much more elegant manner. :param message: the exception message, typically some string that is useful for consumers to view when debugging or analyzing failures. :param cause: the cause of the exception being raised, when provided this should itself be an exception instance, this is useful for creating a chain of exceptions for versions of python where this is not yet implemented/supported natively. .. versionadded:: 2.4 c C s# t t | j | | | _ d S( N( t superR t __init__t cause( t selft messageR ( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/excutils.pyR 4 s c C s | j j d S( Nt utf8( t pformatt encode( R ( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/excutils.pyt __bytes__8 s c C s | j S( N( R ( R ( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/excutils.pyt __str__; s c C s | j d S( Ni ( t args( R ( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/excutils.pyt _get_message>