File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package httprouter
7
7
import (
8
8
"strings"
9
9
"unicode"
10
+ "fmt"
10
11
)
11
12
12
13
func min (a , b int ) int {
@@ -147,7 +148,7 @@ func (n *node) addRoute(path string, handle Handle) {
147
148
}
148
149
}
149
150
150
- panic ("conflict with wildcard route" )
151
+ panic (fmt . Sprintf ( "conflict with wildcard route. has %q got %q" , path , n . path ) )
151
152
}
152
153
153
154
c := path [0 ]
@@ -184,7 +185,7 @@ func (n *node) addRoute(path string, handle Handle) {
184
185
185
186
} else if i == len (path ) { // Make node a (in-path) leaf
186
187
if n .handle != nil {
187
- panic ("a Handle is already registered for this path" )
188
+ panic (fmt . Sprintf ( "a Handle is already registered for this path (%q)" , path ) )
188
189
}
189
190
n .handle = handle
190
191
}
You can’t perform that action at this time.
0 commit comments