TaskRuntimeException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 1
nop 2
1
<?php
2
3
/**
4
 * This file is part of bldr
5
 *
6
 * (c) Aaron Scherer <[email protected]>
7
 *
8
 * This source file is subject to the license that is bundled
9
 * with this source code in the file LICENSE
10
 */
11
12
namespace Bldr\Exception;
13
14
/**
15
 * @author Aaron Scherer <[email protected]>
16
 */
17
class TaskRuntimeException extends BldrException
18
{
19
    /**
20
     * @param string $task    The task name
21
     * @param string $message The error output
22
     */
23
    public function __construct($task, $message = '')
24
    {
25
        parent::__construct(
26
            sprintf("There was an error running the %s task. %s", $task, empty($message) ? '' : 'Output: '.$message)
27
        );
28
    }
29
}
30