]> git.mxchange.org Git - hub.git/blob - ship-simu/application/hub/exceptions/socket/init/class_SocketCreationException.php
Initial import
[hub.git] / ship-simu / application / hub / exceptions / socket / init / class_SocketCreationException.php
1 <?php
2 // An exception for socket creation problems
3 class SocketCreationException 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 erstellt werden. Reason: <u>%s</u> (Code: <u>%d</u>)", 
14                         $msgArray['this']->__toString(),
15                         $this->getLine(),
16                         socket_strerror($msgArray['code']),
17                         $msgArray['code']
18                 );
19
20                 // Call parent constructor
21                 parent::__construct($message, $code);
22         }
23 }
24
25 // [EOF]
26 ?>