| 121 | } |
| 122 | |
| 123 | MCAPI_ATTR McResult MCAPI_CALL mcGetDebugMessageLog( |
| 124 | McContext context, |
| 125 | McUint32 count, McSize bufSize, |
| 126 | McDebugSource* sources, McDebugType* types, McDebugSeverity* severities, |
| 127 | McSize* lengths, McChar* messageLog, McUint32* numFetched) |
| 128 | { |
| 129 | McResult return_value = McResult::MC_NO_ERROR; |
| 130 | per_thread_api_log_str.clear(); |
| 131 | |
| 132 | if (context == nullptr) { |
| 133 | per_thread_api_log_str = "context ptr (param0) undef (NULL)"; |
| 134 | } else if ( |
| 135 | count == 0) { |
| 136 | per_thread_api_log_str = "count must be > 0"; |
| 137 | } else if (bufSize == 0) { |
| 138 | per_thread_api_log_str = "bufSize must be > 0"; |
| 139 | } else if (numFetched == nullptr) { |
| 140 | per_thread_api_log_str = "numFetched undef (NULL)"; |
| 141 | } else { |
| 142 | try { |
| 143 | get_debug_message_log_impl(context, |
| 144 | count, bufSize, |
| 145 | sources, types, severities, |
| 146 | lengths, messageLog, *numFetched); |
| 147 | } |
| 148 | CATCH_POSSIBLE_EXCEPTIONS(per_thread_api_log_str); |
| 149 | } |
| 150 | |
| 151 | if (!per_thread_api_log_str.empty()) { |
| 152 | std::fprintf(stderr, "%s(...) -> %s\n", __FUNCTION__, per_thread_api_log_str.c_str()); |
| 153 | if (return_value == McResult::MC_NO_ERROR) // i.e. problem with basic local parameter checks |
| 154 | { |
| 155 | return_value = McResult::MC_INVALID_VALUE; |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | return return_value; |
| 160 | } |
| 161 | |
| 162 | MCAPI_ATTR McResult MCAPI_CALL mcDebugMessageControl(McContext pContext, McDebugSource source, McDebugType type, McDebugSeverity severity, bool enabled) |
| 163 | { |
no test coverage detected