-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathutils.py
More file actions
23 lines (17 loc) · 683 Bytes
/
Copy pathutils.py
File metadata and controls
23 lines (17 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class ConfigException(Exception):
"""Handles the Exceptions concerning the Configuration file such as :
- absence of the file
- absence of one of the necessary fields
"""
def __init__(self, error_message=None):
if not error_message:
error_message = 'The config file is missing some necessary fields'
def __repr__(self):
return error_message
class CameraException(Exception):
"""Handles the Exceptions concerning the PiCamera"""
def __init__(self, error_message=None):
if not error_message:
error_message = 'The camera cannot be loaded'
def __repr__(self):
return error_message