QDoc: Report Inja template errors before terminating
When QDoc encounters a malformed template, Inja's default error handling
under `-fno-exceptions` calls `std::abort()` with no diagnostic
output. The user sees a crash but has no indication of what went wrong
or where the template error is, no diagnostics.
Overriding the `INJA_THROW` macro before including Inja routes errors
through `qFatal()`, which logs the full error details (including source
location within the template) before terminating. The process still
exits on template errors, consistent with Qt's no-exception policy, but
now provides actionable information for debugging.
Task-number: QTBUG-143355
Change-Id: I3aacfac62ebae46cee4732b082f359e0d8510b41
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
Reviewed-by: David Boddie <david.boddie@qt.io>