mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-01-18 21:17:59 +01:00
Recover from IllegalStateException when polling clipboard.
This commit is contained in:
parent
33dfa1f073
commit
b5ee49c9db
@ -10,6 +10,8 @@ import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.rarchives.ripme.App.logger;
|
||||
|
||||
public class ClipboardUtils {
|
||||
private static AutoripThread autoripThread = new AutoripThread();
|
||||
|
||||
@ -33,6 +35,9 @@ public class ClipboardUtils {
|
||||
.getDefaultToolkit()
|
||||
.getSystemClipboard()
|
||||
.getData(DataFlavor.stringFlavor);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Caught and recovered from IllegalStateException: " + e.getMessage());
|
||||
} catch (HeadlessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (UnsupportedFlavorException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user