Skip to content

Commit

Permalink
Catch exception from ert
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Jan 18, 2023
1 parent 9e9b39e commit 7eed7fa
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions semeio/workflows/ahm_analysis/ahmanalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,16 @@ def run(
)
# Get the prior scalar parameter distributions
prior_data = self.facade.load_all_gen_kw_data(prior_name)
raise_if_empty(
dataframes=[prior_data, self.facade.load_all_misfit_data(prior_name)],
messages=[
"Empty prior ensemble",
"Empty parameters set for History Matching",
],
)
try:
raise_if_empty(
dataframes=[prior_data, self.facade.load_all_misfit_data(prior_name)],
messages=[
"Empty prior ensemble",
"Empty parameters set for History Matching",
],
)
except KeyError as err:
raise ValidationError(f"Empty prior ensemble: {err}") from err

# create dataframe with observations vectors (1 by 1 obs and also all_obs)
combinations = make_obs_groups(key_map)
Expand Down

0 comments on commit 7eed7fa

Please sign in to comment.