Files
modoboa/lib/exceptions.py
T
Antoine Nguyen bd126b507f wip: UI refactoring
* fixed an issue with the FETCH responses parser
* Aliases are now displayed into *identities*
* French translation update

see #204
2012-05-03 11:31:02 +02:00

24 lines
548 B
Python

# coding: utf-8
"""
:mod:`exceptions` --- Custom Modoboa exceptions
-----------------------------------------------
"""
from django.utils.translation import ugettext as _
class ModoboaException(Exception):
pass
class PermDeniedException(ModoboaException):
def __init__(self, msg=None):
self.msg = msg
def __str__(self):
if self.msg:
return _("Permission denied: %s" % self.msg)
return _("Permission denied")
class NeedsMailboxException(ModoboaException):
pass