reliure.exceptions

exception reliure.exceptions.ReliureError

Bases: exceptions.Exception

Basic reliure error

exception reliure.exceptions.ReliurePlayError(msg)

Bases: exceptions.Exception

Error occuring at engine ‘play’ time

This errors can be show to the user

>>> error = ReliurePlayError("an error message")
>>> error.msg
'an error message'
__init__(msg)
Parameters:msg – the message for the user
exception reliure.exceptions.ReliureTypeError

Bases: reliure.exceptions.ReliureError

Error in a reliure Type

exception reliure.exceptions.ReliureValueError

Bases: reliure.exceptions.ReliureError, exceptions.ValueError

Reliure value error: one value (attribute) was wrong

exception reliure.exceptions.ValidationError(message, params=None)

Bases: reliure.exceptions.ReliureTypeError

An error while validating data of a given type.

It may be either a single validation error or a list of validation error

>>> from reliure.utils.i18n import _
>>> error = ValidationError(_("a message with a value : %(value)s"), {'value': 42})
>>> for err in error: print(err)
a message with a value : 42
__init__(message, params=None)