'''
exceptions.py: exceptions defined by Topi

Authors
-------

Michael Hucka <mhucka@caltech.edu> -- Caltech Library

Copyright
---------

Copyright (c) 2021 by the California Institute of Technology.  This code is
open-source software released under a 3-clause BSD license.  Please see the
file "LICENSE" for more information.
'''


# Base class.
# .............................................................................
# The base class makes it possible to use a single test to distinguish between
# exceptions generated by Topi and exceptions generated by something else.

class TopiException(Exception):
    '''Base class for Topi exceptions.'''
    pass


# Exception classes.
# .............................................................................

class TindError(TopiException):
    '''Unrecoverable problem involving interactions with the TIND server.'''
    pass

class DataMismatchError(TopiException):
    '''Unrecoverable problem involving Topi.'''
    pass

class NotFound(TopiException):
    '''A requested item was not found in the TIND server.'''
    pass
