" ". / . , , , . , .
, - :
try {
$fh = fopen("foo.txt", 'r');
if (!$fh) {
throw new Exception("foo.txt not found");
}
} catch (Exception $e) {
}
, :
@errors = array();
if (! (is_file("foo.txt") && $fh = fopen("foo.txt", 'r')) ) {
$errors []= "foo.txt not found";
}
, , Exception.
PHP Java, IMHO.