err.cpp (Firebird-3.0.2.32703-0.tar.bz2) | : | err.cpp (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 57 | skipping to change at line 57 | |||
#include "../common/config/config.h" | #include "../common/config/config.h" | |||
#include "../common/utils_proto.h" | #include "../common/utils_proto.h" | |||
using namespace Jrd; | using namespace Jrd; | |||
using namespace Firebird; | using namespace Firebird; | |||
//#define JRD_FAILURE_SPACE 2048 | //#define JRD_FAILURE_SPACE 2048 | |||
//#define JRD_FAILURE_UNKNOWN "<UNKNOWN>" // Used when buffer fails | //#define JRD_FAILURE_UNKNOWN "<UNKNOWN>" // Used when buffer fails | |||
static void internal_error(ISC_STATUS status, int number, const TEXT* file = NUL L, int line = 0); | static void internal_error(ISC_STATUS status, int number, const TEXT* file = NUL L, int line = 0); | |||
static void post_nothrow(const unsigned lenToAdd, const ISC_STATUS* toAdd, FbSta tusVector* statusVector); | ||||
void ERR_bugcheck(int number, const TEXT* file, int line) | void ERR_bugcheck(int number, const TEXT* file, int line) | |||
{ | { | |||
/************************************** | /************************************** | |||
* | * | |||
* E R R _ b u g c h e c k | * E R R _ b u g c h e c k | |||
* | * | |||
************************************** | ************************************** | |||
* | * | |||
* Functional description | * Functional description | |||
skipping to change at line 202 | skipping to change at line 203 | |||
* | * | |||
* E R R _ p o s t _ n o t h r o w | * E R R _ p o s t _ n o t h r o w | |||
* | * | |||
************************************** | ************************************** | |||
* | * | |||
* Functional description | * Functional description | |||
* Populate a status vector. | * Populate a status vector. | |||
* | * | |||
**************************************/ | **************************************/ | |||
{ | { | |||
// calculate length of the status | post_nothrow(v.length(), v.value(), statusVector); | |||
unsigned lenToAdd = v.length(); | } | |||
void ERR_post_nothrow(const IStatus* v, FbStatusVector* statusVector) | ||||
/************************************** | ||||
* | ||||
* E R R _ p o s t _ n o t h r o w | ||||
* | ||||
************************************** | ||||
* | ||||
* Functional description | ||||
* Populate a status vector. | ||||
* | ||||
**************************************/ | ||||
{ | ||||
const ISC_STATUS* toAdd = v->getErrors(); | ||||
post_nothrow(fb_utils::statusLength(toAdd), toAdd, statusVector); | ||||
} | ||||
static void post_nothrow(const unsigned lenToAdd, const ISC_STATUS* toAdd, FbSta | ||||
tusVector* statusVector) | ||||
/************************************** | ||||
* | ||||
* E R R _ p o s t _ n o t h r o w | ||||
* | ||||
************************************** | ||||
* | ||||
* Functional description | ||||
* Populate a status vector. | ||||
* | ||||
**************************************/ | ||||
{ | ||||
// check status to add | ||||
if (lenToAdd == 0) // nothing to do | if (lenToAdd == 0) // nothing to do | |||
return; | return; | |||
const ISC_STATUS* toAdd = v.value(); | ||||
fb_assert(toAdd[0] == isc_arg_gds); | fb_assert(toAdd[0] == isc_arg_gds); | |||
// Use default from tdbb when no vector specified | // use default from tdbb when no vector specified | |||
if (!statusVector) | if (!statusVector) | |||
statusVector = JRD_get_thread_data()->tdbb_status_vector; | statusVector = JRD_get_thread_data()->tdbb_status_vector; | |||
if (!(statusVector->getState() & IStatus::STATE_ERRORS)) | if (!(statusVector->getState() & IStatus::STATE_ERRORS)) | |||
{ | { | |||
// this is a blank status vector just stuff the status | // this is a blank status vector just stuff the status | |||
statusVector->setErrors2(lenToAdd, toAdd); | statusVector->setErrors2(lenToAdd, toAdd); | |||
return; | return; | |||
} | } | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 35 lines changed or added |