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>
commit8a1c2d3e8fd23882fef2c027a5f005a48d1dbdfd
parenta162eede6c44b03b602a24864d9818eb1a9d4553
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeMon, 16 Feb 2026 16:05:55 +0100