Send feedback
Stay organized with collections
Save and categorize content based on your preferences.
litert::
Error
#include <litert_expected.h>
A C++ wrapper for a LiteRtStatus
code, providing a status and an error message.
Summary
Constructors and Destructors
Error
(::litert::Status status, std::string message)
Constructs an Error
from a status and an optional error message.
Error
(LiteRtStatus status, std::string message)
const std::string &
Gets the error message.
constexpr::litert::Status
Gets the status.
Public functions
Error
Error(
::litert::Status status,
std::string message
)
Constructs an Error
from a status and an optional error message.
Note: ::litert::Status::kOk
should not be passed.
Error
Error(
LiteRtStatus status,
std::string message
)
Message
const
std
::
string
&
Message
()
const
Gets the error message.
Returns an empty string if none was attached.
Status
constexpr
LiteRtStatus
Status
()
const
StatusCC
constexpr
::
litert
::
Status
StatusCC
()
const
Friend classes
AbslStringify
friend
void
AbslStringify
(
Sink
& sink
,
const
Error
& error
)
operator<<
friend
std
::
ostream
&
operator
<< (
std
::
ostream
& stream
,
const
Error
& error
)
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-28 UTC."],[],[]]