From 2ce0a48f0305c56327e9f7dbdc714adb293c119e Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Fri, 9 Dec 2022 17:24:14 +0300 Subject: [PATCH] Better error checking --- bhl.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bhl.inc.php b/bhl.inc.php index 721f268..b6861cb 100644 --- a/bhl.inc.php +++ b/bhl.inc.php @@ -282,7 +282,8 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true) $file = $jerr->file; stderr("BHL ERROR: \n" . $jerr->error . " \nin '$file', line {$jerr->line}\n"); - stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n"); + if(file_exists($file)) + stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n"); if($exit) exit(1); }