OpenQuizz
Une application de gestion des contenus pédagogiques
BadParameter Class Reference
Inheritance diagram for BadParameter:
Collaboration diagram for BadParameter:

Public Member Functions

def __init__ (self, message, ctx=None, param=None, param_hint=None)
 
def format_message (self)
 
- Public Member Functions inherited from UsageError
def __init__ (self, message, ctx=None)
 
def show (self, file=None)
 
- Public Member Functions inherited from ClickException
def __init__ (self, message)
 
def __str__ (self)
 
def __str__ (self)
 

Data Fields

 param
 
 param_hint
 
- Data Fields inherited from UsageError
 ctx
 
 cmd
 
- Data Fields inherited from ClickException
 message
 

Additional Inherited Members

- Static Public Attributes inherited from UsageError
int exit_code = 2
 
- Static Public Attributes inherited from ClickException
int exit_code = 1
 

Detailed Description

An exception that formats out a standardized error message for a
bad parameter.  This is useful when thrown from a callback or type as
Click will attach contextual information to it (for instance, which
parameter it is).

.. versionadded:: 2.0

:param param: the parameter object that caused this error.  This can
              be left out, and Click will attach this info itself
              if possible.
:param param_hint: a string that shows up as parameter name.  This
                   can be used as alternative to `param` in cases
                   where custom validation should happen.  If it is
                   a string it's used as such, if it's a list then
                   each item is quoted and separated.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  message,
  ctx = None,
  param = None,
  param_hint = None 
)

Member Function Documentation

◆ format_message()

def format_message (   self)

Reimplemented from ClickException.

Reimplemented in MissingParameter.

Field Documentation

◆ param

param

◆ param_hint

param_hint

The documentation for this class was generated from the following file: