MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / post_nothrow

Function post_nothrow

src/jrd/err.cpp:263–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261
262
263static void post_nothrow(const unsigned lenToAdd, const ISC_STATUS* toAdd, FbStatusVector* statusVector)
264/**************************************
265 *
266 * E R R _ p o s t _ n o t h r o w
267 *
268 **************************************
269 *
270 * Functional description
271 * Populate a status vector.
272 *
273 **************************************/
274{
275 // check status to add
276 if (lenToAdd == 0) // nothing to do
277 return;
278 fb_assert(toAdd[0] == isc_arg_gds);
279
280 // use default from tdbb when no vector specified
281 if (!statusVector)
282 statusVector = JRD_get_thread_data()->tdbb_status_vector;
283
284 if (!(statusVector->getState() & IStatus::STATE_ERRORS))
285 {
286 // this is a blank status vector just stuff the status
287 statusVector->setErrors2(lenToAdd, toAdd);
288 return;
289 }
290
291 const ISC_STATUS* oldVector = statusVector->getErrors();
292 unsigned lenOld = fb_utils::statusLength(oldVector);
293
294 // check for duplicated error code
295 if (fb_utils::subStatus(oldVector, lenOld, toAdd, lenToAdd) != ~0u)
296 return;
297
298 // copy memory from/to
299 StaticStatusVector tmp;
300 tmp.assign(oldVector, lenOld);
301 tmp.append(toAdd, lenToAdd);
302 statusVector->setErrors2(tmp.getCount(), tmp.begin());
303}
304
305
306void ERR_post(const Arg::StatusVector& v)

Callers 1

ERR_post_nothrowFunction · 0.85

Calls 10

JRD_get_thread_dataFunction · 0.85
statusLengthFunction · 0.85
subStatusFunction · 0.85
getStateMethod · 0.45
setErrors2Method · 0.45
getErrorsMethod · 0.45
assignMethod · 0.45
appendMethod · 0.45
getCountMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected