Skip to content

Commit

Permalink
Use Runtime exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cursedcoder committed Apr 4, 2016
1 parent b9a4837 commit e02736c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EProcess/Adapter/BaseAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public function __construct(LoopInterface $loop)
protected function createUnixSocket()
{
if (!defined('EPROCESS_SOCKET_DIR')) {
throw new \Exception("EPROCESS_SOCKET_DIR is not defined.");
throw new \RuntimeException('EPROCESS_SOCKET_DIR is not defined.');
}

if (!defined('EPROCESS_AUTOLOAD')) {
throw new \Exception('EPROCESS_AUTOLOAD is not defined.');
throw new \RuntimeException('EPROCESS_AUTOLOAD is not defined.');
}

if (!is_writable(EPROCESS_SOCKET_DIR)) {
throw new \Exception(sprintf("Cannot write to %s.", EPROCESS_SOCKET_DIR));
throw new \RuntimeException(sprintf('Cannot write to "%s".', EPROCESS_SOCKET_DIR));
}

$unixFile = sprintf('%s/%s.sock', EPROCESS_SOCKET_DIR, $this->node);
Expand Down

0 comments on commit e02736c

Please sign in to comment.