You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2016/04/24 20:38:20 UTC

[03/12] wicket git commit: WICKET-6129 ordered methods to follow invocation order

WICKET-6129 ordered methods to follow invocation order


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9c0c37e6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9c0c37e6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9c0c37e6

Branch: refs/heads/master
Commit: 9c0c37e6e25344436c413bcc4900a0c4eafaa907
Parents: 8c1fb9b
Author: Sven Meier <sv...@apache.org>
Authored: Fri Apr 8 20:22:04 2016 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Sun Apr 24 20:00:54 2016 +0200

----------------------------------------------------------------------
 .../wicket/request/cycle/RequestCycle.java      | 51 ++++++++++----------
 1 file changed, 25 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9c0c37e6/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
index 4731e35..b7b1e6a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
+++ b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java
@@ -206,6 +206,26 @@ public class RequestCycle implements IRequestCycle, IEventSink
 	}
 
 	/**
+	 * Convenience method that processes the request and detaches the {@link RequestCycle}.
+	 * 
+	 * @return <code>true</code> if the request resolved to a Wicket request, <code>false</code>
+	 *         otherwise.
+	 */
+	public boolean processRequestAndDetach()
+	{
+		boolean result;
+		try
+		{
+			result = processRequest();
+		}
+		finally
+		{
+			detach();
+		}
+		return result;
+	}
+
+	/**
 	 * Processes the request.
 	 * 
 	 * @return <code>true</code> if the request resolved to a Wicket request, <code>false</code>
@@ -230,16 +250,16 @@ public class RequestCycle implements IRequestCycle, IEventSink
 				"No suitable handler found for URL {}, falling back to container to process this request",
 				request.getUrl());
 		}
-		catch (Exception e)
+		catch (Exception exception)
 		{
-			IRequestHandler handler = handleException(e);
+			IRequestHandler handler = handleException(exception);
 			if (handler != null)
 			{
-				executeExceptionRequestHandler(e, handler, getExceptionRetryCount());
+				executeExceptionRequestHandler(exception, handler, getExceptionRetryCount());
 			}
 			else
 			{
-				log.error("Error during request processing. URL=" + request.getUrl(), e);
+				log.error("Error during request processing. URL=" + request.getUrl(), exception);
 			}
 			return true;
 		}
@@ -288,27 +308,6 @@ public class RequestCycle implements IRequestCycle, IEventSink
 	}
 
 	/**
-	 * Convenience method that processes the request and detaches the {@link RequestCycle}.
-	 * 
-	 * @return <code>true</code> if the request resolved to a Wicket request, <code>false</code>
-	 *         otherwise.
-	 */
-	public boolean processRequestAndDetach()
-	{
-		boolean result;
-		try
-		{
-			result = processRequest();
-		}
-		finally
-		{
-			detach();
-		}
-		return result;
-	}
-
-
-	/**
 	 * 
 	 * @param exception
 	 * @param handler
@@ -335,7 +334,7 @@ public class RequestCycle implements IRequestCycle, IEventSink
 					return;
 				}
 			}
-			log.error("Error during processing error message", e);
+			log.error("Error during executing exception request handler", e);
 		}
 	}