File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,13 @@ namespace Bunq.Sdk.Exception
33{
44 public class ApiException : System . Exception
55 {
6- private readonly string message ;
76 public int ResponseCode { get ; private set ; }
87
9- public override string Message
10- {
11- get { return message ; }
12- }
13-
148 /// <param name="responseCode">The HTTP Response code of the failed request.</param>
159 /// <param name="message">The list of messages related to this exception.</param>
1610 public ApiException ( int responseCode , string message ) : base ( message )
1711 {
1812 ResponseCode = responseCode ;
19- this . message = message ;
2013 }
2114 }
2215}
Original file line number Diff line number Diff line change @@ -26,23 +26,18 @@ All the exceptions have the same base exception which looks like this:
2626``` c#
2727 public class ApiException : System .Exception
2828 {
29- private readonly string message ;
3029 public int ResponseCode { get ;}
3130
32- public override string Message
33- {
34- get { return message ; }
35- }
36-
3731 /// <param name =" responseCode" >The HTTP Response code of the failed request.</param >
3832 /// <param name =" message" >The list of messages related to this exception.</param >
3933 public ApiException (int responseCode , string message ) : base (message )
4034 {
35+ // hidden code
4136 }
4237 }
4338```
4439This means that each exception will have a response code and an error message
45- related to the specific exception that has been thrown .
40+ related to the specific error returned by API .
4641
4742---
4843#### Exception handling
You can’t perform that action at this time.
0 commit comments