diff --git a/Libraries/LibURL/Pattern/PatternError.h b/Libraries/LibURL/Pattern/PatternError.h new file mode 100644 index 00000000000..7d81b3cd167 --- /dev/null +++ b/Libraries/LibURL/Pattern/PatternError.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025, Shannon Booth + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace URL::Pattern { + +// NOTE: All exceptions which are thrown by the URLPattern spec are TypeErrors which web-based callers are expected to assume. +// If this ever does not become the case, this should change to also include the error type. +struct ErrorInfo { + String message; +}; + +template +using PatternErrorOr = AK::ErrorOr; + +}