From ab9814bc1052726cf95c191ac294502140718dce Mon Sep 17 00:00:00 2001 From: OmarTawfik <15987992+OmarTawfik@users.noreply.github.com> Date: Wed, 18 Oct 2023 00:14:14 -0700 Subject: [PATCH] simulate artificial panic --- .../codegen/parser/runtime/src/templates/language.rs.jinja2 | 4 ++++ crates/solidity/outputs/cargo/crate/src/generated/language.rs | 4 ++++ crates/solidity/outputs/npm/crate/src/generated/language.rs | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/crates/codegen/parser/runtime/src/templates/language.rs.jinja2 b/crates/codegen/parser/runtime/src/templates/language.rs.jinja2 index 47ddf4d5c7..1e1e8f218a 100644 --- a/crates/codegen/parser/runtime/src/templates/language.rs.jinja2 +++ b/crates/codegen/parser/runtime/src/templates/language.rs.jinja2 @@ -49,6 +49,10 @@ impl Language { ]; pub fn new(version: Version) -> std::result::Result { + if version == Version::new(999, 999, 999) { + panic!("Simulating an internal panic, Armando!"); + } + if Self::SUPPORTED_VERSIONS.contains(&version) { Ok(Self { {%- for version in code.referenced_versions %} diff --git a/crates/solidity/outputs/cargo/crate/src/generated/language.rs b/crates/solidity/outputs/cargo/crate/src/generated/language.rs index a8cfe2bd86..d184d502b0 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/language.rs @@ -136,6 +136,10 @@ impl Language { ]; pub fn new(version: Version) -> std::result::Result { + if version == Version::new(999, 999, 999) { + panic!("Simulating an internal panic, Armando!"); + } + if Self::SUPPORTED_VERSIONS.contains(&version) { Ok(Self { version_is_at_least_0_4_21: Version::new(0, 4, 21) <= version, diff --git a/crates/solidity/outputs/npm/crate/src/generated/language.rs b/crates/solidity/outputs/npm/crate/src/generated/language.rs index a8cfe2bd86..d184d502b0 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/language.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/language.rs @@ -136,6 +136,10 @@ impl Language { ]; pub fn new(version: Version) -> std::result::Result { + if version == Version::new(999, 999, 999) { + panic!("Simulating an internal panic, Armando!"); + } + if Self::SUPPORTED_VERSIONS.contains(&version) { Ok(Self { version_is_at_least_0_4_21: Version::new(0, 4, 21) <= version,