Rename PH7_VmGenericError() to PH7_VmThrowError()
All checks were successful
The build was successful.

This commit is contained in:
2018-09-04 08:54:48 +02:00
parent 758ace0d1a
commit d793d3ed70
9 changed files with 252 additions and 252 deletions

View File

@@ -554,7 +554,7 @@ static sxi32 HashmapInsert(
}
if(pMap == pMap->pVm->pGlobal) {
/* Forbidden */
PH7_VmGenericError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
return SXRET_OK;
}
/* Perform a blob-key insertion */
@@ -583,7 +583,7 @@ IntKey:
}
if(pMap == pMap->pVm->pGlobal) {
/* Forbidden */
PH7_VmGenericError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
return SXRET_OK;
}
/* Perform a 64-bit-int-key insertion */
@@ -601,7 +601,7 @@ IntKey:
} else {
if(pMap == pMap->pVm->pGlobal) {
/* Forbidden */
PH7_VmGenericError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, insertion is forbidden");
return SXRET_OK;
}
/* Assign an automatic index */
@@ -1374,7 +1374,7 @@ PH7_PRIVATE sxi32 PH7_HashmapRelease(ph7_hashmap *pMap, int FreeDS) {
sxu32 n;
if(pMap == pVm->pGlobal) {
/* Cannot delete the $GLOBALS array */
PH7_VmGenericError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, deletion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_NOTICE, "$GLOBALS is a read-only array, deletion is forbidden");
return SXRET_OK;
}
/* Start the release process */
@@ -1464,7 +1464,7 @@ PH7_PRIVATE sxi32 PH7_HashmapInsert(
/*
* TICKET 1433-35: Insertion in the $GLOBALS array is forbidden.
*/
PH7_VmGenericError(pMap->pVm, PH7_CTX_ERR, "$GLOBALS is a read-only array, insertion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_ERR, "$GLOBALS is a read-only array, insertion is forbidden");
return SXRET_OK;
}
rc = HashmapInsert(&(*pMap), &(*pKey), &(*pVal));
@@ -1507,7 +1507,7 @@ PH7_PRIVATE sxi32 PH7_HashmapInsertByRef(
/*
* TICKET 1433-35: Insertion in the $GLOBALS array is forbidden.
*/
PH7_VmGenericError(pMap->pVm, PH7_CTX_ERR, "$GLOBALS is a read-only array, insertion is forbidden");
PH7_VmThrowError(pMap->pVm, PH7_CTX_ERR, "$GLOBALS is a read-only array, insertion is forbidden");
return SXRET_OK;
}
rc = HashmapInsertByRef(&(*pMap), &(*pKey), nRefIdx);