From d4b4e1bba7f6e7c11ad51a8cf80ef8a739b9adcb Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Thu, 24 Apr 2014 14:58:10 -0400 Subject: [PATCH] Add url to LoadDocumentError message. --- jsonld.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jsonld.php b/jsonld.php index 7af897d..dafef6c 100644 --- a/jsonld.php +++ b/jsonld.php @@ -331,7 +331,7 @@ function jsonld_default_document_loader($url) { $result = @file_get_contents($url, false, $context); if($result === false) { throw new JsonLdException( - 'Could not retrieve a JSON-LD document from the URL.', + 'Could not retrieve a JSON-LD document from the URL: ' . $url, 'jsonld.LoadDocumentError', 'loading document failed'); } $link_header = array(); @@ -412,7 +412,7 @@ function jsonld_default_secure_document_loader($url) { $result = @file_get_contents($url, false, $context); if($result === false) { throw new JsonLdException( - 'Could not retrieve a JSON-LD document from the URL.', + 'Could not retrieve a JSON-LD document from the URL: ' + $url, 'jsonld.LoadDocumentError', 'loading document failed'); } $link_header = array(); @@ -944,7 +944,7 @@ class JsonLdProcessor { } } catch(Exception $e) { throw new JsonLdException( - 'Could not retrieve a JSON-LD document from the URL.', + 'Could not retrieve a JSON-LD document from the URL: ' . $url, 'jsonld.LoadDocumentError', 'loading document failed', array('remoteDoc' => $remote_doc), $e); } @@ -1099,7 +1099,7 @@ class JsonLdProcessor { } } catch(Exception $e) { throw new JsonLdException( - 'Could not retrieve a JSON-LD document from the URL.', + 'Could not retrieve a JSON-LD document from the URL: ' . $url, 'jsonld.LoadDocumentError', 'loading document failed', array('remoteDoc' => $remote_doc), $e); }