ladybird/Libraries/LibWeb/HTML/ErrorInformation.h
Andreas Kling b81269e78b Libraries: Clean up UTF-16 source text paths
Store parser errors, source range filenames, source code filenames,
module source, and Rust parser errors as UTF-16 where they flow back
into JavaScript-visible strings. Keep byte-oriented source buffers
byte-backed.

Remove temporary PrimitiveString, ByteString, and UTF-8 detours from
JSON, RegExp, module debug logging, print formatting, and tests.
2026-06-22 19:51:25 +02:00

26 lines
551 B
C++

/*
* Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <LibJS/Runtime/Value.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/webappapis.html#extract-error
struct ErrorInformation {
String message;
String filename;
JS::Value error;
size_t lineno { 0 };
size_t colno { 0 };
};
ErrorInformation extract_error_information(JS::VM&, JS::Value exception);
}