clearer errors
This commit is contained in:
parent
95b14ee41b
commit
5ac29af132
1 changed files with 9 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ def check_property():
|
||||||
try:
|
try:
|
||||||
phi = parse(prop)
|
phi = parse(prop)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = make_response(jsonify("error: " + str(e)))
|
res = make_response(jsonify("parse error: " + str(e)))
|
||||||
res.headers['Access-Control-Allow-Origin'] = '*'
|
res.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
res.content_type = "application/json"
|
res.content_type = "application/json"
|
||||||
return res
|
return res
|
||||||
|
|
@ -20,7 +20,14 @@ def check_property():
|
||||||
processed_traces = {}
|
processed_traces = {}
|
||||||
for trace_name, trace in traces.items():
|
for trace_name, trace in traces.items():
|
||||||
processed_traces[trace_name] = [(simtime, value) for [simtime, value] in trace]
|
processed_traces[trace_name] = [(simtime, value) for [simtime, value] in trace]
|
||||||
res = make_response(jsonify(phi(processed_traces, time=None, quantitative=False)))
|
try:
|
||||||
|
result = phi(processed_traces, time=None, quantitative=False)
|
||||||
|
except Exception as e:
|
||||||
|
res = make_response(jsonify("eval error: " + str(e)))
|
||||||
|
res.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
|
res.content_type = "application/json"
|
||||||
|
return res
|
||||||
|
res = make_response(jsonify(result))
|
||||||
res.headers['Access-Control-Allow-Origin'] = '*'
|
res.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
res.content_type = "application/json"
|
res.content_type = "application/json"
|
||||||
return res
|
return res
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue