# HG changeset patch # User Matti Hamalainen # Date 1313660772 -10800 # Node ID 7ceb3b5aeaa4cb99e7b71ac5b03a804f16b2f2cf # Parent 50b52294e93ed585a0f157c3d90fc72794bc73b7 Catch possible error exceptions in character set conversion. diff -r 50b52294e93e -r 7ceb3b5aeaa4 urllog.tcl --- a/urllog.tcl Wed Jun 22 19:58:14 2011 +0300 +++ b/urllog.tcl Thu Aug 18 12:46:12 2011 +0300 @@ -460,7 +460,9 @@ if {[llength $umatches] > 0} { set urlTitle [lindex $umatches 1] if {$uconvert != 0} { - set urlTitle [encoding convertfrom $uencoding $urlTitle] + if {[catch {set urlTitle [encoding convertfrom $uencoding $urlTitle]} cerrmsg]} { + urllog_log "Error in charset conversion: $cerrmsg" + } } set urlTitle [urllog_convert_ent $urlTitle] regsub -all "(^ *| *$)" $urlTitle "" urlTitle