commit
ae13a5a370
@ -54,6 +54,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.thingsboard.server.common.data.CacheConstants.ASSET_CACHE;
|
||||
@ -141,7 +142,7 @@ public class BaseAssetService extends AbstractEntityService implements AssetServ
|
||||
if (entityViews != null && !entityViews.isEmpty()) {
|
||||
throw new DataValidationException("Can't delete asset that is assigned to entity views!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
log.error("Exception while finding entity views for assetId [{}]", assetId, e);
|
||||
throw new RuntimeException("Exception while finding entity views for assetId [" + assetId + "]", e);
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.thingsboard.server.common.data.CacheConstants.DEVICE_CACHE;
|
||||
@ -158,7 +159,7 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe
|
||||
if (entityViews != null && !entityViews.isEmpty()) {
|
||||
throw new DataValidationException("Can't delete device that is assigned to entity views!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
log.error("Exception while finding entity views for deviceId [{}]", deviceId, e);
|
||||
throw new RuntimeException("Exception while finding entity views for deviceId [" + deviceId + "]", e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user