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:
parent
87a9462b7f
commit
89c3e0b567
7 changed files with 220 additions and 219 deletions
28
Userland/Services/WebDriver/WebDriverError.h
Normal file
28
Userland/Services/WebDriver/WebDriverError.h
Normal 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));
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue