Changing folders names and adding more concrete classes of controllers and viewers

This commit is contained in:
Rafael Vargas
2022-03-22 17:39:09 -04:00
parent 14705569c1
commit 2240c7535a
27 changed files with 488 additions and 188 deletions

View 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)