diff --git a/pd/src/pd.tk b/pd/src/pd.tk
index edf0c79bcddeb892fa50c65b2c5b70dd457f5830..a05da9ecb6004bd836c82d715f0c6ad7b11242c5 100644
--- a/pd/src/pd.tk
+++ b/pd/src/pd.tk
@@ -262,7 +262,11 @@ if { $tcl_platform(platform) == "windows" }  {
 		{{max help files}   {.help} }
 	}
 	set externalsdir "$::env(HOME)/pd-l2ork-externals"
-}        
+}   
+
+proc bgerror {message} {
+	pdtk_post "\ntcl error: $message"
+}     
 
 # make sure the user folder for installing externals exists
 catch {