mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.swing;
|
||||
|
||||
import org.dromara.hutool.core.exceptions.UtilException;
|
||||
import org.dromara.hutool.core.exceptions.HutoolException;
|
||||
import org.dromara.hutool.swing.clipboard.ClipboardUtil;
|
||||
import org.dromara.hutool.swing.img.ImgUtil;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class RobotUtil {
|
||||
try {
|
||||
ROBOT = new Robot();
|
||||
} catch (final AWTException e) {
|
||||
throw new UtilException(e);
|
||||
throw new HutoolException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.swing.clipboard;
|
||||
|
||||
import org.dromara.hutool.core.exceptions.UtilException;
|
||||
import org.dromara.hutool.core.exceptions.HutoolException;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.awt.Toolkit;
|
||||
@@ -82,7 +82,7 @@ public class ClipboardUtil {
|
||||
try {
|
||||
return content.getTransferData(flavor);
|
||||
} catch (final UnsupportedFlavorException | IOException e) {
|
||||
throw new UtilException(e);
|
||||
throw new HutoolException(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.swing.img;
|
||||
|
||||
import org.dromara.hutool.core.exceptions.UtilException;
|
||||
import org.dromara.hutool.core.exceptions.HutoolException;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
|
||||
import java.awt.Dimension;
|
||||
@@ -76,7 +76,7 @@ public class FontUtil {
|
||||
try {
|
||||
return Font.createFont(Font.TYPE1_FONT, fontFile);
|
||||
} catch (final Exception e1) {
|
||||
throw new UtilException(e);
|
||||
throw new HutoolException(e);
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
throw new IORuntimeException(e);
|
||||
@@ -98,7 +98,7 @@ public class FontUtil {
|
||||
try {
|
||||
return Font.createFont(Font.TYPE1_FONT, fontStream);
|
||||
} catch (final Exception e1) {
|
||||
throw new UtilException(e1);
|
||||
throw new HutoolException(e1);
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
throw new IORuntimeException(e);
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.swing.img;
|
||||
|
||||
import org.dromara.hutool.core.exceptions.UtilException;
|
||||
import org.dromara.hutool.core.exceptions.HutoolException;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import com.drew.imaging.ImageMetadataReader;
|
||||
import com.drew.imaging.ImageProcessingException;
|
||||
@@ -45,7 +45,7 @@ public class ImgMetaUtil {
|
||||
try {
|
||||
metadata = ImageMetadataReader.readMetadata(file);
|
||||
} catch (final ImageProcessingException e) {
|
||||
throw new UtilException(e);
|
||||
throw new HutoolException(e);
|
||||
} catch (final IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class ImgMetaUtil {
|
||||
try {
|
||||
metadata = ImageMetadataReader.readMetadata(in);
|
||||
} catch (final ImageProcessingException e) {
|
||||
throw new UtilException(e);
|
||||
throw new HutoolException(e);
|
||||
} catch (final IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user