Merge InstructionError and ProgramError
From the user's perspective, it's just an instruction error. For program-specific errors, we still have InstructionError::CustomError.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::native_program::ProgramError;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::solana_entrypoint;
|
||||
use solana_sdk::transaction::InstructionError;
|
||||
|
||||
solana_entrypoint!(entrypoint);
|
||||
fn entrypoint(
|
||||
@@ -9,6 +9,6 @@ fn entrypoint(
|
||||
_keyed_accounts: &mut [KeyedAccount],
|
||||
_data: &[u8],
|
||||
_tick_height: u64,
|
||||
) -> Result<(), ProgramError> {
|
||||
Err(ProgramError::GenericError)
|
||||
) -> Result<(), InstructionError> {
|
||||
Err(InstructionError::GenericError)
|
||||
}
|
||||
|
Reference in New Issue
Block a user