]> git.mxchange.org Git - hub.git/blob - ship-simu/application/hub/exceptions/socket/init/class_SocketBindException.php
b9b1f14f42160ec0491ced549b6b8e147cdd79e9
[hub.git] / ship-simu / application / hub / exceptions / socket / init / class_SocketBindException.php
1 <?php
2 // An exception for socket setup problems
3 class SocketBindException extends SocketException {
4         /**
5          * The constructor
6          *
7          * @param               $message                Message from the exception
8          * @param               $code           Code number for the exception
9          * @return      void
10          */
11         public final function __construct ($msgArray, $code) {
12                 // Construct the message
13                 $message = sprintf("[%s:%d] Socket konnte nicht an %s:%d gebunden werden. Reason: <u>%s</u> (Code: <u>%d</u>)", 
14                         $msgArray['this']->__toString(),
15                         $this->getLine(),
16                         $msgArray['host'],
17                         $msgArray['port'],
18                         socket_strerror($msgArray['code']),
19                         $msgArray['code']
20                 );
21
22                 // Call parent constructor
23                 parent::__construct($message, $code);
24         }
25 }
26
27 // [EOF]
28 ?>