File: exceptions.py

package info (click to toggle)
python-box 7.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: python: 3,471; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


class BoxError(Exception):
    """Non standard dictionary exceptions"""


class BoxKeyError(BoxError, KeyError, AttributeError):
    """Key does not exist"""


class BoxTypeError(BoxError, TypeError):
    """Cannot handle that instance's type"""


class BoxValueError(BoxError, ValueError):
    """Issue doing something with that value"""


class BoxWarning(UserWarning):
    """Here be dragons"""