mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibPDF: Move Type1FontProgram to use AK::Error instead of PDF::Error
Makes some of the errors a bit less descriptive. But this is pretty stable by now and the errors fire basically never, so that seems ok. Needing the explicit `AK::` prefix is a bit awkward, but that'll go away once this class moves out of LibPDF. Move error() into the two subclasses. I'll remove it from CFF in a follow-up. No real behavior change.
This commit is contained in:
parent
c6f070d29e
commit
102ac331c6
Notes:
sideshowbarker
2024-07-17 04:10:16 +09:00
Author: https://github.com/nico
Commit: 102ac331c6
Pull-request: https://github.com/SerenityOS/serenity/pull/23963
6 changed files with 62 additions and 39 deletions
|
@ -237,4 +237,19 @@ bool PS1FontProgram::seek_name(Reader& reader, ByteString const& name)
|
|||
return false;
|
||||
}
|
||||
|
||||
Error PS1FontProgram::error(
|
||||
ByteString const& message
|
||||
#ifdef PDF_DEBUG
|
||||
,
|
||||
SourceLocation loc
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef PDF_DEBUG
|
||||
dbgln("\033[31m{} Type 1 font error: {}\033[0m", loc, message);
|
||||
#endif
|
||||
|
||||
return Error { Error::Type::MalformedPDF, message };
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue