NetServices: Add custom error message to BNetworkRequestError

Change-Id: I03970762531a689e25cd78a1091aecf755ee87ce
This commit is contained in:
Niels Sascha Reedijk
2022-08-07 08:47:19 +01:00
parent 6d1bb0e7ad
commit 9cb56a4881
5 changed files with 75 additions and 14 deletions
@@ -61,7 +61,9 @@ public:
};
BNetworkRequestError(const char* origin, ErrorType type,
status_t errorCode = B_OK);
status_t errorCode, const BString& customMessage = BString());
BNetworkRequestError(const char* origin, ErrorType type,
const BString& customMessage = BString());
virtual const char* Message() const noexcept override;
virtual BString DebugMessage() const override;
@@ -69,9 +71,12 @@ public:
ErrorType Type() const noexcept;
status_t ErrorCode() const noexcept;
const char* CustomMessage() const noexcept;
private:
ErrorType fErrorType;
status_t fErrorCode = B_OK;
BString fCustomMessage;
};