Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-25 08:29:08

0001 """
0002 Custom exceptions for the Rucio workflow package.
0003 
0004 These exceptions mirror the error handling patterns used in PanDA-Rucio interactions.
0005 """
0006 
0007 class RucioWorkflowError(Exception):
0008     """Base exception for all Rucio workflow errors."""
0009     
0010     def __init__(self, message: str, error_code: int = None):
0011         super().__init__(message)
0012         self.message = message
0013         self.error_code = error_code
0014 
0015     def __str__(self):
0016         if self.error_code:
0017             return f"[{self.error_code}] {self.message}"
0018         return self.message
0019 
0020 
0021 class DatasetError(RucioWorkflowError):
0022     """Exception raised for dataset-related errors."""
0023     pass
0024 
0025 
0026 class FileRegistrationError(RucioWorkflowError):
0027     """Exception raised for file registration errors."""
0028     pass
0029 
0030 
0031 class ValidationError(RucioWorkflowError):
0032     """Exception raised for validation errors."""
0033     pass
0034 
0035 
0036 class RucioClientError(RucioWorkflowError):
0037     """Exception raised for Rucio client errors."""
0038     pass
0039 
0040 
0041 class WorkflowExecutionError(RucioWorkflowError):
0042     """Exception raised for workflow execution errors."""
0043     pass