Skip to content

Instantly share code, notes, and snippets.

@toopay
Created October 23, 2012 12:44
Show Gist options
  • Save toopay/3938549 to your computer and use it in GitHub Desktop.
Save toopay/3938549 to your computer and use it in GitHub Desktop.
Skip factory validation
// Try to transform path into socket name
// Change this lines
//try {
// $socket = Request::factory(implode('.', $request->getPath()),
// $request->getArguments(),
// $request->getTunnel())->getSocket();
//} catch (\Exception $e) {
// throw new \RuntimeException($e->getMessage());
//}
// into :
try {
$socket = Request::factory(implode('.', $request->getPath()),
$request->getArguments(),
$request->getTunnel())->getSocket();
} catch (\LogicException $e) {
$socket = NULL;
} catch (\RangeException $e) {
throw new \RuntimeException($e->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment