175175import org .apache .iotdb .db .conf .IoTDBDescriptor ;
176176import org .apache .iotdb .db .exception .BatchProcessException ;
177177import org .apache .iotdb .db .exception .StorageEngineException ;
178+ import org .apache .iotdb .db .exception .ainode .AINodeConnectionException ;
178179import org .apache .iotdb .db .exception .metadata .PathNotExistException ;
179180import org .apache .iotdb .db .exception .metadata .SchemaQuotaExceededException ;
180181import org .apache .iotdb .db .exception .sql .SemanticException ;
@@ -3705,8 +3706,8 @@ public SettableFuture<ConfigTaskResult> createModel(String modelId, String uri)
37053706 } else {
37063707 future .set (new ConfigTaskResult (TSStatusCode .SUCCESS_STATUS ));
37073708 }
3708- } catch (final TException | ClientManagerException e ) {
3709- future .setException (e );
3709+ } catch (final ClientManagerException | TException e ) {
3710+ future .setException (new AINodeConnectionException ( e ) );
37103711 }
37113712 return future ;
37123713 }
@@ -3723,7 +3724,7 @@ public SettableFuture<ConfigTaskResult> dropModel(final String modelId) {
37233724 future .set (new ConfigTaskResult (TSStatusCode .SUCCESS_STATUS ));
37243725 }
37253726 } catch (final ClientManagerException | TException e ) {
3726- future .setException (e );
3727+ future .setException (new AINodeConnectionException ( e ) );
37273728 }
37283729 return future ;
37293730 }
@@ -3743,8 +3744,8 @@ public SettableFuture<ConfigTaskResult> showModels(final String modelId) {
37433744 return future ;
37443745 }
37453746 ShowModelsTask .buildTsBlock (resp , future );
3746- } catch (final Exception e ) {
3747- future .setException (e );
3747+ } catch (final ClientManagerException | TException e ) {
3748+ future .setException (new AINodeConnectionException ( e ) );
37483749 }
37493750 return future ;
37503751 }
@@ -3762,8 +3763,8 @@ public SettableFuture<ConfigTaskResult> showLoadedModels(List<String> deviceIdLi
37623763 return future ;
37633764 }
37643765 ShowLoadedModelsTask .buildTsBlock (resp , future );
3765- } catch (final Exception e ) {
3766- future .setException (e );
3766+ } catch (final ClientManagerException | TException e ) {
3767+ future .setException (new AINodeConnectionException ( e ) );
37673768 }
37683769 return future ;
37693770 }
@@ -3779,8 +3780,8 @@ public SettableFuture<ConfigTaskResult> showAIDevices() {
37793780 return future ;
37803781 }
37813782 ShowAIDevicesTask .buildTsBlock (resp , future );
3782- } catch (final Exception e ) {
3783- future .setException (e );
3783+ } catch (final ClientManagerException | TException e ) {
3784+ future .setException (new AINodeConnectionException ( e ) );
37843785 }
37853786 return future ;
37863787 }
@@ -3798,8 +3799,8 @@ public SettableFuture<ConfigTaskResult> loadModel(
37983799 } else {
37993800 future .set (new ConfigTaskResult (TSStatusCode .SUCCESS_STATUS ));
38003801 }
3801- } catch (final Exception e ) {
3802- future .setException (e );
3802+ } catch (final ClientManagerException | TException e ) {
3803+ future .setException (new AINodeConnectionException ( e ) );
38033804 }
38043805 return future ;
38053806 }
@@ -3817,8 +3818,8 @@ public SettableFuture<ConfigTaskResult> unloadModel(
38173818 } else {
38183819 future .set (new ConfigTaskResult (TSStatusCode .SUCCESS_STATUS ));
38193820 }
3820- } catch (final Exception e ) {
3821- future .setException (e );
3821+ } catch (final ClientManagerException | TException e ) {
3822+ future .setException (new AINodeConnectionException ( e ) );
38223823 }
38233824 return future ;
38243825 }
@@ -3850,8 +3851,8 @@ public SettableFuture<ConfigTaskResult> createTuningTask(
38503851 } else {
38513852 future .set (new ConfigTaskResult (TSStatusCode .SUCCESS_STATUS ));
38523853 }
3853- } catch (final Exception e ) {
3854- future .setException (e );
3854+ } catch (final ClientManagerException | TException e ) {
3855+ future .setException (new AINodeConnectionException ( e ) );
38553856 }
38563857 return future ;
38573858 }
0 commit comments