| 177 | } |
| 178 | |
| 179 | ExprPtr TryCallToSpecialForm::constructSpecialForm( |
| 180 | const TypePtr& type, |
| 181 | std::vector<ExprPtr>&& compiledChildren, |
| 182 | bool /* trackCpuUsage */, |
| 183 | const core::QueryConfig& /*config*/) { |
| 184 | BOLT_CHECK_EQ( |
| 185 | compiledChildren.size(), |
| 186 | 1, |
| 187 | "TRY expressions expect exactly 1 argument, received: {}", |
| 188 | compiledChildren.size()); |
| 189 | return std::make_shared<TryExpr>(type, std::move(compiledChildren[0])); |
| 190 | } |
| 191 | } // namespace bytedance::bolt::exec |