mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Move exceptions to their own file
Since that keeps the GlobalStack cleaner Contributes to CURA-3497
This commit is contained in:
parent
a95404f72f
commit
f97a6ebd74
2 changed files with 19 additions and 3 deletions
|
@ -11,8 +11,7 @@ from UM.Settings.InstanceContainer import InstanceContainer
|
|||
from UM.Settings.DefinitionContainer import DefinitionContainer
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
|
||||
class CannotSetNextStackError(Exception):
|
||||
pass
|
||||
from . import Exceptions
|
||||
|
||||
class GlobalStack(ContainerStack):
|
||||
def __init__(self, container_id: str, *args, **kwargs):
|
||||
|
@ -78,7 +77,7 @@ class GlobalStack(ContainerStack):
|
|||
## Overridden from ContainerStack
|
||||
@override(ContainerStack)
|
||||
def setNextStack(self, next_stack: ContainerStack) -> None:
|
||||
raise CannotSetNextStackError("Global stack cannot have a next stack!")
|
||||
raise Exceptions.InvalidOperationError("Global stack cannot have a next stack!")
|
||||
|
||||
## Overridden from ContainerStack
|
||||
@override(ContainerStack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue