Correct error messages.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-05-29 18:56:57 +02:00
parent 5e166492d5
commit 7732a239ff
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 4 additions and 4 deletions

View File

@ -4195,7 +4195,7 @@ static sxi32 VmByteCodeExec(
} else { } else {
if(!VmClassMemberAccess(&(*pVm), pMeth->sFunc.pClass, pMeth->iProtection)) { if(!VmClassMemberAccess(&(*pVm), pMeth->sFunc.pClass, pMeth->iProtection)) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Access to the class method '%z->%z()' is forbidden", &pMeth->sFunc.pClass->sName, &sName); "Method '%z->%z()' is inaccessible due to its protection level", &pMeth->sFunc.pClass->sName, &sName);
} }
/* Push method name on the stack */ /* Push method name on the stack */
PH7_MemObjRelease(pTos); PH7_MemObjRelease(pTos);
@ -4266,7 +4266,7 @@ static sxi32 VmByteCodeExec(
} }
} else { } else {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Access to the class attribute '%z->%z' is forbidden", &pClass->sName, &pObjAttr->pAttr->sName); "Class attribute '%z->%z' is inaccessible due to its protection level", &pClass->sName, &pObjAttr->pAttr->sName);
} }
} }
/* Safely unreference the object */ /* Safely unreference the object */
@ -4320,7 +4320,7 @@ static sxi32 VmByteCodeExec(
} }
if(pMeth == 0 || (pMeth->iFlags & PH7_CLASS_ATTR_VIRTUAL)) { if(pMeth == 0 || (pMeth->iFlags & PH7_CLASS_ATTR_VIRTUAL)) {
if(pMeth) { if(pMeth) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot call virtual method '%z:%z'", PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot call virtual method '%z::%z'",
&pClass->sName, &sName &pClass->sName, &sName
); );
} else { } else {
@ -4381,7 +4381,7 @@ static sxi32 VmByteCodeExec(
} }
} }
} else { } else {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Access to the class attribute '%z::$%z' is forbidden", PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Class attribute '%z::$%z' is inaccessible due to its protection level",
&pClass->sName, &pAttr->sName); &pClass->sName, &pAttr->sName);
} }
} }