aboutsummaryrefslogtreecommitdiff
path: root/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-25 15:23:01 +0100
committerMartin Ridgers <[email protected]>2021-11-25 15:23:01 +0100
commit4ee3c386f177c9e63a962808b2956205c3d7339d (patch)
treecff6f384bfab7d839b539473228f516b4b45738a /zenserver-test/zenserver-test.cpp
parentIt reads better to check if something empty than the opposite (diff)
downloadzen-4ee3c386f177c9e63a962808b2956205c3d7339d.tar.xz
zen-4ee3c386f177c9e63a962808b2956205c3d7339d.zip
Throw HTTP client errors from zenserver-test
Diffstat (limited to 'zenserver-test/zenserver-test.cpp')
-rw-r--r--zenserver-test/zenserver-test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp
index a92273486..139a43981 100644
--- a/zenserver-test/zenserver-test.cpp
+++ b/zenserver-test/zenserver-test.cpp
@@ -163,7 +163,11 @@ public:
private:
void Reset() {}
- void OnError(const std::error_code& Error) { ZEN_ERROR("HTTP client error! '{}'", Error.message()); }
+ void OnError(const std::error_code& Error)
+ {
+ using namespace fmt::literals;
+ zen::ThrowLastError("HTTP client error! '{}'"_format(Error.message()));
+ }
int OnHeader(const char* Data, size_t Bytes)
{