add capture name to returned matches

This line is unreachable, assuming ThrowException throws an exception.