示例#1
0
void Rrq::saveStatus(const Firebird::Exception& ex) throw()
{
	if (rrqStatus.isSuccess())
	{
		Firebird::LocalStatus ls;
		Firebird::CheckStatusWrapper tmp(&ls);
		ex.stuffException(&tmp);
		rrqStatus.save(&tmp);
	}
}
示例#2
0
void Rsr::saveException(const Firebird::Exception& ex, bool overwrite)
{
	if (!rsr_status) {
		rsr_status = FB_NEW Firebird::StatusHolder();
	}

	if (overwrite || !rsr_status->getError())
	{
		Firebird::LocalStatus ls;
		Firebird::CheckStatusWrapper temp(&ls);
		ex.stuffException(&temp);
		rsr_status->save(&temp);
	}
}
示例#3
0
void iscLogException(const char* text, const Firebird::Exception& e)
{
/**************************************
 *
 *	i s c L o g E x c e p t i o n
 *
 **************************************
 *
 * Functional description
 *	Add record about an exception to firebird.log
 *
 **************************************/
	ISC_STATUS_ARRAY s;
	e.stuff_exception(s);
	iscLogStatus(text, s);
}
示例#4
0
void iscLogException(const char* text, const Firebird::Exception& e)
{
/**************************************
 *
 *	i s c L o g E x c e p t i o n
 *
 **************************************
 *
 * Functional description
 *	Add record about an exception to firebird.log
 *
 **************************************/
	Firebird::StaticStatusVector s;
	e.stuffException(s);
	iscLogStatus(text, s.begin());
}
示例#5
0
//____________________________________________________________
//
//	An error returned has been trapped.  If the user specified
//	a status vector, return a status code.  Otherwise print the
//	error code(s) and abort.
//
static ISC_STATUS error(const Firebird::Exception& ex)
{
	Firebird::StaticStatusVector v;
	ex.stuffException(v);
	makePermanentVector(v.begin());

	if (UDSQL_error->dsql_user_status)
	{
		fb_utils::copyStatus(UDSQL_error->dsql_user_status, ISC_STATUS_LENGTH, v.begin(), v.getCount());
		return UDSQL_error->dsql_user_status[1];
	}

	fb_utils::copyStatus(UDSQL_error->dsql_status, ISC_STATUS_LENGTH, v.begin(), v.getCount());
	gds__print_status(UDSQL_error->dsql_status);
	exit(UDSQL_error->dsql_status[1]);

	return 0; // suppress compiler warning
}