Source code for oximachinerunner.errors

# -*- coding: utf-8 -*-
"""Defining custom exceptions for OximachineRunner"""
__all__ = [
    "OximachineRunnerException",
    "NoMetalError",
    "FeaturizationError",
    "PredictionError",
    "ModelNotFoundError",
    "ParsingError",
]


[docs]class OximachineRunnerException(Exception): """General class for oximachine errors"""
[docs]class NoMetalError(OximachineRunnerException): """Error that is thrown if there is no metal in the structure"""
[docs]class FeaturizationError(OximachineRunnerException): """Error that is thrown if the featurization fails"""
[docs]class PredictionError(OximachineRunnerException): """Error that is thrown if the prediction fails"""
[docs]class ModelNotFoundError(OximachineRunnerException): """Error that is thrown if the model could not be found"""
[docs]class ParsingError(OximachineRunnerException): """Error that is thrown if we cannot convert the structure into a pymatgen Structure object"""