mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibPDF: Propagate errors in Parser and Document
This commit is contained in:
parent
7e1c823725
commit
73cf8205b4
16 changed files with 472 additions and 420 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Matthew Olsson <mattco@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Matthew Olsson <mattco@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -28,6 +28,13 @@ public:
|
|||
set<NonnullRefPtr<Object>>(*refptr);
|
||||
}
|
||||
|
||||
template<IsObject T>
|
||||
Value(NonnullRefPtr<T> const& refptr) requires(!IsSame<Object, T>)
|
||||
: Variant(nullptr)
|
||||
{
|
||||
set<NonnullRefPtr<Object>>(*refptr);
|
||||
}
|
||||
|
||||
[[nodiscard]] String to_string(int indent = 0) const;
|
||||
|
||||
[[nodiscard]] ALWAYS_INLINE bool has_number() const { return has<int>() || has<float>(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue