28 explicit Error(
const char *msg);
29 explicit Error(
const std::string &msg);
38 virtual const
char *what() const noexcept;
79 virtual void warning(
const char *msg) = 0;
80 virtual void error(
const char *msg) = 0;
155#define _halide_internal_assertion(condition, flags) \
157 (condition) ? (void)0 : ::Halide::Internal::Voidifier() & ::Halide::Internal::ErrorReport(__FILE__, __LINE__, #condition, flags).ref()
159#define internal_error Halide::Internal::ErrorReport(__FILE__, __LINE__, nullptr, 0)
160#define user_error Halide::Internal::ErrorReport(__FILE__, __LINE__, nullptr, Halide::Internal::ErrorReport::User)
161#define user_warning Halide::Internal::ErrorReport(__FILE__, __LINE__, nullptr, Halide::Internal::ErrorReport::User | Halide::Internal::ErrorReport::Warning)
162#define halide_runtime_error Halide::Internal::ErrorReport(__FILE__, __LINE__, nullptr, Halide::Internal::ErrorReport::User | Halide::Internal::ErrorReport::Runtime)
164#define internal_assert(c) _halide_internal_assertion(c, 0)
165#define user_assert(c) _halide_internal_assertion(c, Halide::Internal::ErrorReport::User)
171#define _halide_user_assert(c) _halide_internal_assertion(c, Halide::Internal::ErrorReport::User)
Defines functions for debug logging during code generation.
This file declares the routines used by Halide internally in its runtime.
#define HALIDE_EXPORT_SYMBOL
#define HALIDE_ALWAYS_INLINE
CompileTimeErrorReporter is used at compile time (not runtime) when an error or warning is generated ...
virtual void warning(const char *msg)=0
virtual void error(const char *msg)=0
virtual ~CompileTimeErrorReporter()=default
HALIDE_ALWAYS_INLINE void operator&(ErrorReport &)
HALIDE_ALWAYS_INLINE Voidifier()=default
HALIDE_EXPORT_SYMBOL void unhandled_exception_handler()
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
bool exceptions_enabled()
Query whether Halide was compiled with exceptions.
void set_custom_compile_time_error_reporter(CompileTimeErrorReporter *error_reporter)
The default error reporter logs to stderr, then throws an exception (if HALIDE_WITH_EXCEPTIONS) or ca...
An error that occurs while compiling a Halide pipeline that Halide attributes to a user error.
CompileError(const char *msg)
CompileError(const std::string &msg)
A base class for Halide errors.
Error(const std::string &msg)
Error & operator=(const Error &)
~ErrorReport() noexcept(false)
When you're done using << on the object, and let it fall out of scope, this errors out,...
ErrorReport(const char *f, int l, const char *cs, int flags)
ErrorReport & operator<<(const T &x)
HALIDE_ALWAYS_INLINE ErrorReport & ref()
An error that occurs while compiling a Halide pipeline that Halide attributes to an internal compiler...
InternalError(const std::string &msg)
InternalError(const char *msg)
An error that occurs while running a JIT-compiled Halide pipeline.
RuntimeError(const char *msg)
RuntimeError(const std::string &msg)