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

12 lines
328 B
Python
Raw Normal View History

2023-09-23 22:55:58 +01:00
class VMError(Exception):
"""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}")