* Pull ahead beginning of try statement for catching redirects in order to allow redirect()

calls in getChildElement().
* Add comments for try statements.
This commit is contained in:
hns 2005-12-19 14:51:20 +00:00
parent c00c2cae25
commit 86d4f5dc5d

View file

@ -123,6 +123,7 @@ public final class RequestEvaluator implements Runnable {
// when it's time to quit because another thread took over. // when it's time to quit because another thread took over.
Transactor localrtx = (Transactor) Thread.currentThread(); Transactor localrtx = (Transactor) Thread.currentThread();
// spans whole execution loop - close connections in finally clause
try { try {
// while this thread is serving requests // while this thread is serving requests
@ -149,6 +150,7 @@ public final class RequestEvaluator implements Runnable {
while (!done && localrtx == rtx) { while (!done && localrtx == rtx) {
currentElement = null; currentElement = null;
// catch errors in path resolution and script execution
try { try {
// initialize scripting engine // initialize scripting engine
@ -183,6 +185,9 @@ public final class RequestEvaluator implements Runnable {
session.message = null; session.message = null;
} }
// catch redirect in path resolution or script execution
try {
// catch object not found in path resolution
try { try {
if (error != null) { if (error != null) {
// there was an error in the previous loop, call error handler // there was an error in the previous loop, call error handler
@ -322,7 +327,7 @@ public final class RequestEvaluator implements Runnable {
// end of path resolution section // end of path resolution section
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// beginning of execution section // beginning of execution section
try {
// set the req.action property, cutting off the _action suffix // set the req.action property, cutting off the _action suffix
req.setAction(action.substring(0, action.lastIndexOf("_action"))); req.setAction(action.substring(0, action.lastIndexOf("_action")));