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

Function ERR_post_warning

src/jrd/err.cpp:191–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189
190
191void ERR_post_warning(const Arg::StatusVector& v)
192{
193/**************************************
194 *
195 * E R R _ p o s t _ w a r n i n g
196 *
197 **************************************
198 *
199 * Functional description
200 * Post a warning to the current status vector.
201 *
202 **************************************/
203 fb_assert(v.value()[0] == isc_arg_warning);
204
205 FbStatusVector* const statusVector = JRD_get_thread_data()->tdbb_status_vector;
206 const ISC_STATUS* toAdd = v.value();
207 const unsigned lenToAdd = v.length();
208
209 if (!(statusVector->getState() & IStatus::STATE_WARNINGS))
210 {
211 // this is a blank status vector just stuff the status
212 statusVector->setWarnings2(lenToAdd, toAdd);
213 return;
214 }
215
216 const ISC_STATUS* oldVector = statusVector->getWarnings();
217 unsigned lenOld = fb_utils::statusLength(oldVector);
218
219 // check for duplicated error code
220 if (fb_utils::subStatus(oldVector, lenOld, toAdd, lenToAdd) != ~0u)
221 return;
222
223 StaticStatusVector tmpWarn;
224 tmpWarn.assign(oldVector, lenOld);
225 tmpWarn.append(toAdd, lenToAdd);
226 statusVector->setWarnings2(tmpWarn.getCount(), tmpWarn.begin());
227}
228
229
230void ERR_post_nothrow(const Arg::StatusVector& v, FbStatusVector* statusVector)

Callers 10

executeMethod · 0.85
getMethod · 0.85
initAttachmentFunction · 0.85
PAR_warningFunction · 0.85
validateLengthMethod · 0.85
DBG_parse_debug_infoFunction · 0.85
PAG_set_db_SQL_dialectFunction · 0.85
resetSessionMethod · 0.85
expand_view_lockFunction · 0.85
checkIndicesMethod · 0.85

Calls 12

JRD_get_thread_dataFunction · 0.85
statusLengthFunction · 0.85
subStatusFunction · 0.85
valueMethod · 0.45
lengthMethod · 0.45
getStateMethod · 0.45
setWarnings2Method · 0.45
getWarningsMethod · 0.45
assignMethod · 0.45
appendMethod · 0.45
getCountMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected