chiark - git - ijackson - ircbot.git/commitdiff

chiark / gitweb /
git ~ijackson / ircbot.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0dceac)
topicedit: add a timeout; better error handling master
2014年4月11日 16:17:01 +0000 (17:17 +0100)
2014年4月11日 16:17:01 +0000 (17:17 +0100)

diff --git a/topicedit.tcl b/topicedit.tcl
index 9fc4765285ce61bc85196746f5288daae062a64e..88998782d35edefc0de1c666a6262a8391f6c8b7 100755 (executable)
--- a/topicedit.tcl
+++ b/topicedit.tcl
@@ -9,9 +9,11 @@ manyset $argv host port nick ident ownfullname channel topicinfo
set done 0
+after 30000 { set errorInfo {}; bgerror timeout }
+
proc bgerror {msg} {
global errorInfo errorCode
- puts stderr "$msg\n$errorCode\n$errorInfo\n"
+ puts stderr "$msg\n$errorCode\n$errorInfo\n\nERROR: $msg\n"
exit 16
}
Unnamed repository; edit this file 'description' to name the repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /