Skip to content

Commit

Permalink
Show URI of failed remote context
Browse files Browse the repository at this point in the history
  • Loading branch information
filip26 committed Feb 26, 2024
1 parent e02cf9a commit 9f9831e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/java/com/apicatalog/jsonld/JsonLdError.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ public JsonLdError(JsonLdErrorCode code, Throwable cause) {
this.code = code;
}

public JsonLdError(JsonLdErrorCode code, String message, Throwable cause) {
super(message, cause);
this.code = code;
}


public JsonLdErrorCode getCode() {
return code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private void fetch(final String context, final URI baseUrl) throws JsonLdError {

// 5.2.5.1.
} catch (JsonLdError e) {
throw new JsonLdError(JsonLdErrorCode.LOADING_REMOTE_CONTEXT_FAILED, e);
throw new JsonLdError(JsonLdErrorCode.LOADING_REMOTE_CONTEXT_FAILED, "There wa a problem encountered loading a remote context [" + contextUri + "]", e);
}

if (remoteImport == null) {
Expand Down

0 comments on commit 9f9831e

Please sign in to comment.