17 lines
513 B
Python
17 lines
513 B
Python
# Copyright (c) PARRRATE T&V 2021. All rights reserved.
|
|
|
|
__all__ = ('PException',)
|
|
|
|
from bu4.linking.constructs.lexception import LException
|
|
from bu4.linking.states.linkingfinished import LinkingFinished
|
|
from bu4.linking.states.linkingstate import LinkingState
|
|
from bu4.parsing.constructs.parsed import Parsed
|
|
|
|
|
|
class PException(Parsed):
|
|
def __init__(self, name: bytes):
|
|
self.name = name
|
|
|
|
def link(self, promise: set[bytes]) -> LinkingState:
|
|
return LinkingFinished(LException(self.name))
|