Skip to content

Internal asserts are no longer printed, since new is_debug_active mechanism. #8909

@mcourteaux

Description

@mcourteaux

In Error.h is:

Halide/src/Error.h

Lines 160 to 168 in b232c0f

T &init(const char *file, const char *function, const int line, const char *condition_string) {
if (debug_is_active_impl(T::verbose_debug_level, file, function, line)) {
contents->msg << T::verbose_name << " at " << file << ":" << line << '\n';
if (condition_string) {
contents->msg << "Condition failed: " << condition_string << '\n';
}
}
return *static_cast<T *>(this);
}

which only conditionally appends the information about the location and error condition.

On the other hand, there is also this:

Halide/src/Error.h

Lines 176 to 178 in b232c0f

ErrorReport &init(const char *file, const char *function, const int line, const char *condition_string) {
return ReportBase<ErrorReport>::init(file, function, line, condition_string) << "Error: ";
}

which appends unconditionally.

Together they combine into internal_asserts reporting like this:

Unhandled exception: Error: 

in AOT generators.

Metadata

Metadata

Assignees

Labels

error_messageImprovements to error messages

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions