How can I throw a Blueprint compile error from a CustomThunk?
I’m pretty sure there’s no way to do this. If you want custom compiler results you need either a compiler extension or, the easier option, a custom k2node.
Other than those options, you’re limited to the regular compile errors that are support through the UFUNCTION markup and function parameters.
I actually recall someone trying this using the FFrame::KismetExecutionMessage() function to get it to pop an error message in the editor, I believe. However, you may have to test it to ensure it works like you’re wanting.
But that would be a runtime error, not a blueprint compile-time error, wouldn’t it?