Skip to content

Commit

Permalink
chore(Read): Rename private wrapException -> wrapConstruct
Browse files Browse the repository at this point in the history
We are now exposing a public wrapException method for user uses,
but there is also a different, private, overload in this module,
which does something completely different. To avoid errors and
confusion, just rename the private symbol.
  • Loading branch information
Geod24 committed Jul 19, 2024
1 parent 12e7920 commit 0f2a3a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/configy/Read.d
Original file line number Diff line number Diff line change
Expand Up @@ -707,19 +707,19 @@ package FR.Type parseField (alias FR)
true);

else static if (hasConverter!(FR.Ref))
return wrapException(node.viaConverter!(FR), path, node.startMark());
return wrapConstruct(node.viaConverter!(FR), path, node.startMark());

else static if (hasFromYAML!(FR.Type))
{
scope impl = new ConfigParserImpl!(FR.Type)(node, path, ctx);
return wrapException(FR.Type.fromYAML(impl), path, node.startMark());
return wrapConstruct(FR.Type.fromYAML(impl), path, node.startMark());
}

else static if (hasFromString!(FR.Type))
return wrapException(FR.Type.fromString(node.as!string), path, node.startMark());
return wrapConstruct(FR.Type.fromString(node.as!string), path, node.startMark());

else static if (hasStringCtor!(FR.Type))
return wrapException(FR.Type(node.as!string), path, node.startMark());
return wrapConstruct(FR.Type(node.as!string), path, node.startMark());

else static if (is(immutable(FR.Type) == immutable(core.time.Duration)))
{
Expand Down Expand Up @@ -861,7 +861,7 @@ private T parseScalar (T) (Node node, string path)
*******************************************************************************/

private T wrapException (T) (lazy T exp, string path, Mark position,
private T wrapConstruct (T) (lazy T exp, string path, Mark position,
string file = __FILE__, size_t line = __LINE__)
{
try
Expand Down

0 comments on commit 0f2a3a1

Please sign in to comment.