"""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 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