1 package org.openkilda.service;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
6 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.core.env.Environment;
8 import org.springframework.stereotype.Component;
19 public static final String
CODE =
".code";
20 public static final String
MESSAGE =
".message";
23 private Environment authMessages;
32 LOGGER.error(
"[getError] Error message: " + errorMsg);
33 String errorMessageCode = authMessages.getProperty(errorMsg +
CODE);
34 String errorMessage = authMessages.getProperty(errorMsg +
MESSAGE);
35 return new Error(Integer.valueOf(errorMessageCode), errorMessage);
45 LOGGER.info(
"[getMessage] Message: " + msg);
46 return authMessages.getProperty(msg);
Error getError(final String errorMsg)
static final String MESSAGE
String getMessage(final String msg)