Improving validation error messages
Publish PHP Package / docker (push) Successful in 6s
Details
Publish PHP Package / docker (push) Successful in 6s
Details
This commit is contained in:
parent
f5d1c418ed
commit
7e3927cb72
|
@ -286,7 +286,7 @@ function bhl_validate_func_ref(string $module_file, string $func_full_name, arra
|
||||||
{
|
{
|
||||||
$module_chunks = preg_split('~namespace\s+'.preg_quote($namespace).'\s*{~', $module_src);
|
$module_chunks = preg_split('~namespace\s+'.preg_quote($namespace).'\s*{~', $module_src);
|
||||||
if(count($module_chunks) < 2)
|
if(count($module_chunks) < 2)
|
||||||
throw new Exception("Namespace '$namespace' not found in '$module_file'");
|
throw new Exception("Namespace '$namespace' for func '$func_full_name' not found in '$module_file'");
|
||||||
$module_chunks = array_filter($module_chunks, function($item) { return strlen($item) > 0;});
|
$module_chunks = array_filter($module_chunks, function($item) { return strlen($item) > 0;});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -319,7 +319,7 @@ function bhl_validate_func_ref(string $module_file, string $func_full_name, arra
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception("Func '$func' signature '".implode(',', $signature)."' not found in module '$module_file'");
|
throw new Exception("Func '$func_full_name(".implode(',', $signature).")' not found in '$module_file'");
|
||||||
}
|
}
|
||||||
|
|
||||||
function bhl_upm_path() : string
|
function bhl_upm_path() : string
|
||||||
|
|
Loading…
Reference in New Issue