Skip to content

Commit

Permalink
api: only throw if error number is active
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Dec 11, 2017
1 parent 7429a2e commit f617967
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ private function parseJsonBodyData()
*/
public function APIErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{
$msg = "Error at $errfile:$errline - $errstr (errno=$errno)";
throw new \Exception($msg);
if ($errno & error_reporting()) {
$msg = "Error at $errfile:$errline - $errstr (errno=$errno)";
throw new \Exception($msg);
}
}

/**
Expand Down

0 comments on commit f617967

Please sign in to comment.