about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@lumberjaph.net>2013-04-27 10:59:56 -0700
committerFranck Cuny <franck@lumberjaph.net>2013-04-27 10:59:56 -0700
commit577d74101ad33a42f12b46eacc6b777ff0a41fbe (patch)
tree4c253d60766e14c0c99e6e93cf5ba48f3046ff4f
parentAdd GetRouteList to the Router. (diff)
downloadpath-router-577d74101ad33a42f12b46eacc6b777ff0a41fbe.tar.gz
Better error message when adding twice the same route.
-rw-r--r--router.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/router.go b/router.go
index 3985780..ce71df5 100644
--- a/router.go
+++ b/router.go
@@ -30,7 +30,7 @@ func (self *Router) routeIsKnown(route *Route) bool {
 
 func (self *Router) AddRoute(route *Route) error {
 	if self.routeIsKnown(route) == true {
-		return errors.New(fmt.Sprintf("Can't add twice the same route. The route %s with the method %s is already added", route.Path, route.Method))
+		return errors.New(fmt.Sprintf("The route %s with the method %s already exist.", route.Path, route.Method))
 	}
 
 	route.init()