summaryrefslogtreecommitdiff
path: root/lib/model.py
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-02-12 12:17:34 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-02-12 12:17:34 +0100
commit27697c537df10f764750602d81b3807523236b23 (patch)
treec5e57a5e9a0145851da4e7f8b2278b518daa8fae /lib/model.py
parent486690f31dfe8da33fbd0711137844424d0321eb (diff)
PTAModel.to_json: Handle missing states due to --filter-observations
Diffstat (limited to 'lib/model.py')
-rw-r--r--lib/model.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py
index 1c0ee01..5844113 100644
--- a/lib/model.py
+++ b/lib/model.py
@@ -1101,7 +1101,12 @@ class PTAModel(AnalyticModel):
for origin, destination in self.get_transition_states_from_traces(
transition
):
- pta.add_transition(origin, destination, transition)
+ try:
+ pta.add_transition(origin, destination, transition)
+ except KeyError as e:
+ logger.warning(
+ f"to_json: Missing transition ({e}). Note that --filter-observation is incompatible with JSON export."
+ )
pta.update(
param_info, static_error=static_quality, function_error=analytic_quality
)