throw R error about embedded nul
| 828 | |
| 829 | // throw R error about embedded nul |
| 830 | void Error() { |
| 831 | stripped_string_ = "embedded nul in string: '"; |
| 832 | for (char c : view_) { |
| 833 | if (c) { |
| 834 | stripped_string_ += c; |
| 835 | } else { |
| 836 | stripped_string_ += "\\0"; |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | stripped_string_ += |
| 841 | "'; to strip nuls when converting from Arrow to R, set options(arrow.skip_nul " |
| 842 | "= TRUE)"; |
| 843 | |
| 844 | Rf_error("%s", stripped_string_.c_str()); |
| 845 | } |
| 846 | |
| 847 | void SetArray(const std::shared_ptr<Array>& array) { |
| 848 | array_ = array.get(); |
nothing calls this directly
no outgoing calls
no test coverage detected