--- application.tcl
+++ application.tcl
@@ -46,11 +46,15 @@
     return
 }
 
 proc ::diagram::application::showerror {text} {
     global argv0
-    puts stderr "$argv0: $text"
+    if { [llength [package present Tk]] != 1 } {
+        puts stderr "$argv0: $text"
+    } else {
+        tk_messageBox -type ok -icon error -title "Error in application" -message "$argv0: $text"
+    }
     exit 1
 }
 
 # # ## ### ##### ######## ############# #####################
 ## Internal data and status

