mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Refactor the error message
This commit is contained in:
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…
Reference in New Issue
Block a user