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 ()
 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 65 of file Error.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
User 
Warning 
Runtime 

Definition at line 66 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 ( )

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 78 of file Error.h.

◆ operator<<()

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

Definition at line 83 of file Error.h.

References msg.

Member Data Documentation

◆ msg

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

Definition at line 72 of file Error.h.

Referenced by operator<<().

◆ flags

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

Definition at line 73 of file Error.h.


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