mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Changing folders names and adding more concrete classes of controllers and viewers
This commit is contained in:
39
vulkan/Exceptions/Exceptions.py
Normal file
39
vulkan/Exceptions/Exceptions.py
Normal file
@@ -0,0 +1,39 @@
|
||||
from config.Config import Config
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
def __init__(self, message='', title='', *args: object) -> None:
|
||||
self.__message = message
|
||||
self.__title = title
|
||||
super().__init__(*args)
|
||||
|
||||
@property
|
||||
def message(self) -> str:
|
||||
return self.__message
|
||||
|
||||
@property
|
||||
def title(self) -> str:
|
||||
return self.__title
|
||||
|
||||
|
||||
class ImpossibleMove(Error):
|
||||
def __init__(self, message='', title='', *args: object) -> None:
|
||||
config = Config()
|
||||
if title == '':
|
||||
title = config.IMPOSSIBLE_MOVE
|
||||
super().__init__(message, title, *args)
|
||||
|
||||
|
||||
class MusicUnavailable(Error):
|
||||
def __init__(self, message='', title='', *args: object) -> None:
|
||||
super().__init__(message, title, *args)
|
||||
|
||||
|
||||
class BadCommandUsage(Error):
|
||||
def __init__(self, message='', title='', *args: object) -> None:
|
||||
super().__init__(message, title, *args)
|
||||
|
||||
|
||||
class UnknownError(Error):
|
||||
def __init__(self, message='', title='', *args: object) -> None:
|
||||
super().__init__(message, title, *args)
|
||||
Reference in New Issue
Block a user