22exceptions.py
33
44Custom exception classes for the CS3 client.
5+ Where applicable, the default values correspond to the Linux standard error strings.
56
67Authors: Rasmus Welander, Diogo Castro, Giuseppe Lo Presti.
78Emails: rasmus.oscar.welander@cern.ch, diogo.castro@cern.ch, giuseppe.lopresti@cern.ch
@@ -14,7 +15,7 @@ class AuthenticationException(Exception):
1415 Standard error thrown when attempting an operation without the required access rights
1516 """
1617
17- def __init__ (self , message : str = "" ):
18+ def __init__ (self , message : str = "Operation not permitted " ):
1819 super ().__init__ (message )
1920
2021
@@ -23,7 +24,7 @@ class NotFoundException(IOError):
2324 Standard file missing message
2425 """
2526
26- def __init__ (self , message : str = "" ):
27+ def __init__ (self , message : str = "No such file or directory " ):
2728 super ().__init__ (message )
2829
2930
@@ -32,7 +33,7 @@ class SecretNotSetException(Exception):
3233 Standard file missing message
3334 """
3435
35- def __init__ (self , message : str = "" ):
36+ def __init__ (self , message : str = "Secret was not set, unable to authenticate " ):
3637 super ().__init__ (message )
3738
3839
@@ -42,7 +43,7 @@ class FileLockedException(IOError):
4243 or when a lock operation cannot be performed because of failed preconditions
4344 """
4445
45- def __init__ (self , message : str = "" ):
46+ def __init__ (self , message : str = "Lock mismatch " ):
4647 super ().__init__ (message )
4748
4849
@@ -60,7 +61,7 @@ class AlreadyExistsException(IOError):
6061 Standard error thrown when attempting to create a resource that already exists
6162 """
6263
63- def __init__ (self , message : str = "" ):
64+ def __init__ (self , message : str = "File exists " ):
6465 super ().__init__ (message )
6566
6667
@@ -69,5 +70,5 @@ class UnimplementedException(Exception):
6970 Standard error thrown when attempting to use a feature that is not implemented
7071 """
7172
72- def __init__ (self , message : str = "" ):
73+ def __init__ (self , message : str = "Not implemented " ):
7374 super ().__init__ (message )
0 commit comments