File: exceptions.rst

package info (click to toggle)
python-django-registration 3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 704 kB
  • sloc: python: 1,503; makefile: 86
file content (30 lines) | stat: -rw-r--r-- 1,093 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.. _exceptions:
.. module:: django_registration.exceptions


Exception classes
=================

django-registration provides two base exception classes to signal
errors which occur during the signup or activation processes.

.. exception:: RegistrationError(message, code, params)

   Base exception class for all exceptions raised in
   django-registration. No code in django-registration will raise this
   exception directly; it serves solely to provide a distinguishing
   parent class for other errors. Arguments passed when the exception
   is raised will be stored and exposed as attributes of the same
   names on the exception object:

   :param str message: A human-readable error message.
   :param str code: A short but unique identifier used by subclasses
         to distinguish different error conditions.
   :param dict params: Arbitrary key-value data to associate with the error.


.. exception:: ActivationError(message, code, params)

   Exception class to indicate errors during account
   activation. Subclass of :exc:`RegistrationError` and inherits its
   attributes.