Add url to LoadDocumentError message.
This commit is contained in:
parent
1aac75aab7
commit
d4b4e1bba7
|
@ -331,7 +331,7 @@ function jsonld_default_document_loader($url) {
|
||||||
$result = @file_get_contents($url, false, $context);
|
$result = @file_get_contents($url, false, $context);
|
||||||
if($result === false) {
|
if($result === false) {
|
||||||
throw new JsonLdException(
|
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');
|
'jsonld.LoadDocumentError', 'loading document failed');
|
||||||
}
|
}
|
||||||
$link_header = array();
|
$link_header = array();
|
||||||
|
@ -412,7 +412,7 @@ function jsonld_default_secure_document_loader($url) {
|
||||||
$result = @file_get_contents($url, false, $context);
|
$result = @file_get_contents($url, false, $context);
|
||||||
if($result === false) {
|
if($result === false) {
|
||||||
throw new JsonLdException(
|
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');
|
'jsonld.LoadDocumentError', 'loading document failed');
|
||||||
}
|
}
|
||||||
$link_header = array();
|
$link_header = array();
|
||||||
|
@ -944,7 +944,7 @@ class JsonLdProcessor {
|
||||||
}
|
}
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
throw new JsonLdException(
|
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',
|
'jsonld.LoadDocumentError', 'loading document failed',
|
||||||
array('remoteDoc' => $remote_doc), $e);
|
array('remoteDoc' => $remote_doc), $e);
|
||||||
}
|
}
|
||||||
|
@ -1099,7 +1099,7 @@ class JsonLdProcessor {
|
||||||
}
|
}
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
throw new JsonLdException(
|
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',
|
'jsonld.LoadDocumentError', 'loading document failed',
|
||||||
array('remoteDoc' => $remote_doc), $e);
|
array('remoteDoc' => $remote_doc), $e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue