Skip to content

Commit

Permalink
Detailed error
Browse files Browse the repository at this point in the history
  • Loading branch information
aivchen committed Apr 1, 2019
1 parent 36674bc commit 167bbe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UrlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ private function parseUrl($ampUrl)
private function signPath($path)
{
if (!@openssl_sign($path, $signature, $this->privateKey, OPENSSL_ALGO_SHA256)) {
throw new AmpCacheException("Failed to sign the $path");
$error = openssl_error_string();
throw new AmpCacheException("Failed to sign the $path: $error");
}
return $this->base64encode($signature);
}
Expand Down

0 comments on commit 167bbe5

Please sign in to comment.