Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 1c9980c

Browse files
committed
找不到invoker时抛出异常
1 parent 8bc0db8 commit 1c9980c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/org/suren/autotest/web/framework/core/suite/SuiteRunner.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,8 @@ private String performAction(SuiteAction action, Field pageField,
557557
case "invoke":
558558
if(StringUtils.isBlank(invoker))
559559
{
560-
logger.error("The action in page [{}] is invoke, "
561-
+ "but can not found invoker [{}].", page.getClass(), invoker);
562-
break;
560+
throw new RuntimeException(String.format("The action in page [%s] is invoke, "
561+
+ "but can not found invoker [%s].", page.getClass(), invoker));
563562
}
564563

565564
String[] invokers = invoker.split("!");
@@ -588,10 +587,14 @@ private String performAction(SuiteAction action, Field pageField,
588587
catch (ClassNotFoundException e)
589588
{
590589
e.printStackTrace();
590+
591+
throw new RuntimeException(String.format("Can not found invoker [%s].", invokeCls));
591592
}
592593
catch (SecurityException e)
593594
{
594595
e.printStackTrace();
596+
597+
throw new RuntimeException(String.format("Execute invoker [%s] has security error.", invokeCls));
595598
}
596599

597600
List<String> paramList = action.getParamList();

0 commit comments

Comments
 (0)