Skip to content

Commit fa05f7e

Browse files
author
Kevin Hellemun
committed
No need to rewrite code.
1 parent 6c19e8c commit fa05f7e

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

BunqSdk/Exception/ApiException.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

BunqSdk/Exception/EXCEPTIONS.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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
```
4439
This 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

0 commit comments

Comments
 (0)