This commit is contained in:
freek 2018-11-22 00:09:31 +01:00
parent 02d788ac78
commit a34b052f97
1 changed files with 6 additions and 2 deletions

View File

@ -2,10 +2,14 @@
namespace BeyondCode\LaravelWebSockets\Exceptions; namespace BeyondCode\LaravelWebSockets\Exceptions;
use BeyondCode\LaravelWebSockets\WebSocketController;
class InvalidWebSocketController extends \Exception class InvalidWebSocketController extends \Exception
{ {
public static function withController($controller) public static function withController(string $controllerClass)
{ {
return new static('Invalid WebSocket Controller provided. Expected instance of WebSocketController, but received '.$controller); $websocketControllerClass = WebSocketController::class;
return new static("Invalid WebSocket Controller provided. Expected instance of `{$websocketControllerClass}`, but received `{$controllerClass}`.");
} }
} }