68namespace Experimental {
167 void *
operator new(std::size_t size) =
delete;
168 void *
operator new(std::size_t,
void *) =
delete;
169 void *
operator new[](std::size_t) =
delete;
170 void *
operator new[](std::size_t,
void *) =
delete;
206 result.
fError->AddFrame(std::move(sourceLocation));
216 fError->AppendToMessage(
" (unchecked RResult access!)");
246 result.
fError->AddFrame(std::move(sourceLocation));
254#define R__FAIL(msg) ROOT::Experimental::RError(msg, {R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__})
256#define R__FORWARD_RESULT(res) std::move(res.Forward(res, {R__LOG_PRETTY_FUNCTION, __FILE__, __LINE__}))
#define R__unlikely(expr)
typedef void((*Func_t)())
Common handling of the error case for RResult<T> (T != void) and RResult<void>
RResultBase & operator=(const RResultBase &other)=delete
bool fIsChecked
Switches to true once the user of an RResult object checks the object status.
RResultBase(RResultBase &&other)=default
std::unique_ptr< RError > fError
This is the nullptr for an RResult representing success.
void Throw()
Throws an RException with fError.
~RResultBase() noexcept(false)
bool Check()
Used by the RResult<T> bool operator.
RResultBase(const RResultBase &other)=delete
RResultBase(RError &&error)
Captures diagnostics related to a ROOT runtime error.
const std::vector< RLocation > & GetStackTrace() const
std::string fMessage
User-facing error message.
void AddFrame(RLocation &&sourceLocation)
Used by R__FORWARD_RESULT.
void AppendToMessage(const std::string &info)
Add more information to the diagnostics.
std::vector< RLocation > fStackTrace
The location of the error related to fMessage plus upper frames if the error is forwarded through the...
RError(const std::string &message, RLocation &&sourceLocation)
Used by R__FAIL.
std::string GetReport() const
Format a dignostics report, e.g. for an exception message.
Base class for all ROOT issued exceptions.
RException(const RError &error)
const RError & GetError() const
RResult(const RResult &other)=delete
static RResult & Forward(RResult &result, RError::RLocation &&sourceLocation)
Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.
RResult(RResult &&other)=default
static RResult Success()
Returns a RResult<void> that captures the successful execution of the function.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
T fValue
The result value in case of successful execution.
static RResult & Forward(RResult &result, RError::RLocation &&sourceLocation)
Used by R__FORWARD_RESULT in order to keep track of the stack trace in case of errors.
RResult(const RResult &other)=delete
RResult(RResult &&other)=default
RResult & operator=(const RResult &other)=delete
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
RLocation(const char *func, const char *file, int line)