create UserError exception

Modules can raise this exception when they want to print errors to user
This commit is contained in:
Romain Bignon 2012-04-25 13:43:52 +02:00
commit aea269e9f6
21 changed files with 68 additions and 47 deletions

View file

@ -21,7 +21,8 @@
import datetime
import time
from .base import IBaseCap, CapBaseObject, NotLoaded, Field, StringField, DateField, IntField
from .base import IBaseCap, CapBaseObject, NotLoaded, Field, StringField, \
DateField, IntField, UserError
__all__ = ['Thread', 'Message', 'ICapMessages', 'CantSendMessage', 'ICapMessagesPost']
@ -198,7 +199,7 @@ class ICapMessages(IBaseCap):
"""
raise NotImplementedError()
class CantSendMessage(Exception):
class CantSendMessage(UserError):
"""
Raised when a message can't be send.
"""