| 284 | } |
| 285 | |
| 286 | MCAPI_ATTR McResult MCAPI_CALL mcCreateUserEvent( |
| 287 | McEvent* event, |
| 288 | McContext context) |
| 289 | { |
| 290 | McResult return_value = McResult::MC_NO_ERROR; |
| 291 | per_thread_api_log_str.clear(); |
| 292 | |
| 293 | if (event == nullptr) { |
| 294 | per_thread_api_log_str = "event ptr (param0) undef (NULL)"; |
| 295 | } else if (context == nullptr) { |
| 296 | per_thread_api_log_str = "context handle undefined (NULL)"; |
| 297 | } else { |
| 298 | try { |
| 299 | create_user_event_impl(event, context); |
| 300 | } |
| 301 | CATCH_POSSIBLE_EXCEPTIONS(per_thread_api_log_str); |
| 302 | } |
| 303 | |
| 304 | if (!per_thread_api_log_str.empty()) { |
| 305 | std::fprintf(stderr, "%s(...) -> %s\n", __FUNCTION__, per_thread_api_log_str.c_str()); |
| 306 | if (return_value == McResult::MC_NO_ERROR) // i.e. problem with basic local parameter checks |
| 307 | { |
| 308 | return_value = McResult::MC_INVALID_VALUE; |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | return return_value; |
| 313 | } |
| 314 | |
| 315 | MCAPI_ATTR McResult MCAPI_CALL mcSetUserEventStatus( |
| 316 | McEvent event, |
no test coverage detected