Skip to content

Commit

Permalink
Added general compute error
Browse files Browse the repository at this point in the history
  • Loading branch information
dwest77a committed Nov 4, 2024
1 parent db2405c commit bf2b590
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion padocc/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def __init__(self, verbose=0, proj_code=None, groupdir=None):
def get_str(self):
return 'NaNComparisonError'


class RemoteProtocolError(KerchunkException):
"""All drivers failed (NetCDF3/Hdf5/Tiff) for one or more files within the list"""
def __init__(self,filenums=None, verbose=0, proj_code=None, groupdir=None):
Expand Down Expand Up @@ -263,6 +262,16 @@ def __init__(self, message="Fatal comparison failure for Kerchunk/NetCDF", verbo
self.__class__.__module__ = 'builtins'
def get_str(self):
return 'ValidationError'

class ComputeError(KerchunkException):
"""Compute stage failed - likely due to invalid config/use of the classes"""
def __init__(self, message="Invalid configuration for the Compute stage", verbose=0, proj_code=None, groupdir=None):
self.message = message
super().__init__(proj_code, groupdir)
if verbose < 1:
self.__class__.__module__ = 'builtins'
def get_str(self):
return 'ComputeError'

class SoftfailBypassError(KerchunkException):
"""Validation could not be completed because some arrays only contained NaN values which cannot be compared."""
Expand Down

0 comments on commit bf2b590

Please sign in to comment.