Revision e50bdd68

b/lib/errors.py
217 217
  """External command error.
218 218

  
219 219
  """
220

  
221

  
222
class QuitGanetiException(Exception):
223
  """Signal that Ganeti that it must quit.
224

  
225
  This is not necessarily an error (and thus not a subclass of GenericError),
226
  but it's an exceptional circumstance and it is thus treated. This instance
227
  should be instantiated with a tuple of two values. The first value will
228
  specify whether an error should returned to the caller, and the second one
229
  will be the returned result (either as an error or as a normal result).
230

  
231
  Examples:
232
    # Return a result of "True" to the caller, but quit ganeti afterwards
233
    raise QuitGanetiException((False, True))
234
    # Send an error to the caller, and quit ganeti
235
    raise QuitGanetiException((True, "Fatal safety violation, shutting down"))
236

  
237
  """
238

  

Also available in: Unified diff