Halide
Halide::Internal::ErrorReport Struct Reference

#include <Error.h>

Public Types

enum  { User = 0x0001, Warning = 0x0002, Runtime = 0x0004 }
 

Public Member Functions

 ErrorReport (const char *f, int l, const char *cs, int flags)
 
HALIDE_ALWAYS_INLINE ErrorReportref ()
 
template<typename T >
ErrorReportoperator<< (const T &x)
 
 ~ErrorReport () noexcept(false)
 When you're done using << on the object, and let it fall out of scope, this errors out, or throws an exception if they are enabled. More...
 

Public Attributes

std::ostringstream msg
 
const int flags
 

Detailed Description

Definition at line 94 of file Error.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
User 
Warning 
Runtime 

Definition at line 95 of file Error.h.

Constructor & Destructor Documentation

◆ ErrorReport()

Halide::Internal::ErrorReport::ErrorReport ( const char *  f,
int  l,
const char *  cs,
int  flags 
)

◆ ~ErrorReport()

Halide::Internal::ErrorReport::~ErrorReport ( )
noexcept

When you're done using << on the object, and let it fall out of scope, this errors out, or throws an exception if they are enabled.

This is a little dangerous because the destructor will also be called if there's an exception in flight due to an error in one of the arguments passed to operator<<. We handle this by only actually throwing if there isn't an exception in flight already.

Member Function Documentation

◆ ref()

HALIDE_ALWAYS_INLINE ErrorReport& Halide::Internal::ErrorReport::ref ( )
inline

Definition at line 107 of file Error.h.

◆ operator<<()

template<typename T >
ErrorReport& Halide::Internal::ErrorReport::operator<< ( const T &  x)
inline

Definition at line 112 of file Error.h.

References msg.

Member Data Documentation

◆ msg

std::ostringstream Halide::Internal::ErrorReport::msg

Definition at line 101 of file Error.h.

Referenced by operator<<().

◆ flags

const int Halide::Internal::ErrorReport::flags

Definition at line 102 of file Error.h.


The documentation for this struct was generated from the following file: