_Repro_:
_Create a new constraint_:
```
public class ExceptionThrowingRoutingConstraint : IHttpRouteConstraint
{
public bool Match(HttpRequestMessage request, IHttpRoute route, string parameterName, IDictionary<string, object> values, HttpRouteDirection routeDirection)
{
throw new InvalidOperationException("Som exception at route matching");
return false;
}
}
```
_Register the above constraint_:
```
DefaultInlineConstraintResolver resolver = new DefaultInlineConstraintResolver();
resolver.ConstraintMap.Add("err", typeof(ExceptionThrowingRoutingConstraint));
config.MapHttpAttributeRoutes(resolver);
```
Create an action like following:
```
[Route("api/values/routeconstraint/{id:err}")]
public void GetCustomRoutingConstraint(string id)
{
}
```
_Expected_:
500 Internal Server Error
_Actual_:
Unhandled exception with yellow screen
__Note__: I also noticed that if i register an custom exception handler which doesn't modify the 'Result', I am seeing a 500 Internal Server. Since i haven't modified the 'Result' property, i would have expected it to be still unhandled exception.
_Create a new constraint_:
```
public class ExceptionThrowingRoutingConstraint : IHttpRouteConstraint
{
public bool Match(HttpRequestMessage request, IHttpRoute route, string parameterName, IDictionary<string, object> values, HttpRouteDirection routeDirection)
{
throw new InvalidOperationException("Som exception at route matching");
return false;
}
}
```
_Register the above constraint_:
```
DefaultInlineConstraintResolver resolver = new DefaultInlineConstraintResolver();
resolver.ConstraintMap.Add("err", typeof(ExceptionThrowingRoutingConstraint));
config.MapHttpAttributeRoutes(resolver);
```
Create an action like following:
```
[Route("api/values/routeconstraint/{id:err}")]
public void GetCustomRoutingConstraint(string id)
{
}
```
_Expected_:
500 Internal Server Error
_Actual_:
Unhandled exception with yellow screen
__Note__: I also noticed that if i register an custom exception handler which doesn't modify the 'Result', I am seeing a 500 Internal Server. Since i haven't modified the 'Result' property, i would have expected it to be still unhandled exception.