Module reahl.component.exceptions

Exceptions used throughout several Reahl components.

DomainException

class reahl.component.exceptions.DomainException(commit=False, message=None, detail_messages=[], handled_inline=True, json_string=None)

Bases: Exception

Any exception indicating an application-specific error condition that should be communicated to a user.

Parameters:
  • commit – Set to True to indicate that the current database transaction should be committed. By default transactions are rolled back when a DomainException is raised.

  • message – Optional error message.

  • detail_messages – A list of error messages giving more detail about the exception.

  • handled_inline – If False, indicates that this exception is not reported in the normal rendering of the page.

AccessRestricted

class reahl.component.exceptions.AccessRestricted

Bases: Exception

Raised to prevent the current user to perform some function which is not allowed.

ProgrammerError

class reahl.component.exceptions.ProgrammerError

Bases: Exception

Raised to indicate an error in the program.

IncorrectArgumentError

class reahl.component.exceptions.IncorrectArgumentError(explanation, cause)

Bases: ProgrammerError

Raised to indicate an attempt to pass an incorrect argument to a Python callable.