Some Exception have been moved to their correct scope instead of keeping them at a higher one

This commit is contained in:
Faraphel 2022-08-14 11:46:40 +02:00
parent 0bb12a0835
commit 17edaa3ea1
4 changed files with 12 additions and 21 deletions

View file

@ -8,8 +8,10 @@ if TYPE_CHECKING:
from source.mkw.Patch.PatchOperation import Layer
from source.mkw.Patch import Patch
Layer: any
Patch: any
class InvalidBmgLayerMode(Exception):
def __init__(self, layer_mode: str):
super().__init__(f"Error : bmg layer mode \"{layer_mode}\" is not implemented")
class AbstractLayer(ABC):

View file

@ -9,8 +9,10 @@ if TYPE_CHECKING:
from source.mkw.Patch.PatchOperation import Layer
from source.mkw.Patch import Patch
Layer: any
Patch: any
class InvalidImageLayerType(Exception):
def __init__(self, layer_type: str):
super().__init__(f"Error : image layer type \"{layer_type}\" is not implemented")
class AbstractLayer(ABC):

View file

@ -4,8 +4,10 @@ from typing import IO, Type, TYPE_CHECKING
if TYPE_CHECKING:
from source.mkw.Patch import Patch
Patch: any
Layer: any
class InvalidPatchOperation(Exception):
def __init__(self, operation: str):
super().__init__(f"Error : operation \"{operation}\" is not implemented")
class AbstractPatchOperation(ABC):

View file

@ -13,18 +13,3 @@ class PathOutsidePatch(Exception):
class InvalidPatchMode(Exception):
def __init__(self, mode: str):
super().__init__(f"Error : mode \"{mode}\" is not implemented")
class InvalidPatchOperation(Exception):
def __init__(self, operation: str):
super().__init__(f"Error : operation \"{operation}\" is not implemented")
class InvalidImageLayerType(Exception):
def __init__(self, layer_type: str):
super().__init__(f"Error : image layer type \"{layer_type}\" is not implemented")
class InvalidBmgLayerMode(Exception):
def __init__(self, layer_mode: str):
super().__init__(f"Error : bmg layer mode \"{layer_mode}\" is not implemented")