diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-21 18:09:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-21 18:09:42 +0200 |
commit | 0951330680afdec9c6d7deed5047940e5e65ef71 (patch) | |
tree | b1fa0d07f5a9eaa5cbb768472697eba14d31349b /src/libstore/filetransfer.hh | |
parent | 1346da4669b2c1b9d73bb4b77eef03d8aecdc447 (diff) | |
parent | 54e507a7aa88527833fec3abb866d91d5561ba3d (diff) |
Merge pull request #3714 from obsidiansystems/add-body-to-network-errors
Add response body to network errors
Diffstat (limited to 'src/libstore/filetransfer.hh')
-rw-r--r-- | src/libstore/filetransfer.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstore/filetransfer.hh b/src/libstore/filetransfer.hh index 11dca2fe0..25ade0add 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/filetransfer.hh @@ -103,10 +103,12 @@ class FileTransferError : public Error { public: FileTransfer::Error error; + std::shared_ptr<string> response; // intentionally optional + template<typename... Args> - FileTransferError(FileTransfer::Error error, const Args & ... args) - : Error(args...), error(error) - { } + FileTransferError(FileTransfer::Error error, std::shared_ptr<string> response, const Args & ... args); + + virtual const char* sname() const override { return "FileTransferError"; } }; bool isUri(const string & s); |