create UserError exception
Modules can raise this exception when they want to print errors to user
This commit is contained in:
parent
b4154b5843
commit
aea269e9f6
21 changed files with 68 additions and 47 deletions
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from .base import IBaseCap, CapBaseObject, StringField, TimeField, DeltaField, DateField
|
||||
from .base import IBaseCap, CapBaseObject, StringField, TimeField, DeltaField, \
|
||||
DateField, UserError
|
||||
|
||||
|
||||
__all__ = ['Station', 'Departure', 'RoadStep', 'RoadmapError', 'RoadmapFilters', 'ICapTravel']
|
||||
|
|
@ -72,7 +73,7 @@ class RoadStep(CapBaseObject):
|
|||
arrival = StringField('Arrival station')
|
||||
duration = DeltaField('Duration of this step')
|
||||
|
||||
class RoadmapError(Exception):
|
||||
class RoadmapError(UserError):
|
||||
"""
|
||||
Raised when the roadmap is unable to be calculated.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue