From 581f374ba6344320da5d4e0f2d52c119284a1a5b Mon Sep 17 00:00:00 2001 From: David Crompton Date: Tue, 10 Jan 2023 21:56:21 +0000 Subject: [PATCH] Notifier: Add custom exception type for Notifier.error --- direct/src/directnotify/Notifier.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/directnotify/Notifier.py b/direct/src/directnotify/Notifier.py index 156723ed93..aa4b08ef07 100644 --- a/direct/src/directnotify/Notifier.py +++ b/direct/src/directnotify/Notifier.py @@ -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