-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
297e471
commit 1f4285d
Showing
4 changed files
with
75 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,54 @@ | ||
"""Exceptions for Trafikverket.""" | ||
|
||
from typing import Any | ||
from __future__ import annotations | ||
|
||
|
||
class NoCameraFound(Exception): | ||
"""Error from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found no camera.""" | ||
|
||
|
||
class MultipleCamerasFound(Exception): | ||
"""Authentication issue from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found multiple cameras.""" | ||
|
||
|
||
class NoRouteFound(Exception): | ||
"""Error from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found no ferry route.""" | ||
|
||
|
||
class MultipleRoutesFound(Exception): | ||
"""Authentication issue from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found multiple ferry routes.""" | ||
|
||
|
||
class NoFerryFound(Exception): | ||
"""Error from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found no ferry.""" | ||
|
||
|
||
class NoDeviationFound(Exception): | ||
"""Error from Sensibo api.""" | ||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
"""Error found no deviation.""" | ||
|
||
|
||
class MultipleDeviationsFound(Exception): | ||
"""Authentication issue from Sensibo api.""" | ||
"""Error found multiple deviations.""" | ||
|
||
|
||
class NoWeatherStationFound(Exception): | ||
"""Error found no weather station.""" | ||
|
||
|
||
class MultipleWeatherStationsFound(Exception): | ||
"""Error found multiple weather stations.""" | ||
|
||
|
||
class NoTrainStationFound(Exception): | ||
"""Error found no train station.""" | ||
|
||
|
||
class MultipleTrainStationsFound(Exception): | ||
"""Error found multiple train stations.""" | ||
|
||
|
||
class NoTrainAnnouncementFound(Exception): | ||
"""Error found no train announcement.""" | ||
|
||
|
||
def __init__(self, *args: Any) -> None: | ||
"""Initialize the exception.""" | ||
Exception.__init__(self, *args) | ||
class MultipleTrainAnnouncementFound(Exception): | ||
"""Error found multiple train announcements.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters