提交 7419a591 编写于 作者: 彭勇升 pengys 提交者: wu-sheng

Supplement unexpected exception message. (#2389)

上级 7047c97e
......@@ -49,7 +49,7 @@ public enum IndicatorProcess {
try {
indicatorDAO = storageDAO.newIndicatorDao(builderClass.newInstance());
} catch (InstantiationException | IllegalAccessException e) {
throw new UnexpectedException("");
throw new UnexpectedException("Create " + builderClass.getSimpleName() + " indicator DAO failure.", e);
}
IndicatorPersistentWorker minutePersistentWorker = minutePersistentWorker(moduleManager, indicatorDAO, modelName);
......
......@@ -50,7 +50,8 @@ public enum RecordProcess {
try {
recordDAO = storageDAO.newRecordDao(builderClass.newInstance());
} catch (InstantiationException | IllegalAccessException e) {
throw new UnexpectedException("");
throw new UnexpectedException("Create " + builderClass.getSimpleName() + " record DAO failure.", e);
}
RecordPersistentWorker persistentWorker = new RecordPersistentWorker(WorkerIdGenerator.INSTANCES.generate(), modelName,
......
......@@ -50,7 +50,7 @@ public enum TopNProcess {
try {
recordDAO = storageDAO.newRecordDao(builderClass.newInstance());
} catch (InstantiationException | IllegalAccessException e) {
throw new UnexpectedException("");
throw new UnexpectedException("Create " + builderClass.getSimpleName() + " top n record DAO failure.", e);
}
TopNWorker persistentWorker = new TopNWorker(WorkerIdGenerator.INSTANCES.generate(), modelName, moduleManager,
......
......@@ -49,7 +49,7 @@ public enum InventoryProcess {
try {
registerDAO = storageDAO.newRegisterDao(builderClass.newInstance());
} catch (InstantiationException | IllegalAccessException e) {
throw new UnexpectedException("");
throw new UnexpectedException("Create " + builderClass.getSimpleName() + " register DAO failure.", e);
}
RegisterPersistentWorker persistentWorker = new RegisterPersistentWorker(WorkerIdGenerator.INSTANCES.generate(), modelName, moduleManager, registerDAO, scopeId);
......
......@@ -31,7 +31,7 @@ public class StorageEntityAnnotationUtils {
StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
return annotation.name();
} else {
throw new UnexpectedException("");
throw new UnexpectedException("Fail to get model name from class " + aClass.getSimpleName());
}
}
......@@ -40,7 +40,7 @@ public class StorageEntityAnnotationUtils {
StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
return annotation.deleteHistory();
} else {
throw new UnexpectedException("");
throw new UnexpectedException("Fail to get delete history tag from class " + aClass.getSimpleName());
}
}
......@@ -49,7 +49,7 @@ public class StorageEntityAnnotationUtils {
StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
return annotation.builder();
} else {
throw new UnexpectedException("");
throw new UnexpectedException("Fail to get entity builder from class " + aClass.getSimpleName());
}
}
......@@ -58,7 +58,7 @@ public class StorageEntityAnnotationUtils {
StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
return annotation.sourceScopeId();
} else {
throw new UnexpectedException("");
throw new UnexpectedException("Fail to get source scope from class " + aClass.getSimpleName());
}
}
}
......@@ -55,7 +55,7 @@ public class TopologyQueryEsDAO extends EsDAO implements ITopologyQueryDAO {
public List<Call> loadSpecifiedServerSideServiceRelations(Step step, long startTB, long endTB,
List<Integer> serviceIds) throws IOException {
if (CollectionUtils.isEmpty(serviceIds)) {
throw new UnexpectedException("Service id is null");
throw new UnexpectedException("Service id is empty");
}
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
......@@ -70,7 +70,7 @@ public class TopologyQueryEsDAO extends EsDAO implements ITopologyQueryDAO {
public List<Call> loadSpecifiedClientSideServiceRelations(Step step, long startTB, long endTB,
List<Integer> serviceIds) throws IOException {
if (CollectionUtils.isEmpty(serviceIds)) {
throw new UnexpectedException("Service id is null");
throw new UnexpectedException("Service id is empty");
}
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册