Revision: 10479 http://pure-data.svn.sourceforge.net/pure-data/?rev=10479&view=rev Author: eighthave Date: 2009-01-08 01:11:05 +0000 (Thu, 08 Jan 2009)
Log Message: ----------- converted catch code to use the error name given directly by catch
Modified Paths: -------------- branches/pd-devel/0.41.4/src/pd_connect.tcl
Modified: branches/pd-devel/0.41.4/src/pd_connect.tcl =================================================================== --- branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-07 00:27:58 UTC (rev 10478) +++ branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-08 01:11:05 UTC (rev 10479) @@ -35,18 +35,18 @@ # if {$cmd_from_pd == ""} {puts stderr "called with blank args aka READABLE"} append cmd_from_pd [gets $pd_socket] puts stderr "cmd_from_pd: $cmd_from_pd" - if {[catch {uplevel #0 $cmd_from_pd} error]} { + if {[catch {uplevel #0 $cmd_from_pd} errorname]} { global errorInfo -# puts stderr "errorInfo <<$errorInfo>>" - switch -regexp -- $errorInfo { - "^missing close-brace" { + puts stderr "errorname: >>$errorname<<" + switch -regexp -- $errorname { + "missing close-brace" { # TODO consider using [info complete $cmd_from_pd] in a loop puts stderr "appending another line" pd_readsocket $cmd_from_pd } "^invalid command name" { - puts stderr "INVALID COMMAND: $errorInfo" + puts stderr "INVALID COMMAND NAME: $errorInfo" } default { - puts stderr "DIFFERENT ERROR on eval: $errorInfo" + puts stderr "UNHANDLED ERROR: $errorInfo" } } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.