You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/02/02 14:06:04 UTC

[1/2] git commit: Improve exception message to say the full path of a component in a page and the name of the page it is added to.

Updated Branches:
  refs/heads/master 835db0bf2 -> 8b7d38f64


Improve exception message to say the full path of a component in a page and the name of the page it is added to.


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

Branch: refs/heads/master
Commit: 8b7d38f64f906edd85b17e3e15b39769b03d37ab
Parents: d23eda0
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Feb 2 15:05:03 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Feb 2 15:05:50 2012 +0200

----------------------------------------------------------------------
 .../behavior/InvalidBehaviorIdException.java       |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/8b7d38f6/wicket-core/src/main/java/org/apache/wicket/behavior/InvalidBehaviorIdException.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/behavior/InvalidBehaviorIdException.java b/wicket-core/src/main/java/org/apache/wicket/behavior/InvalidBehaviorIdException.java
index 7bfa808..566bd5b 100644
--- a/wicket-core/src/main/java/org/apache/wicket/behavior/InvalidBehaviorIdException.java
+++ b/wicket-core/src/main/java/org/apache/wicket/behavior/InvalidBehaviorIdException.java
@@ -40,12 +40,12 @@ public class InvalidBehaviorIdException extends WicketRuntimeException
 	public InvalidBehaviorIdException(Component component, int behaviorId)
 	{
 		super(
-			"Cannot find behavior with id: " +
-				behaviorId +
-				" on component: " +
-				component +
-				". Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' " +
-				"to indicate that it is stateless instead of returning 'false' to indicate that it is stateful.");
+			String.format("Cannot find behavior with id '%d' on component '%s' in page '%s'. " +
+				"Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' " +
+				"to indicate that it is stateless instead of returning 'false' to indicate that it is stateful.",
+					behaviorId,
+					component.getClassRelativePath(),
+					component.getPage()));
 		this.component = component;
 		this.behaviorId = behaviorId;
 	}