Skip to content

Commit 0f2a3a1

Browse files
committed
chore(Read): Rename private wrapException -> wrapConstruct
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.
1 parent 12e7920 commit 0f2a3a1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/configy/Read.d

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -707,19 +707,19 @@ package FR.Type parseField (alias FR)
707707
true);
708708

709709
else static if (hasConverter!(FR.Ref))
710-
return wrapException(node.viaConverter!(FR), path, node.startMark());
710+
return wrapConstruct(node.viaConverter!(FR), path, node.startMark());
711711

712712
else static if (hasFromYAML!(FR.Type))
713713
{
714714
scope impl = new ConfigParserImpl!(FR.Type)(node, path, ctx);
715-
return wrapException(FR.Type.fromYAML(impl), path, node.startMark());
715+
return wrapConstruct(FR.Type.fromYAML(impl), path, node.startMark());
716716
}
717717

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

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

724724
else static if (is(immutable(FR.Type) == immutable(core.time.Duration)))
725725
{
@@ -861,7 +861,7 @@ private T parseScalar (T) (Node node, string path)
861861
862862
*******************************************************************************/
863863

864-
private T wrapException (T) (lazy T exp, string path, Mark position,
864+
private T wrapConstruct (T) (lazy T exp, string path, Mark position,
865865
string file = __FILE__, size_t line = __LINE__)
866866
{
867867
try

0 commit comments

Comments
 (0)