Commit 52f70751 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: enable error status in flow model

parent c83c078b
Pipeline #16563 passed with stage
in 1 minute and 32 seconds
......@@ -64,6 +64,8 @@ status_string(const status s) noexcept
"model_quantifier_shifting_value_neg",
"model_quantifier_shifting_value_less_1",
"model_time_func_bad_init_message",
"model_flow_bad_samplerate",
"model_flow_bad_data",
"gui_not_enough_memory",
"io_file_format_error",
"io_file_format_model_error",
......@@ -74,6 +76,8 @@ status_string(const status s) noexcept
"io_file_format_dynamics_init_error"
};
static_assert(std::size(str) == status_size());
return str[static_cast<int>(s)];
}
......
......@@ -176,6 +176,9 @@ enum class status
model_time_func_bad_init_message,
model_flow_bad_samplerate,
model_flow_bad_data,
gui_not_enough_memory,
io_file_format_error,
......@@ -5018,10 +5021,10 @@ struct flow
status initialize(data_array<message, message_id>& /*init*/) noexcept
{
// irt_return_if_fail(default_samplerate > 0.,
// status::model_flow_bad_samplerate);
irt_return_if_fail(default_samplerate > 0.,
status::model_flow_bad_samplerate);
// irt_return_if_fail(default_size > 1, status::model_flow_bad_data);
irt_return_if_fail(default_size > 1, status::model_flow_bad_data);
sigma = 1.0 / default_samplerate;
accu_sigma = 0.;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment