Supplement unexpected exception message. (#2389)
This commit is contained in:
parent
7047c97e8b
commit
7419a59125
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue