Skip to content
This repository was archived by the owner on Jan 29, 2019. It is now read-only.

Commit b9f12a3

Browse files
author
Laurent MINGUET
committed
better message error test for new SVN versions
1 parent e6fc161 commit b9f12a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Webcreate/Vcs/Svn/AbstractSvn.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ public function execute($command, array $arguments = array(), $cwd = null)
164164
$result = $this->adapter->execute($command, $arguments, $cwd);
165165
} catch (\Exception $e) {
166166
// @todo move to a generic error handler? Something similar to the ParserInterface
167-
if (preg_match('/svn: URL \'[^\']+\' non-existent in that revision/', $e->getMessage())) {
168-
throw new NotFoundException($e->getMessage());
169-
}
170-
if (preg_match('/svn: File not found/', $e->getMessage())) {
167+
if (preg_match('/url \'[^\']+\' non-existent/i', $e->getMessage()) ||
168+
preg_match('/file not found/i', $e->getMessage()) ||
169+
preg_match('/path not found/i', $e->getMessage())
170+
) {
171171
throw new NotFoundException($e->getMessage());
172172
}
173173

0 commit comments

Comments
 (0)