Skip to content

Commit

Permalink
Add tests of loading all the models
Browse files Browse the repository at this point in the history
Summary:
... and improved the exception message.

Before:

```
Unexpected limit type 'minmax' in parameter configuration : limit neck_ty minmax [-1.00, 0.50]
```

After:

```
Failed to parse parameter configuration 'limit neck_ty minmax [-1.00, 0.50]'. This could be due to an unsupported limit type 'minmax' or failure to find the parameter name 'neck_ty'.
```

Reviewed By: yutingye

Differential Revision: D63047012

fbshipit-source-id: b9d8bc2d576992bd170aabe8a93dcfc8590098d5
  • Loading branch information
jeongseok-meta authored and facebook-github-bot committed Sep 19, 2024
1 parent e4a83f4 commit ea3b151
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion momentum/io/skeleton/parameter_limits_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@ ParameterLimits parseParameterLimits(
"Deprecated parameter limit type: {} (typo). Please use 'ellipsoid' instead.", type);
parseEllipsoid(pl, valueStr, skeleton, jointIndex);
} else {
MT_THROW("Unexpected limit type '{}' in parameter configuration : {}", type, line);
MT_THROW(
"Failed to parse parameter configuration '{}'. This could be due to an unsupported limit type '{}' or failure to find the parameter name '{}'.",
line,
type,
parameterName);
}
}
return pl;
Expand Down

0 comments on commit ea3b151

Please sign in to comment.