| 238 | } |
| 239 | |
| 240 | [[noreturn]] void ThrowPluginError(const opencc_segmentation_plugin_v2* descriptor, |
| 241 | opencc_error_t* error, |
| 242 | const std::string& pluginType, |
| 243 | const std::string& fallbackPrefix, |
| 244 | const std::string& fallbackMessage) { |
| 245 | const std::string message = |
| 246 | TakeErrorMessage(descriptor, error, fallbackMessage); |
| 247 | throw Exception(fallbackPrefix + " '" + pluginType + "': " + message); |
| 248 | } |
| 249 | |
| 250 | SegmentsPtr BuildSegmentsFromLengths(std::string_view text, |
| 251 | const opencc_segment_length_array_t& lengths) { |
no test coverage detected