File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ public virtual RemoteDocument LoadDocument(string url)
5454 {
5555 throw ;
5656 }
57- catch ( Exception )
57+ catch ( Exception exception )
5858 {
59- throw new JsonLdError ( JsonLdError . Error . LoadingDocumentFailed , url ) ;
59+ throw new JsonLdError ( JsonLdError . Error . LoadingDocumentFailed , url , exception ) ;
6060 }
6161 return doc ;
6262#else
Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ public class JsonLdError : Exception
1111 private JsonLdError . Error type ;
1212 internal JObject details = null ;
1313
14- public JsonLdError ( JsonLdError . Error type , object detail ) : base ( detail == null ?
15- string . Empty : detail . ToString ( ) )
14+ public JsonLdError ( JsonLdError . Error type , object detail , Exception innerException )
15+ : base ( detail == null ? string . Empty : detail . ToString ( ) , innerException )
1616 {
1717 // TODO: pretty toString (e.g. print whole json objects)
1818 this . type = type ;
1919 }
2020
21- public JsonLdError ( JsonLdError . Error type ) : base ( string . Empty )
21+ public JsonLdError ( JsonLdError . Error type , object detail )
22+ : base ( detail == null ? string . Empty : detail . ToString ( ) )
23+ {
24+ // TODO: pretty toString (e.g. print whole json objects)
25+ this . type = type ;
26+ }
27+
28+ public JsonLdError ( JsonLdError . Error type )
29+ : base ( string . Empty )
2230 {
2331 this . type = type ;
2432 }
You can’t perform that action at this time.
0 commit comments