Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/aniso8601/exceptions.py: 100%
11 statements
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:03 +0000
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-26 06:03 +0000
1# -*- coding: utf-8 -*-
3# Copyright (c) 2021, Brandon Nielsen
4# All rights reserved.
5#
6# This software may be modified and distributed under the terms
7# of the BSD license. See the LICENSE file for details.
10class ISOFormatError(ValueError):
11 """Raised when ISO 8601 string fails a format check."""
14class RangeCheckError(ValueError):
15 """Parent type of range check errors."""
18class YearOutOfBoundsError(RangeCheckError):
19 """Raised when year exceeds limits."""
22class MonthOutOfBoundsError(RangeCheckError):
23 """Raised when month is outside of 1..12."""
26class WeekOutOfBoundsError(RangeCheckError):
27 """Raised when week exceeds a year."""
30class DayOutOfBoundsError(RangeCheckError):
31 """Raised when day is outside of 1..365, 1..366 for leap year."""
34class HoursOutOfBoundsError(RangeCheckError):
35 """Raise when parsed hours are greater than 24."""
38class MinutesOutOfBoundsError(RangeCheckError):
39 """Raise when parsed seconds are greater than 60."""
42class SecondsOutOfBoundsError(RangeCheckError):
43 """Raise when parsed seconds are greater than 60."""
46class MidnightBoundsError(RangeCheckError):
47 """Raise when parsed time has an hour of 24 but is not midnight."""
50class LeapSecondError(RangeCheckError):
51 """Raised when attempting to parse a leap second"""