You might want to consider using append instead of hputs. For example I 
write my code this way for some time:

proc dump_body {} {
     set rc ""
     append rc "<BODY>"
     append rc [dump_text]
     append rc "</BODY>"
     return $rc
}

<HTML><? hputs [dump_body] ?></HTML>

Actually I use 'interp alias' to create a command 'p' as an alias for hputs.
<HTML><?p [dump_body] ?></HTML>

This case, you won't print output unless there's no error.

If you want to use your own error handling, you might write sth similar 
to this:

proc p {cmd} {
     global errorInfo errorCode
     if {[catch $cmd rc]} {
         # your error handling
     }  else  {
         hputs $rc
     }
}

Luke Myers wrote:
> David N. Welton wrote:
> 
>  >it would be appreciated if you refrained from posting HTML messages to
>  >this list...  I'll try and respond, though
>  >
> Thanks, the problem should be corrected
> 
>  >It is evaluated, although at present, it doesn't hide the current
>  >output.  I.e. if you've already output a lot of stuff, it will still
>  >be there.
>  >
> Now I understand, my expectation was incorrect, I certainly cannot
> expect to take back data already send to the client.
> 
> Thanks,
> 
> -- Luke Kale Myers
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 



-- 
WK

"UTF-8 has a certain purity in that it equally annoys every nation,
and is nobody's default encoding." -- Andy Robinson



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to