Updated Branches: refs/heads/wicket-1.5.x 38cec6ae8 -> 8a5fc63fb
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/8a5fc63f Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8a5fc63f Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8a5fc63f Branch: refs/heads/wicket-1.5.x Commit: 8a5fc63fb3d0f4d79d14b9363e673df2e624c382 Parents: 38cec6a Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Thu Feb 2 15:05:03 2012 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Thu Feb 2 15:05:03 2012 +0200 ---------------------------------------------------------------------- .../behavior/InvalidBehaviorIdException.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/8a5fc63f/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; }
