If you need to catch also errors that might escape the good practice of
having ::rivet::catch and ::rivet::try control critical section of code
you may set up an ErrorScript
RivetServerConf ErrorScript "source <path-to-my-error-handler>.tcl"
You can virtually do anything with the error codes from within this
handler, including redirection (provided you haven't already sent the
HTTP headers)
notice the FQ scoping of the commands which is important if you are
using ::rivet::abort_page in your code (you can also trick mod_rivet
into issuing error codes that can be interpreted as calls to this
commands, see the mod_rivet code) or if you have some 'exit' calls in
your scripts which actually is *the-wrong-thing-to-do* to interrupt a
script controlled by mod_rivet (either Rivet 2.x or 3.0 and any Tcl
version as long as Tcl will not enable us to delete interpreters in a
sane and safe way)
-- Massimo
On 01/31/2018 03:28 PM, Brice Hamon wrote:
Use try {} catch {} in each of your .rvt file and in case of error take
the appropriate action (log redirect etc...)
On Wed, Jan 31, 2018 at 4:58 AM, Rani Ahmed <rani...@gmail.com
<mailto:rani...@gmail.com>> wrote:
hello .
How can I disable the output buffer in case of an error or a bug in
my code? It's annoying and It can print the passwords sometimes
which I pass to TDBC database connection. It also prints the actual
Tcl code of my website.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org