Macro vipers::prog_require [−][src]
macro_rules! prog_require {
($invariant : expr, $err : expr $(,) ?) => { ... };
}
Expand description
Require or return a solana_program::program_error::ProgramError, logging the string representation to the program log.
Example
if fail {
return prog_require!(ProgramError::CustomError(10));
}
Ok(())