diff --git a/dyaml/constructor.d b/dyaml/constructor.d index 986795d..71a1e55 100644 --- a/dyaml/constructor.d +++ b/dyaml/constructor.d @@ -514,7 +514,7 @@ real constructReal(ref Node node) } catch(ConvException e) { - throw new Exception("Unable to parse float value: " ~ value); + throw new Exception("Unable to parse float value: \"" ~ value ~ "\""); } return result; diff --git a/dyaml/node.d b/dyaml/node.d index 8200219..f66eef0 100644 --- a/dyaml/node.d +++ b/dyaml/node.d @@ -40,7 +40,7 @@ class NodeException : YAMLException * start = Start position of the node. */ this(string msg, Mark start, string file = __FILE__, int line = __LINE__) - @safe nothrow + @safe { super(msg ~ "\nNode at: " ~ start.toString(), file, line); } @@ -98,7 +98,7 @@ package class YAMLContainer(T) if (!Node.allowed!T): YAMLObject } else { - return format("YAMLContainer(", value_.toString(), ")"); + return format("YAMLContainer(%s)", value_.toString()); } }