Skip to content

Commit 22fafd6

Browse files
committed
veb: add method.location too, to the invalid return type error, to ease diagnosing problems while prototyping
1 parent c445b0c commit 22fafd6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎vlib/veb/veb.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn generate_routes[A, X](app &A) !map[string]Route {
5656
} $else {
5757
// If we have route attributes, but the wrong return type, return an error
5858
if has_route_attributes(method.attrs) {
59-
return error('method `${method.name}` has route attributes but invalid return type. Handler methods must return `veb.Result`, not `!veb.Result` or other types')
59+
return error('method `${method.name}` at `${method.location}` has route attributes but invalid return type. Handler methods must return `veb.Result`, not `!veb.Result` or other types')
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)