builtup4/bu4/linking/constructs/lexception.py

22 lines
606 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from bu4.evaluation.av.envtype import envtype
from bu4.evaluation.constructs.eexception import EException
from bu4.evaluation.constructs.evaluable import Evaluable
from bu4.linking.constructs.linked import Linked
__all__ = ('LException',)
class LException(Linked):
def __init__(self, name: bytes):
self.name = name
self.future = set()
self.multifuture = set()
def evaluable(self, env: envtype) -> Evaluable:
return EException(self.name)
def __str__(self):
return f'«{self.name.decode()}»'