Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
LggrException
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Lggr;
3
4/**
5 * @brief Project specific exception class.
6 */
7class LggrException extends \Exception {
8
9    // Die Exception neu definieren, damit die Mitteilung nicht optional ist
10    public function __construct($message, $code = 0, Exception $previous = null) {
11        // etwas Code
12        
13        // sicherstellen, dass alles korrekt zugewiesen wird
14        parent::__construct($message, $code, $previous);
15    }
16
17    // ma�geschneiderte Stringdarstellung des Objektes
18    public function __toString() {
19        return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
20    }
21}