builtup4/bu4/linkable/constructs/pexception.py
2021-09-08 13:49:09 +03:00

18 lines
587 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from bu4.linking.constructs.lexception import LException
from bu4.linking.constructs.linked import Linked
from bu4.linkable.constructs.parsed import Parsed
from bu4.transform.states.transformfinished import TransformFinished
from bu4.transform.states.transformstate import TransformState
__all__ = ('PException',)
class PException(Parsed):
def __init__(self, name: bytes):
self.name = name
def link(self, promise: set[bytes]) -> TransformState[Linked]:
return TransformFinished(LException(self.name))