diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java index 430448a14d86..679288e7840e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java @@ -146,8 +146,6 @@ private static TSStatus tryCatchQueryException(Exception e) { TSStatusCode.QUERY_NOT_ALLOWED, INFO_NOT_ALLOWED_IN_BATCH_ERROR + rootCause.getMessage()); } else if (t instanceof IoTDBException) { return RpcUtils.getStatus(((IoTDBException) t).getErrorCode(), rootCause.getMessage()); - } else if (t instanceof IoTDBRuntimeException) { - return RpcUtils.getStatus(((IoTDBRuntimeException) t).getErrorCode(), rootCause.getMessage()); } else if (t instanceof TsFileRuntimeException) { return RpcUtils.getStatus(TSStatusCode.TSFILE_PROCESSOR_ERROR, rootCause.getMessage()); } else if (t instanceof SemanticException) { @@ -156,6 +154,8 @@ private static TSStatus tryCatchQueryException(Exception e) { ((IoTDBException) t.getCause()).getErrorCode(), rootCause.getMessage()); } return RpcUtils.getStatus(TSStatusCode.SEMANTIC_ERROR, rootCause.getMessage()); + } else if (t instanceof IoTDBRuntimeException) { + return RpcUtils.getStatus(((IoTDBRuntimeException) t).getErrorCode(), t.getMessage()); } else if (t instanceof ModelException) { return RpcUtils.getStatus(((ModelException) t).getStatusCode(), rootCause.getMessage()); } else if (t instanceof MemoryNotEnoughException) {