Table of Contents

Class: MadrigalError admin.py

MadrigalError is an exception class that is thrown for all known errors in using Madrigal Py lib.

Usage example:

        import sys, traceback
        import madrigal.admin

        try:

            test = open('ImportantFile.txt', 'r')

        except:

            raise madrigal.admin.MadrigalError('ImportantFile.txt not opened!',
                                                traceback.format_exception(sys.exc_info()[0],
                                                                        sys.exc_info()[1],
                                                                        sys.exc_info()[2]))

Methods   
__init__
__str__
getExceptionHtml
getExceptionStr
  __init__ 
__init__ (
        self,
        strInterpretation,
        exceptionList,
        )

__init__ gathers the interpretation string along with all information from sys.exc_info().

Inputs: strIntepretation - A string representing the programmer's interpretation of why the exception occurred

exceptionList - a list of strings completely describing the exception. Generated by traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])

Returns: Void.

Affects: Initializes class member variables _strInterp, _strExcList.

Exceptions: None.

  __str__ 
__str__ ( self )

  getExceptionHtml 
getExceptionHtml ( self )

getExceptionHtml returns an Html formatted string completely describing the exception.

Inputs: None

Returns: A formatted string ready for printing completely describing the exception.

Affects: None

Exceptions: None.

  getExceptionStr 
getExceptionStr ( self )

getExceptionStr returns a formatted string ready for printing completely describing the exception.

Inputs: None

Returns: A formatted string ready for printing completely describing the exception.

Affects: None

Exceptions: None.


Table of Contents

This document was automatically generated on Thu Oct 20 16:51:50 2011 by HappyDoc version r1_5