Browse Source

retain v2 error values

Jack May 5 years ago
parent
commit
79d78c93f6
2 changed files with 4 additions and 0 deletions
  1. 3 0
      program/src/error.rs
  2. 1 0
      program/src/processor.rs

+ 3 - 0
program/src/error.rs

@@ -34,6 +34,9 @@ pub enum TokenError {
     /// Invalid number of required signers.
     #[error("Invalid number of required signers")]
     InvalidNumberOfRequiredSigners,
+    /// State is uninitialized.
+    #[error("State is unititialized")]
+    UninitializedState,
     /// Instruction does not support native tokens
     #[error("Instruction does not support native tokens")]
     NativeNotSupported,

+ 1 - 0
program/src/processor.rs

@@ -758,6 +758,7 @@ impl PrintProgramError for TokenError {
             TokenError::InvalidNumberOfRequiredSigners => {
                 info!("Error: Invalid number of required signers")
             }
+            TokenError::UninitializedState => info!("Error: State is uninitialized"),
             TokenError::NativeNotSupported => {
                 info!("Error: Instruction does not support native tokens")
             }