Commit ae13a5a370c1069a6476eaa75cb42538e8528a6f
Committed by
GitHub
Merge pull request #1110 from thingsboard/typo-fix
Fixed exception msg
Showing
2 changed files
with
4 additions
and
2 deletions
... | ... | @@ -54,6 +54,7 @@ import java.util.ArrayList; |
54 | 54 | import java.util.Collections; |
55 | 55 | import java.util.Comparator; |
56 | 56 | import java.util.List; |
57 | +import java.util.concurrent.ExecutionException; | |
57 | 58 | import java.util.stream.Collectors; |
58 | 59 | |
59 | 60 | import static org.thingsboard.server.common.data.CacheConstants.ASSET_CACHE; |
... | ... | @@ -141,7 +142,7 @@ public class BaseAssetService extends AbstractEntityService implements AssetServ |
141 | 142 | if (entityViews != null && !entityViews.isEmpty()) { |
142 | 143 | throw new DataValidationException("Can't delete asset that is assigned to entity views!"); |
143 | 144 | } |
144 | - } catch (Exception e) { | |
145 | + } catch (ExecutionException | InterruptedException e) { | |
145 | 146 | log.error("Exception while finding entity views for assetId [{}]", assetId, e); |
146 | 147 | throw new RuntimeException("Exception while finding entity views for assetId [" + assetId + "]", e); |
147 | 148 | } | ... | ... |
... | ... | @@ -58,6 +58,7 @@ import java.util.Collections; |
58 | 58 | import java.util.Comparator; |
59 | 59 | import java.util.List; |
60 | 60 | import java.util.Optional; |
61 | +import java.util.concurrent.ExecutionException; | |
61 | 62 | import java.util.stream.Collectors; |
62 | 63 | |
63 | 64 | import static org.thingsboard.server.common.data.CacheConstants.DEVICE_CACHE; |
... | ... | @@ -158,7 +159,7 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe |
158 | 159 | if (entityViews != null && !entityViews.isEmpty()) { |
159 | 160 | throw new DataValidationException("Can't delete device that is assigned to entity views!"); |
160 | 161 | } |
161 | - } catch (Exception e) { | |
162 | + } catch (ExecutionException | InterruptedException e) { | |
162 | 163 | log.error("Exception while finding entity views for deviceId [{}]", deviceId, e); |
163 | 164 | throw new RuntimeException("Exception while finding entity views for deviceId [" + deviceId + "]", e); |
164 | 165 | } | ... | ... |