File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
power_grid_model_c/power_grid_model/include/power_grid_model Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,12 @@ class SparseMatrixError : public PowerGridError {
112112
113113class NotObservableError : public PowerGridError {
114114 public:
115- NotObservableError () { append_msg (" Not enough measurements available for state estimation.\n " ); }
115+ NotObservableError (std::string const & msg = " " ) {
116+ append_msg (" Not enough measurements available for state estimation.\n " );
117+ if (!msg.empty ()) {
118+ append_msg (msg + " \n " );
119+ }
120+ }
116121};
117122
118123class IterationDiverge : public PowerGridError {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ inline void necessary_observability_check(MeasuredValues<sym> const& measured_va
6868
6969 auto const [n_voltage_sensor, n_voltage_phasor_sensor] = detail::count_voltage_sensors (n_bus, measured_values);
7070 if (n_voltage_sensor < 1 ) {
71- throw NotObservableError{};
71+ throw NotObservableError{" no voltage sensor found " };
7272 }
7373
7474 Idx const n_injection_sensor = detail::count_bus_injection_sensors (n_bus, measured_values);
You can’t perform that action at this time.
0 commit comments