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 @@
|
|||
|
||||
from datetime import datetime
|
||||
|
||||
from .base import IBaseCap, CapBaseObject, Field, DateField, FloatField, StringField
|
||||
from .base import IBaseCap, CapBaseObject, Field, DateField, FloatField, \
|
||||
StringField, UserError
|
||||
|
||||
|
||||
__all__ = ['Forecast', 'Current', 'City', 'CityNotFound', 'ICapWeather']
|
||||
|
|
@ -70,7 +71,7 @@ class City(CapBaseObject):
|
|||
CapBaseObject.__init__(self, id)
|
||||
self.name = name
|
||||
|
||||
class CityNotFound(Exception):
|
||||
class CityNotFound(UserError):
|
||||
"""
|
||||
Raised when a city is not found.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue