Source code for msAI.errors


"""msAI exception hierarchy.

"""


import logging


logger = logging.getLogger(__name__)
"""Module logger."""


[docs]class msAIerror(Exception): """Base class for exceptions in the msAI package.""" message: str """Explanation of the cause of the error."""
[docs]class RootError(msAIerror): """Exceptions raised for errors in msAI package __init__."""
[docs] def __init__(self, message: str): """Initializes an instance of RootError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MiscUtilsError(msAIerror): """Exceptions raised for errors in miscUtils the module."""
[docs] def __init__(self, message: str): """Initializes an instance of MiscUtilsError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MetadataError(msAIerror): """Exceptions raised for errors in the metadata module."""
[docs] def __init__(self, message: str): """Initializes an instance of MetadataError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MetadataInitError(MetadataError): """Exceptions raised for errors in initializing metadata."""
[docs] def __init__(self, message: str): """Initializes an instance of MetadataInitError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MetadataVerifyError(MetadataError): """Exceptions raised for errors in verifying imported metadata."""
[docs] def __init__(self, message: str): """Initializes an instance of MetadataVerifyError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MetadataIndexError(MetadataError): """Exceptions raised for errors in setting metadata index."""
[docs] def __init__(self, message: str): """Initializes an instance of MetadataIndexError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class SampleRunError(msAIerror): """Exceptions raised for errors in the SampleRun module."""
[docs] def __init__(self, message: str): """Initializes an instance of SampleRunError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class SampleRunMSinitError(SampleRunError): """Exceptions raised for errors in initializing MS data in SampleRun."""
[docs] def __init__(self, message: str): """Initializes an instance of SampleRunMSinitError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MSdataError(msAIerror): """Exceptions raised for errors in the msData module."""
[docs] def __init__(self, message: str): """Initializes an instance of MSdataError. Args: message: Explanation of the cause of this error. """ self.message = message
[docs]class MSfileSetInitError(MSdataError): """Exceptions raised for errors in initializing MSfileSet."""
[docs] def __init__(self, message: str): """Initializes an instance of MSfileSetInitError. Args: message: Explanation of the cause of this error. """ self.message = message