Skip to content

Commit

Permalink
Refactored: Uses specific exception and adds documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
adri committed Jan 23, 2014
1 parent 933f47c commit 61751ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/VCR/Util/StreamProcessor.php
Expand Up @@ -192,8 +192,13 @@ public function url_stat($path, $flags)
$this->restore();
try {
$result = @stat($path);
} catch (Exception $e) {
$result = false;
} catch (\ErrorException $e) {
// PHPUnit running in process isolation (processIsolation="true")
// throws an \ErrorException for any PHP warning.

// In this case we surpress errors.
// See https://github.com/php-vcr/php-vcr/pull/35 for more information.
return;
}
$this->intercept();
return $result;
Expand Down

0 comments on commit 61751ca

Please sign in to comment.