Notifier: Add custom exception type for Notifier.error

This commit is contained in:
David Crompton 2023-01-10 21:56:21 +00:00 committed by rdb
parent cd6ad8285e
commit 581f374ba6
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,10 @@ import time
import sys
class NotifierException(Exception):
pass
class Notifier:
serverDelta = 0
@ -116,7 +120,7 @@ class Notifier:
return NSError
# error funcs
def error(self, errorString, exception=Exception):
def error(self, errorString, exception=NotifierException):
"""
Raise an exception with given string and optional type:
Exception: error