Used to generate context for exceptions that are thrown while executing an operator. Eg output: 'Operator: FilterProject(1) PlanNodeId: 1 TaskId: test_cursor 1 PipelineId: 0 DriverId: 0 OperatorAddress: 0x61a000003c80'
| 118 | } |
| 119 | |
| 120 | // Used to generate context for exceptions that are thrown while executing an |
| 121 | // operator. Eg output: 'Operator: FilterProject(1) PlanNodeId: 1 TaskId: |
| 122 | // test_cursor 1 PipelineId: 0 DriverId: 0 OperatorAddress: 0x61a000003c80' |
| 123 | std::string addContextOnException( |
| 124 | BoltException::Type exceptionType, |
| 125 | void* arg) { |
| 126 | if (exceptionType != BoltException::Type::kSystem) { |
| 127 | return ""; |
| 128 | } |
| 129 | auto* op = static_cast<Operator*>(arg); |
| 130 | return fmt::format("Operator: {}", op->toString()); |
| 131 | } |