Пример #1
0
 def _handle_exception_event(self, event):
     return core_pb2.ExceptionEvent(node_id=event.node,
                                    session_id=int(event.session),
                                    level=event.level.value,
                                    source=event.source,
                                    date=event.date,
                                    text=event.text,
                                    opaque=event.opaque)
Пример #2
0
def handle_exception_event(event: ExceptionData) -> core_pb2.ExceptionEvent:
    """
    Handle exception event when there is exception event

    :param event: exception data
    :return: exception event
    """
    return core_pb2.ExceptionEvent(
        node_id=event.node,
        level=event.level.value,
        source=event.source,
        date=event.date,
        text=event.text,
        opaque=event.opaque,
    )
Пример #3
0
def handle_exception_event(event):
    """
    Handle exception event when there is exception event

    :param core.emulator.data.ExceptionData event: exception data
    :return: exception event
    :rtype: core.api.grpc.core_pb2.ExceptionEvent
    """
    return core_pb2.ExceptionEvent(
        node_id=event.node,
        level=event.level.value,
        source=event.source,
        date=event.date,
        text=event.text,
        opaque=event.opaque,
    )