Skip to content

Commit

Permalink
Merge pull request #4 from shawnrc/master
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
smortensen committed Dec 24, 2015
2 parents d17cdcb + cbbe5ff commit 67dfb92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Exception/Evaluation.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function __construct($message = '', $code = 0)

private static function isValidCode($code)
{
return is_int($code) && (($code < -32768) || (-32000 < $code));
// as defined by the JSON-RPC 2.0 spec, see http://www.jsonrpc.org/specification#error_object
return is_int($code) && (-32768 <= $code && $code <= -32000);
}

private static function isValidMessage($message)
Expand Down

0 comments on commit 67dfb92

Please sign in to comment.