Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Emmers <[email protected]>
  • Loading branch information
marcemmers committed Aug 8, 2024
1 parent 61b1106 commit d14793f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/ocpp/v16/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ std::string messagetype_to_string(MessageType m) {
return "InternalError";
}

throw EnumToStringException{e, "MessageType"};
throw EnumToStringException{m, "MessageType"};
}

MessageType string_to_messagetype(const std::string& s) {
Expand Down
10 changes: 5 additions & 5 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ ChargePoint::on_get_15118_ev_certificate_request(const Get15118EVCertificateRequ
try {
ocpp::CallResult<Get15118EVCertificateResponse> call_result = response_message.message;
return call_result.msg;
} catch (const EnumConversionException &e) {
} catch (const EnumConversionException& e) {
EVLOG_error << "EnumConversionException during handling of message: " << e.what();
auto call_error = CallError(response_message.uniqueId, "FormationViolation", e.what(), json({}));
this->send(call_error);
Expand Down Expand Up @@ -1351,7 +1351,7 @@ void ChargePoint::message_callback(const std::string& message) {
EVLOG_error << "JSON exception during reception of message: " << e.what();
this->send(CallError(MessageId("-1"), "RpcFrameworkError", e.what(), json({})));
return;
} catch (const EnumConversionException &e) {
} catch (const EnumConversionException& e) {
EVLOG_error << "EnumConversionException during handling of message: " << e.what();
auto call_error = CallError(MessageId("-1"), "FormationViolation", e.what(), json({}));
this->send(call_error);
Expand Down Expand Up @@ -1429,7 +1429,7 @@ void ChargePoint::message_callback(const std::string& message) {
EVLOG_error << "Exception during handling of message: " << e.what();
auto call_error = CallError(enhanced_message.uniqueId, "OccurrenceConstraintViolation", e.what(), json({}));
this->send(call_error);
} catch (const EnumConversionException &e) {
} catch (const EnumConversionException& e) {
EVLOG_error << "EnumConversionException during handling of message: " << e.what();
auto call_error = CallError(enhanced_message.uniqueId, "FormationViolation", e.what(), json({}));
this->send(call_error);
Expand Down Expand Up @@ -2094,7 +2094,7 @@ AuthorizeResponse ChargePoint::authorize_req(const IdToken id_token, const std::
try {
ocpp::CallResult<AuthorizeResponse> call_result = enhanced_message.message;
return call_result.msg;
} catch (const EnumConversionException &e) {
} catch (const EnumConversionException& e) {
EVLOG_error << "EnumConversionException during handling of message: " << e.what();
auto call_error = CallError(enhanced_message.uniqueId, "FormationViolation", e.what(), json({}));
this->send(call_error);
Expand Down Expand Up @@ -3595,7 +3595,7 @@ std::optional<DataTransferResponse> ChargePoint::data_transfer_req(const DataTra
try {
ocpp::CallResult<DataTransferResponse> call_result = enhanced_message.message;
response = call_result.msg;
} catch (const EnumConversionException &e) {
} catch (const EnumConversionException& e) {
EVLOG_error << "EnumConversionException during handling of message: " << e.what();
auto call_error = CallError(enhanced_message.uniqueId, "FormationViolation", e.what(), json({}));
this->send(call_error);
Expand Down
3 changes: 1 addition & 2 deletions lib/ocpp/v201/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest

#include <everest/logging.hpp>
#include <ocpp/v201/types.hpp>
#include <ocpp/common/types.hpp>

#include <ocpp/v201/types.hpp>

namespace ocpp {
namespace v201 {
Expand Down

0 comments on commit d14793f

Please sign in to comment.