From f3156bcbd5ff7c40b9b6c5c475e21caf90616cd3 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 27 Nov 2019 20:15:43 +0100 Subject: [PATCH] Throw E_ERROR when impossible to include specified file. --- engine/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index 1913711..9b90034 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -9260,7 +9260,7 @@ static int vm_builtin_include(ph7_context *pCtx, int nArg, ph7_value **apArg) { rc = VmExecIncludedFile(&(*pCtx), &sFile, PH7_AERSCRIPT_CHNK | PH7_AERSCRIPT_FILE); if(rc != SXRET_OK) { /* Emit a warning and return false */ - PH7_VmThrowError(pCtx->pVm, PH7_CTX_WARNING, "IO error while including file: '%z'", &sFile); + PH7_VmThrowError(pCtx->pVm, PH7_CTX_ERR, "IO error while including file: '%z'", &sFile); ph7_result_bool(pCtx, 0); } return SXRET_OK;