mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -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();
|
||||
|
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user