Skip to content

Commit

Permalink
Exit with the error on unsupported bitops schema data type in fail_fa…
Browse files Browse the repository at this point in the history
…st mode (#368)

Updating exit logic
  • Loading branch information
PhillypHenning authored Dec 9, 2022
1 parent 6b4caff commit 7546b9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/plugins/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def __init__(self, name, schema_key, schema_property_values=None):
setattr(self, _property, schema_property_values[_property])
except KeyError as exc:
setattr(self, _property, None)
logger.error(exc)
if BITOPS_fast_fail_mode:
raise exc
sys.exit(101)

logger.info(f"\n\tNEW SCHEMA:{self.print_schema()}")

Expand Down Expand Up @@ -158,7 +159,8 @@ def apply_data_type(data_type, convert_value):
return bool(convert_value)

if BITOPS_fast_fail_mode:
raise ValueError(f"Data type not supported: [{data_type}]")
logger.error(f"Data type not supported: [{data_type}]")
sys.exit(101)

logger.warning(f"Data type not supported: [{data_type}]")
return None
Expand Down

0 comments on commit 7546b9d

Please sign in to comment.