File: exceptions.py

package info (click to toggle)
python-gios 7.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: python: 774; sh: 7; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""GIOS exceptions."""


class GiosError(Exception):
    """Base class for GIOS errors."""

    def __init__(self, status: str) -> None:
        """Initialize."""
        super().__init__(status)
        self.status = status


class ApiError(GiosError):
    """Raised when GIOS API request ended in error."""


class InvalidSensorsDataError(GiosError):
    """Raised when sensors data is invalid."""


class NoStationError(GiosError):
    """Raised when no measuring station error."""