Browse Source

修改文案

pull/2/head
JonasBollack 4 years ago
parent
commit
2eb4e5b448
  1. 4
      src/main/java/com/fr/plugin/pack/exception/ReportExceedException.java
  2. 4
      src/main/java/com/fr/plugin/pack/exception/WidgetExceedException.java
  3. 4
      src/main/java/com/fr/plugin/pack/http/PackHttpHandler.java

4
src/main/java/com/fr/plugin/pack/exception/ReportExceedException.java

@ -9,6 +9,10 @@ import com.fr.plugin.pack.PackConstants;
* Created by Jonas on 2020-10-19 * Created by Jonas on 2020-10-19
*/ */
public class ReportExceedException extends FineEngineException { public class ReportExceedException extends FineEngineException {
public ReportExceedException() {
super("模板并发访问超过最大限制");
}
@Override @Override
public String errorCode() { public String errorCode() {
return PackConstants.REPORT_EXCEED_ERROR; return PackConstants.REPORT_EXCEED_ERROR;

4
src/main/java/com/fr/plugin/pack/exception/WidgetExceedException.java

@ -9,6 +9,10 @@ import com.fr.plugin.pack.PackConstants;
* Created by Jonas on 2020-10-19 * Created by Jonas on 2020-10-19
*/ */
public class WidgetExceedException extends FineEngineException { public class WidgetExceedException extends FineEngineException {
public WidgetExceedException() {
super("组件并发访问超过最大限制");
}
@Override @Override
public String errorCode() { public String errorCode() {
return PackConstants.WIDGET_EXCEED_ERROR; return PackConstants.WIDGET_EXCEED_ERROR;

4
src/main/java/com/fr/plugin/pack/http/PackHttpHandler.java

@ -136,10 +136,10 @@ public class PackHttpHandler extends BaseHttpHandler {
private static FineRespond handleException(Exception e) { private static FineRespond handleException(Exception e) {
if (e instanceof ReportExceedException) { if (e instanceof ReportExceedException) {
return FineRespond.fail(((ReportExceedException) e).errorCode(), "模板并发访问超过最大限制"); return FineRespond.fail(((ReportExceedException) e).errorCode(), e.getMessage());
} }
if (e instanceof WidgetExceedException) { if (e instanceof WidgetExceedException) {
return FineRespond.fail(((WidgetExceedException) e).errorCode(), "组件并发访问超过最大限制"); return FineRespond.fail(((WidgetExceedException) e).errorCode(), e.getMessage());
} }
return Reflect.on(BaseAction.class).call("getExceptionRespond", e).get(); return Reflect.on(BaseAction.class).call("getExceptionRespond", e).get();
} }

Loading…
Cancel
Save