Skip to content

Conversation

@MarijnS95
Copy link
Member

When just running with the latest error changes from PR #80, I was wondering why my error messages were disappearing but the HRESULT was printed twice (this is on runs with -WX to treat warnings as errors). Turns out I typo'd the thiserror format string to print the HRESULT in the second place as well rather than the error blob, resulting in: Dxc error -80004005: -0x80004005. Replacing that with {1} gives the expected warning/error text from shader compilation again.

When just running with the latest error changes from PR #80, I was
wondering why my error messages were disappearing but the `HRESULT` was
printed twice (this is on runs with `-WX` to treat warnings as errors).
Turns out I typo'd the `thiserror` format string to print the `HRESULT`
in the second place as well rather than the error blob, resulting in:
`Dxc error -80004005: -0x80004005`.  Replacing that with `{1}` gives the
expected warning/error text from shader compilation again.
@MarijnS95 MarijnS95 merged commit 291a5b8 into main Sep 16, 2025
4 checks passed
@MarijnS95 MarijnS95 deleted the error-oopsie branch September 16, 2025 13:44
@MarijnS95
Copy link
Member Author

MarijnS95 commented Oct 23, 2025

Future thought: not sure why I didn't move the {0:x} (it's not even #x?) to the left side; the number is formatted with hexadecimals but without 0x prefix. Presumably some weirdness because HRESULT is a simple typedef and implementing traits for extern types or primitives like i32 isn't allowed; strange that hassle-rs compiles anyway unless catching it requires an edition change.

EDIT: Looking at my output, I saw Dxc error -80004005: -0x80004005 before this patch, and now see: Dxc error -0x80004005: the_error_string. I misread the patch, 0:x was overriding the format config to print hexadecimal without alternative, while the original was configured as :#x to print with alternative, which prefixes it with 0x.

The -0x8....... double negation is odd though. EDIT2: #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants