| 383 | } |
| 384 | |
| 385 | PyObject* |
| 386 | raise_required_field_empty(PyObject* interned_key, const char* context, const char* file, int line) |
| 387 | { |
| 388 | const char* key_name = PyUnicode_AsUTF8(interned_key); |
| 389 | std::string msg = "Required '"; |
| 390 | msg += (key_name ? key_name : "unknown"); |
| 391 | msg += "' field in "; |
| 392 | msg += context; |
| 393 | msg += " cannot be empty"; |
| 394 | return raise_invalid_argument(msg.c_str(), file, line); |
| 395 | } |
| 396 | |
| 397 | PyObject* |
| 398 | raise_feature_unavailable(const char* message, const char* file, int line) |
nothing calls this directly
no test coverage detected