Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
  • Loading branch information
maaikez committed Nov 25, 2024
1 parent 7840131 commit d9b3372
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The following table shows the known CSMS with which this library was tested.
| E. Transactions | ✅ yes |
| F. RemoteControl | ✅ yes |
| G. Availability | ✅ yes |
| H. Reservation | WIP |
| H. Reservation | ✅ yes |
| I. TariffAndCost | ✅ yes |
| J. MeterValues | ✅ yes |
| K. SmartCharging | WIP |
Expand Down
8 changes: 7 additions & 1 deletion lib/ocpp/v201/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ std::optional<ConnectorEnum> Evse::get_evse_connector_type(const uint32_t connec
return std::nullopt;
}

return conversions::string_to_connector_enum(connector_type.value());
try {
return conversions::string_to_connector_enum(connector_type.value());
}
catch (const StringToEnumException& e) {
EVLOG_warning << "Could not convert to ConnectorEnum: " << connector_type.value();
return std::nullopt;
}
}

void Evse::open_transaction(const std::string& transaction_id, const int32_t connector_id, const DateTime& timestamp,
Expand Down

0 comments on commit d9b3372

Please sign in to comment.