This commit is contained in:
Looly
2023-04-22 02:36:32 +08:00
parent 7387150f1a
commit 16e05bf9f5
108 changed files with 1244 additions and 857 deletions

View File

@@ -13,7 +13,7 @@
package org.dromara.hutool.cron;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.io.resource.NoResourceException;
import org.dromara.hutool.cron.pattern.CronPattern;
import org.dromara.hutool.cron.task.Task;
@@ -165,7 +165,7 @@ public class CronUtil {
*/
synchronized public static void start(final boolean isDaemon) {
if (scheduler.isStarted()) {
throw new UtilException("Scheduler has been started, please stop it first!");
throw new HutoolException("Scheduler has been started, please stop it first!");
}
lock.lock();

View File

@@ -13,7 +13,7 @@
package org.dromara.hutool.cron.task;
import org.dromara.hutool.core.classloader.ClassLoaderUtil;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.reflect.ConstructorUtil;
import org.dromara.hutool.core.reflect.MethodUtil;
import org.dromara.hutool.core.text.StrUtil;
@@ -44,7 +44,7 @@ public class InvokeTask implements Task{
splitIndex = classNameWithMethodName.lastIndexOf('.');
}
if (splitIndex <= 0) {
throw new UtilException("Invalid classNameWithMethodName [{}]!", classNameWithMethodName);
throw new HutoolException("Invalid classNameWithMethodName [{}]!", classNameWithMethodName);
}
//类
@@ -73,7 +73,7 @@ public class InvokeTask implements Task{
public void execute() {
try {
MethodUtil.invoke(this.obj, this.method);
} catch (final UtilException e) {
} catch (final HutoolException e) {
throw new CronException(e.getCause());
}
}