_exceptions.py
changeset 2867 e8581a4f1bae
parent 2850 92032ede5ae7
child 3042 d2455badf7fb
child 3144 a5deac822a13
equal deleted inserted replaced
2855:1d9be3dffa94 2867:e8581a4f1bae
    77     credentials
    77     credentials
    78     """
    78     """
    79     msg = 'You are not allowed to perform this operation'
    79     msg = 'You are not allowed to perform this operation'
    80     msg1 = 'You are not allowed to perform %s operation on %s'
    80     msg1 = 'You are not allowed to perform %s operation on %s'
    81     var = None
    81     var = None
    82     #def __init__(self, *args):
       
    83     #    self.args = args
       
    84 
    82 
    85     def __str__(self):
    83     def __str__(self):
    86         try:
    84         try:
    87             if self.args and len(self.args) == 2:
    85             if self.args and len(self.args) == 2:
    88                 return self.msg1 % self.args
    86                 return self.msg1 % self.args
   116     """raised when an unregistered object is requested
   114     """raised when an unregistered object is requested
   117 
   115 
   118     this may be a programming/typo or a misconfiguration error
   116     this may be a programming/typo or a misconfiguration error
   119     """
   117     """
   120 
   118 
   121 # class ViewNotFound(ObjectNotFound):
       
   122 #     """raised when an unregistered view is called"""
       
   123 
       
   124 class NoSelectableObject(RegistryException):
   119 class NoSelectableObject(RegistryException):
   125     """some views with the given vid have been found but no
   120     """some views with the given vid have been found but no
   126     one is applyable to the result set
   121     one is applyable to the result set
   127     """
   122     """
   128 
   123 
   147 class ExecutionError(Exception):
   142 class ExecutionError(Exception):
   148     """server execution control error (already started, not running...)"""
   143     """server execution control error (already started, not running...)"""
   149 
   144 
   150 # pylint: disable-msg=W0611
   145 # pylint: disable-msg=W0611
   151 from logilab.common.clcommands import BadCommandUsage
   146 from logilab.common.clcommands import BadCommandUsage
   152