WANG 6 rokov pred
rodič
commit
197c03c149

+ 3 - 0
src/main/java/cn/com/qmth/examcloud/web/cache/FullObjectRedisCache.java

@@ -6,6 +6,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.assertj.core.util.Arrays;
 
 import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
+import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
 import cn.com.qmth.examcloud.web.support.SpringContextHolder;
@@ -74,6 +75,8 @@ public abstract class FullObjectRedisCache<T> implements FullObjectCache<T> {
 		T t = null;
 		try {
 			t = loadFromResource(keys);
+		} catch (StatusException e) {
+			throw e;
 		} catch (Exception e) {
 			throw new ExamCloudRuntimeException("fail to load data. key=" + key, e);
 		}

+ 3 - 0
src/main/java/cn/com/qmth/examcloud/web/cache/RandomObjectRedisCache.java

@@ -4,6 +4,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.assertj.core.util.Arrays;
 
 import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
+import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
 import cn.com.qmth.examcloud.web.support.SpringContextHolder;
 
@@ -66,6 +67,8 @@ public abstract class RandomObjectRedisCache<T extends RandomCacheBean> implemen
 		T t = null;
 		try {
 			t = loadFromResource(keys);
+		} catch (StatusException e) {
+			throw e;
 		} catch (Exception e) {
 			throw new ExamCloudRuntimeException("fail to load data. key=" + key, e);
 		}