mxmbsocket/lib/Ratchet/Exception.php
Chris Boden cf3ba7c4ad Bug fixes
Ratchet Exception now accepts SocketInterface for better troubleshooting
WebSocket protocol calls onOpen on child app after handshake
Misc little bugs found
2011-11-09 10:55:45 -05:00

23 lines
521 B
PHP

<?php
namespace Ratchet;
/**
* Uses internal php methods to fill an Exception class (no parameters required)
*/
class Exception extends \Exception {
protected $_socket;
public function __construct(SocketInterface $socket) {
$int = socket_last_error();
$msg = socket_strerror($int);
$this->_socket = $socket;
//@socket_clear_error($socket->getResource());
parent::__construct($msg, $int);
}
public function getSocket() {
return $this->_socket;
}
}