Skip to content

Commit

Permalink
be
Browse files Browse the repository at this point in the history
  • Loading branch information
getrebuild committed Jan 21, 2025
1 parent fa8420d commit 8b3c093
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion @rbv
Submodule @rbv updated from fd2547 to f5a2d1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import cn.devezhao.persist4j.engine.ID;
import com.rebuild.core.service.DataSpecificationException;
import lombok.Getter;

/**
* 数据校验专用
Expand All @@ -17,6 +18,7 @@
* @since 2021/6/30
* @see com.rebuild.rbv.trigger.DataValidate
*/
@Getter
public class DataValidateException extends DataSpecificationException {
private static final long serialVersionUID = 4178910284594338317L;

Expand All @@ -36,12 +38,4 @@ public DataValidateException(String msg, boolean weakMode, ID triggerId) {
this.weakMode = weakMode;
this.weakModeTriggerId = triggerId;
}

public boolean isWeakMode() {
return weakMode;
}

public ID getWeakModeTriggerId() {
return weakModeTriggerId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cn.devezhao.persist4j.engine.ID;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.googlecode.aviator.exception.StandardError;
import com.rebuild.core.Application;
import com.rebuild.core.metadata.EntityHelper;
import com.rebuild.core.metadata.MetadataHelper;
Expand Down Expand Up @@ -216,6 +217,8 @@ protected void execAction(OperatingContext context, TriggerWhen when) {

// DataValidate 直接抛出
if (ex instanceof DataValidateException) throw ex;
// throw of Aviator 抛出
if (ex instanceof StandardError) throw new DataValidateException(ex.getLocalizedMessage());

log.error("Trigger execution failed : {} << {}", action, context, ex);
CommonsLog.createLog(TYPE_TRIGGER,
Expand Down

0 comments on commit 8b3c093

Please sign in to comment.