You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment in \Scoutapm\Connector\SocketConnector::sendCommand() for example, if there is a broken pipe, we get an error raised, for example:
[2019-12-16 13:30:58] local.ERROR: socket_send(): unable to write to socket [32]: Broken pipe {"exception":"[object] (ErrorException(code: 0): socket_send(): unable to write to socket [32]: Broken pipe at /home/james/workspace/scout-apm-laravel-blog/vendor/scoutapp/scout-apm-php/src/Connector/SocketConnector.php:103)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'socket_send(): ...', '/home/james/wor...', 103, Array)
#1 /home/james/workspace/scout-apm-laravel-blog/vendor/scoutapp/scout-apm-php/src/Connector/SocketConnector.php(103): socket_send(Resource id #323, '\\x00\\x00\\x00e', 4, 0)
#2 /home/james/workspace/scout-apm-laravel-blog/vendor/scoutapp/scout-apm-php/src/Agent.php(320): Scoutapm\\Connector\\SocketConnector->sendCommand(Object(Scoutapm\\Events\\RegisterMessage))
Write a private function that adds an error handler to convert errors to exceptions (and use socket_last_error / socket_strerror to retrieve additional potentially useful error details) and bubble up to provide a more controlled error/exception flow.
The wrapped call to socket_connect in \Scoutapm\Connector\SocketConnector::connect can also be converted to use this new function.
The text was updated successfully, but these errors were encountered:
At the moment in
\Scoutapm\Connector\SocketConnector::sendCommand()
for example, if there is a broken pipe, we get an error raised, for example:Write a
private function
that adds an error handler to convert errors to exceptions (and usesocket_last_error
/socket_strerror
to retrieve additional potentially useful error details) and bubble up to provide a more controlled error/exception flow.The wrapped call to
socket_connect
in\Scoutapm\Connector\SocketConnector::connect
can also be converted to use this new function.The text was updated successfully, but these errors were encountered: