mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-11-25 10:50:39 +00:00
18 lines
466 B
Python
18 lines
466 B
Python
|
#!/usr/bin/env python3
|
||
|
"""Custom exceptions."""
|
||
|
|
||
|
|
||
|
class PrometheusSDError(Exception):
|
||
|
"""Generic exception class for promtheus-pve-sd."""
|
||
|
|
||
|
def __init__(self, msg, original_exception=""):
|
||
|
super(PrometheusSDError,
|
||
|
self).__init__("{msg}\n{org}".format(msg=msg, org=original_exception))
|
||
|
self.original_exception = original_exception
|
||
|
|
||
|
|
||
|
class ConfigError(PrometheusSDError):
|
||
|
"""Errors related to config file handling."""
|
||
|
|
||
|
pass
|