Refactor the error message

merge-requests/111/head
inoshperera 5 years ago
parent fd7b985025
commit 64e55629f1

@ -110,12 +110,15 @@ public class RemoteSessionManagementServiceImpl implements RemoteSessionManageme
+ " , deviceId : " + deviceId);
}
} catch (OperationManagementException | InvalidDeviceException e) {
log.error("error", e);
throw new RemoteSessionManagementException("Error occurred while adding initial operation for the " +
"device Type : " + deviceType + " , deviceId : " + deviceId);
String msg = "Error occurred while adding initial operation for the " +
"device Type : " + deviceType + " , deviceId : " + deviceId;
log.error(msg, e);
throw new RemoteSessionManagementException(msg);
} catch (DeviceAccessAuthorizationException e) {
throw new RemoteSessionManagementException("Error occurred while device access authorization for the " +
"device Type : " + deviceType + " , " + "deviceId : " + deviceId);
String msg = "Error occurred while device access authorization for the " +
"device Type : " + deviceType + " , " + "deviceId : " + deviceId;
log.error(msg, e);
throw new RemoteSessionManagementException(msg);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}

Loading…
Cancel
Save