nvda-addon-voicemeeter/addon/globalPlugins/voicemeeter/error.py

12 lines
327 B
Python
Raw Permalink Normal View History

2023-09-23 22:55:58 +01:00
class VMError(Exception):
2023-09-27 14:16:52 +01:00
"""Base voicemeeterlib exception class"""
class VMCAPIError(VMError):
"""Exception raised when the C-API returns an error code"""
def __init__(self, fn_name, code):
self.fn_name = fn_name
self.code = code
super().__init__(f"{self.fn_name} returned {self.code}")