mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibPDF: Replace two TODO()s with Error returns
That way, we render an incomplete page and log a message instead of crashing the viewer application. Lets us survive e.g. page 489 of pdf_reference_1-7.pdf.
This commit is contained in:
parent
268355c759
commit
7b825fb44b
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> ColorSpace::create(DeprecatedFlyString con
|
|||
if (name == CommonNames::DeviceCMYK)
|
||||
return DeviceCMYKColorSpace::the();
|
||||
if (name == CommonNames::Pattern)
|
||||
TODO();
|
||||
return Error::rendering_unsupported_error("Pattern color spaces not yet implemented");
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> ColorSpace::create(Document* document, Non
|
|||
return TRY(ICCBasedColorSpace::create(document, move(parameters)));
|
||||
|
||||
dbgln("Unknown color space: {}", color_space_name);
|
||||
TODO();
|
||||
return Error::rendering_unsupported_error("unknown color space");
|
||||
}
|
||||
|
||||
NonnullRefPtr<DeviceGrayColorSpace> DeviceGrayColorSpace::the()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue