# enamine_exceptions.py - script functions developed for integration with Enamine server
# Use of this code is subject to the terms of the StarDrop License Agreement and use, copying or redistribution of
# this file for use by other persons or organisations is prohibited
# Copyright(C) Optibrium Ltd 2026
# support@optibrium.com
#


class EnamineException(RuntimeError):
    """ General exception for Enamine exceptions """
    pass


class DatasetCreationException(EnamineException):
    """ Failure to create dataset """
    def __init__(self):
        RuntimeError.__init__(self, 'Failed to create dataset')


class AuthenticationException(EnamineException):
    """An error occurred during authentication."""
    def __init__(self):
        RuntimeError.__init__(self, 'Failed to authenticate to Enamine web services')


class ConnectionException(EnamineException):
    """An error occurred during authentication."""
    def __init__(self):
        RuntimeError.__init__(self, 'Failed to connect to Enamine web services')


class DelayedResultNotFound(EnamineException):
    """An error occurred during delayed result fetching."""
    def __init__(self):
        RuntimeError.__init__(self, 'Failed to fetch delayed result from Enamine web services')
