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)
54
54
{
55
55
throw ;
56
56
}
57
- catch ( Exception )
57
+ catch ( Exception exception )
58
58
{
59
- throw new JsonLdError ( JsonLdError . Error . LoadingDocumentFailed , url ) ;
59
+ throw new JsonLdError ( JsonLdError . Error . LoadingDocumentFailed , url , exception ) ;
60
60
}
61
61
return doc ;
62
62
#else
Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ public class JsonLdError : Exception
11
11
private JsonLdError . Error type ;
12
12
internal JObject details = null ;
13
13
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 )
16
16
{
17
17
// TODO: pretty toString (e.g. print whole json objects)
18
18
this . type = type ;
19
19
}
20
20
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 )
22
30
{
23
31
this . type = type ;
24
32
}
You can’t perform that action at this time.
0 commit comments