Forum OpenACS Q&A: Response to Server log errors

Collapse
Posted by Martin Elsman on
The problematic thing is that when I edit the file above to read
  proc test {} {
      return -code return
  }
  ReturnHeaders
  ns_write "Hello..."
  test
  ns_write "...Goodbye"
then I don't get a server error!

According to the documentation of the return statement, I would not expect the original file to cause a server error - albeit it does. Here I show the original file again:

  proc test {} {
      return -code return
  }
  ReturnHeaders
  ns_write "Hello..."
  set a [test]
  ns_write "...Goodbye"
Comments are welcome!