Beispiel #1
0
//____________________________________________________________
//
//	Post an error sequence to the status vector.  Since an error
//	sequence can, in theory, be arbitrarily lock, pull a cheap
//	trick to get the address of the argument vector.
//
//	this is a copy of the routine found in err.c with the
//	exception that it uses a different error block - one which
//	is local to the V3 DSQL routines...
//
static void error_post(const Arg::StatusVector& v)
{
	// Save status vector in appropriate place
	v.copyTo(UDSQL_error->dsql_status);

	// Give up whatever we were doing and return to the user.
	Firebird::status_exception::raise(UDSQL_error->dsql_status);
}
Beispiel #2
0
static ISC_STATUS error(ISC_STATUS* status, const Arg::StatusVector& v)
{
/**************************************
 *
 *	e r r o r
 *
 **************************************
 *
 * Functional description
 *	Stuff a status vector.
 *
 **************************************/
	return v.copyTo(status);
}
Beispiel #3
0
void ERR_build_status(ISC_STATUS* status_vector, const Arg::StatusVector& v)
{
    /**************************************
     *
     *	E R R _  a p p e n d _ s t a t u s
     *
     **************************************
     *
     * Functional description
     *	Append the given status vector with the passed arguments.
     *
     **************************************/
    v.copyTo(status_vector);
    ERR_make_permanent(status_vector);
}
Beispiel #4
0
void ERR_post_nothrow(const Arg::StatusVector& v)
/**************************************
 *
 *	E R R _ p o s t _ n o t h r o w
 *
 **************************************
 *
 * Functional description
 *	Create a status vector.
 *
 **************************************/
{
    fb_assert(v.value()[0] == isc_arg_gds);
    ISC_STATUS_ARRAY vector;
    v.copyTo(vector);
    ERR_make_permanent(vector);
    internal_post(vector);
}
Beispiel #5
0
// We've got a blr error other than a syntax error. Handle it.
static void par_error(BlrReader& blrReader, const Arg::StatusVector& v, bool isSyntaxError)
{
	fb_assert(v.value()[0] == isc_arg_gds);

	// Don't bother to pass tdbb for error handling
	thread_db* tdbb = JRD_get_thread_data();

	if (isSyntaxError)
	{
		blrReader.seekBackward(1);
		Arg::Gds p(isc_invalid_blr);
		p << Arg::Num(blrReader.getOffset());
		p.append(v);
		p.copyTo(tdbb->tdbb_status_vector);
	}
	else
		v.copyTo(tdbb->tdbb_status_vector);

	// Give up whatever we were doing and return to the user.
	ERR_punt();
}
Beispiel #6
0
void ERR_warning(const Arg::StatusVector& v)
{
    /**************************************
     *
     *	E R R _ w a r n i n g
     *
     **************************************
     *
     * Functional description
     *	Write an error out to the status vector but
     *	don't throw an exception.  This allows
     *	sending a warning message back to the user
     *	without stopping execution of a request.  Note
     *	that subsequent errors can supersede this one.
     *
     **************************************/
    thread_db* tdbb = JRD_get_thread_data();
    ISC_STATUS* s = tdbb->tdbb_status_vector;

    v.copyTo(s);
    ERR_make_permanent(s);
    DEBUG;
    tdbb->getRequest()->req_flags |= req_warning;
}