Source code for allensdk.core.exceptions
[docs]class DataFrameKeyError(LookupError):
"""More verbose method for accessing invalid rows or columns
in a dataframe. Should be used when a keyerror is thrown on a dataframe.
"""
def __init__(self, msg, caught_exception=None):
if caught_exception:
error_string = "{}\nCaught Exception: {}".format(msg, caught_exception)
else:
error_string = msg
super().__init__(error_string)
[docs]class DataFrameIndexError(LookupError):
"""More verbose method for accessing invalid rows or columns
in a dataframe. Should be used when an index error is thrown on a dataframe.
"""
def __init__(self, msg, caught_exception=None):
if caught_exception:
error_string = "{}\nCaught Exception: {}".format(msg, caught_exception)
else:
error_string = msg
super().__init__(error_string)
[docs]class MissingDataError(ValueError):
pass