@@ 278-285 (lines=8) @@ | ||
275 | } |
|
276 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |
|
277 | } catch (\RuntimeException $e) { |
|
278 | if ($e->getCode() === 404) { |
|
279 | // We could not find a previous clover file in the master branch. |
|
280 | // Maybe this branch is the first to contain clover files? |
|
281 | // Let's deal with this by generating a fake "empty" clover file. |
|
282 | return [EmptyCloverFile::create(), EmptyCloverFile::create()]; |
|
283 | } else { |
|
284 | throw $e; |
|
285 | } |
|
286 | } |
|
287 | } |
|
288 | ||
@@ 302-309 (lines=8) @@ | ||
299 | } |
|
300 | return $this->getMeasuresFromZipFile($zipFile, $cloverPath, $crap4JPath); |
|
301 | } catch (\RuntimeException $e) { |
|
302 | if ($e->getCode() === 404) { |
|
303 | // We could not find a previous clover file in the give commit. |
|
304 | // Maybe this branch is the first to contain clover files? |
|
305 | // Let's deal with this by generating a fake "empty" clover file. |
|
306 | return [EmptyCloverFile::create(), EmptyCloverFile::create()]; |
|
307 | } else { |
|
308 | throw $e; |
|
309 | } |
|
310 | } catch (BuildNotFoundException $e) { |
|
311 | // Maybe there is no .gitlab-ci.yml file on the target branch? In this case, there is no build. |
|
312 | return [EmptyCloverFile::create(), EmptyCloverFile::create()]; |