Package wsatools :: Module FitsToDb :: Class FileError
[hide private]

Class FileError

source code


Abstract base class for cumulative logging of file errors. Derive from this class to denote a new type of error associated with reading a file, defining the behaviour of each of the functions given below. See, as an example, MissingKeyword. These FileError objects are designed to be stored in an FileErrorList container that collects all of the error logs for an individual file, so that only one report is issued _per_ file.

Instance Methods [hide private]
 
__init__(self)
Initialises member data.
source code
str
__str__(self)
Returns: Error message.
source code
 
append(self)
Adds a new error associated to this object.
source code
bool
errorOccurred(self)
Returns: True if an error has been logged via append() for this file.
source code
str
getFinalAnalysis(self, _numErrors)
Returns: The final summary report for all errors of this type.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  name = 'FileError'
Name of this type of file error.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialises member data.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: str
Error message.
Overrides: object.__str__

errorOccurred(self)

source code 
Returns: bool
True if an error has been logged via append() for this file.

getFinalAnalysis(self, _numErrors)

source code 
Parameters:
  • _numErrors (int) - The total number of files with this error.
Returns: str
The final summary report for all errors of this type.