in code-refactoring/switch-statement/java/src/main/java/com/epam/aicode/java/MessageProcessor.java [5:16]
public void handleMessageError(Message message) {
String errorCode = message.getErrorCode();
if (errorCode.equals("100")) {
throw new MessageException("Exception with code 100 occurred while processing the message");
}
if (errorCode.equals("200")) {
throw new MessageException("Exception with code 200 occurred while processing the message");
}
if (errorCode.equals("300")) {
throw new MessageException("Exception with code 300 occurred while processing the message");
}
}