(self, global_log: bool = False)
| 180 | return self.add_operator(create_node, call_operator_in_scope) |
| 181 | |
| 182 | def add_error_log(self, global_log: bool = False) -> Table[ErrorLogSchema]: |
| 183 | datasource = ErrorLogDataSource(schema=ErrorLogSchema) |
| 184 | from pathway.internals.table import Table |
| 185 | |
| 186 | error_log: Table[ErrorLogSchema] = self.add_operator( |
| 187 | lambda id: operator.InputOperator(datasource, id), |
| 188 | lambda operator: operator(Table[ErrorLogSchema]), |
| 189 | require_error_log=not global_log, |
| 190 | ) |
| 191 | self.error_log_stack.append(error_log) |
| 192 | return error_log |
| 193 | |
| 194 | def remove_error_log(self, error_log: Table[ErrorLogSchema]) -> None: |
| 195 | assert self.error_log_stack[-1] == error_log |
no test coverage detected