Use new error handler in modules.
All checks were successful
The build was successful.

This commit is contained in:
2018-09-03 20:19:12 +02:00
parent d85a517eb0
commit bd44dba33c
2 changed files with 12 additions and 12 deletions

View File

@@ -613,7 +613,7 @@ static sxi32 VmJsonDecode(
/* Scalar value */
pWorker = ph7_context_new_scalar(pDecoder->pCtx);
if(pWorker == 0) {
ph7_context_throw_error(pDecoder->pCtx, PH7_CTX_ERR, "PH7 is running out of memory");
PH7_VmMemoryError(pDecoder->pCtx->pVm);
/* Abort the decoding operation immediately */
return SXERR_ABORT;
}
@@ -653,7 +653,7 @@ static sxi32 VmJsonDecode(
/* Create a working array */
pWorker = ph7_context_new_array(pDecoder->pCtx);
if(pWorker == 0) {
ph7_context_throw_error(pDecoder->pCtx, PH7_CTX_ERR, "PH7 is running out of memory");
PH7_VmMemoryError(pDecoder->pCtx->pVm);
/* Abort the decoding operation immediately */
return SXERR_ABORT;
}
@@ -706,7 +706,7 @@ static sxi32 VmJsonDecode(
pDecoder->pIn++;
/* Return the object as an associative array */
if((pDecoder->iFlags & JSON_DECODE_ASSOC) == 0) {
ph7_context_throw_error(pDecoder->pCtx, PH7_CTX_WARNING,
PH7_VmGenericError(pDecoder->pCtx->pVm, PH7_CTX_WARNING,
"JSON Objects are always returned as an associative array"
);
}
@@ -714,7 +714,7 @@ static sxi32 VmJsonDecode(
pWorker = ph7_context_new_array(pDecoder->pCtx);
pKey = ph7_context_new_scalar(pDecoder->pCtx);
if(pWorker == 0 || pKey == 0) {
ph7_context_throw_error(pDecoder->pCtx, PH7_CTX_ERR, "PH7 is running out of memory");
PH7_VmMemoryError(pDecoder->pCtx->pVm);
/* Abort the decoding operation immediately */
return SXERR_ABORT;
}