pub fn build_error_enum(contract_name: &str, variants: &[String]) -> RustItem
Build a #[derive(Debug, thiserror::Error)] enum for contract error types.
#[derive(Debug, thiserror::Error)]
Each variant gets a #[error("VariantName")] attribute for Display impl.
#[error("VariantName")]