TODO: We should find something better than BaseFrameworkSystem as a type-hint
[shipsimu.git] / ship-simu / application / ship-simu / exceptions / class_ContractPartnerMismatchException.php
1 <?php
2
3 // An exception class for lost classes... ;-)
4 class ContractPartnerMismatchException extends FrameworkException {
5         public function __construct ($classArray, $code) {
6                 // Cast the array
7                 $classArray = (array) $classArray;
8
9                 // Add a message around the missing class
10                 $message = sprintf("[%s:] Der Vertragspartner von <u>%s</u> ist ung&uuml;tig (<u>%s</u>) und darf diesen Vertrag nicht unterzeichnen!",
11                         $classArray[0]->__toString(),
12                         $classArray[1]->getCompanyName(),
13                         $classArray[2]->getCompanyName()
14                 );
15
16                 // Call parent constructor
17                 parent::__construct($message, $code);
18         }
19 }
20
21 // [EOF]
22 ?>