diff --git a/vipers/Cargo.toml b/vipers/Cargo.toml index 2ec6260..d78c84d 100644 --- a/vipers/Cargo.toml +++ b/vipers/Cargo.toml @@ -11,8 +11,9 @@ readme = "../README.md" keywords = ["solana", "saber", "anchor"] [features] -default = [] +default = ["show-error-locations"] ata = ["spl-associated-token-account"] +show-error-locations = [] [dependencies] anchor-lang = ">=0.22, <=0.24" diff --git a/vipers/src/assert.rs b/vipers/src/assert.rs index 0b4b6f6..e5a0547 100644 --- a/vipers/src/assert.rs +++ b/vipers/src/assert.rs @@ -84,6 +84,7 @@ macro_rules! program_err { #[macro_export] macro_rules! log_code_location { () => { + #[cfg(feature = "show-error-locations")] msg!("Error thrown at {}:{}", file!(), line!()); }; }