| 450 | } |
| 451 | |
| 452 | void FunctionContext::SetError(const char* error_msg) { |
| 453 | assert(!impl_->closed_); |
| 454 | if (impl_->error_msg_.empty()) { |
| 455 | impl_->error_msg_ = error_msg; |
| 456 | stringstream ss; |
| 457 | ss << "UDF ERROR: " << error_msg; |
| 458 | if (impl_->state_ != NULL) impl_->state_->SetQueryStatus(ss.str()); |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | // TODO: is there a way to tell the user the expr in a reasonable way? |
| 463 | // Plumb the ToSql() from the FE? |