From d6617f327fcb95899283145ab1ee2f11433c496f Mon Sep 17 00:00:00 2001 From: Kiith-Sa Date: Thu, 27 Dec 2012 21:50:09 +0100 Subject: [PATCH] More nothrow/formatting fixes (by John Colvin). --- dyaml/constructor.d | 2 +- dyaml/node.d | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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()); } }