[Tkabber-dev] r308 - trunk/plugins/reminder

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Feb 22 12:25:03 MSK 2010


Author: bigote
Date: 2010-02-22 12:25:03 +0300 (Mon, 22 Feb 2010)
New Revision: 308

Modified:
   trunk/plugins/reminder/reminder.tcl
Log:
Added "catching" for wrong commands. If your command failes when executed, a dialog will appear to notice you about failure (even with options(silent_cmd_execution) set). No error stack trace is provided.


Modified: trunk/plugins/reminder/reminder.tcl
===================================================================
--- trunk/plugins/reminder/reminder.tcl	2010-02-22 07:38:18 UTC (rev 307)
+++ trunk/plugins/reminder/reminder.tcl	2010-02-22 09:25:03 UTC (rev 308)
@@ -1,4 +1,4 @@
-# "Reminder" plugin for Tkabber. 2010-02-22 v. 0.9.3
+# "Reminder" plugin for Tkabber. 2010-02-22 v. 0.9.4
 # Written by Serge Yudin xmpp:bigote at jabber.ru
 # Its purpose is to remind about your contact birthdays automatically
 # and about some tasks that you assign by means of "/remind" command.
@@ -194,10 +194,15 @@
         set cmd [string trimleft $msg cmd\ ]
         if {$options(silent_cmd_execution)} {
             [namespace current]::clean_rem_list
-            eval $cmd
-            return
+            if {[catch {eval $cmd}]} {
+                append msg "\nFAILED!"
+            } else {
+                return
+            }
         } else {
-            eval $cmd
+            if {[catch {eval $cmd}]} {
+                append msg "\nFAILED!"
+            }
         }
     }
     set msg "Now is: [clock format [clock seconds]]\n$msg"



More information about the Tkabber-dev mailing list