1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

WebDriver: Rename HttpError -> WebDriverError

This commit is contained in:
Sam Atkins 2022-10-20 12:04:39 +01:00 committed by Linus Groh
parent 87a9462b7f
commit 89c3e0b567
7 changed files with 220 additions and 219 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2022, Florent Castelli <florent.castelli@gmail.com>
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
namespace WebDriver {
struct WebDriverError {
unsigned http_status;
String error;
String message;
};
}
template<>
struct AK::Formatter<WebDriver::WebDriverError> : Formatter<StringView> {
ErrorOr<void> format(FormatBuilder& builder, WebDriver::WebDriverError const& error)
{
return Formatter<StringView>::format(builder, String::formatted("Error {}, {}: {}", error.http_status, error.error, error.message));
}
};