Better error checking

This commit is contained in:
Pavel Shevaev 2022-12-09 17:24:14 +03:00
parent da5ce2bae0
commit 2ce0a48f03
1 changed files with 2 additions and 1 deletions

View File

@ -282,7 +282,8 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
$file = $jerr->file; $file = $jerr->file;
stderr("BHL ERROR: \n" . $jerr->error . " \nin '$file', line {$jerr->line}\n"); 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) if($exit)
exit(1); exit(1);
} }