Preserve all information from wrapped error
When Antora wraps an error (which happens in the content aggregator, UI loader, and file publisher), the "Caused by" clause should preserve all information from the wrapped error. In order to do so, Antora should pass the error through the built-in inspect
function instead of using the information from the stack
property. The inspect function will ensure that any visible fields from the error are included in the output, just as though the error had been passed to console.log. This will give the end user all the information that is available about the cause of the error.
In the case of a fatal error, this additional information will only be visible when the --stacktrace
option is supplied.