diff --git a/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt b/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt index b24f66a..e317d31 100644 --- a/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt +++ b/at-date-console/src/test/kotlin/com/amerharb/atdate/MainTest.kt @@ -321,6 +321,11 @@ class InputStreamMock(input: String) : InputStream() { // } // fun clearClipboard() { - val clipboard = Toolkit.getDefaultToolkit().systemClipboard - clipboard.setContents(StringSelection(""), null) + try { + val clipboard = Toolkit.getDefaultToolkit().systemClipboard + clipboard.setContents(StringSelection(""), null) + } catch (e: Exception) { + println("Error: ${e.message}") + System.err.println(e.message) + } }