Fixed Makefile of the yaml_stats example.

Fixed a bug in Node that caused an empty exception message.
This commit is contained in:
Ferdinand Majerech 2011-10-21 20:40:37 +02:00
parent f726ff0b94
commit 7402d8f827
2 changed files with 3 additions and 3 deletions

View file

@ -642,8 +642,8 @@ struct Node
auto idx = findPair(index);
if(idx >= 0){return get!(Pair[])[idx].value;}
throw new Error("Mapping index not found" ~
isSomeString!T ? ": " ~ to!string(index) : "", startMark_);
string msg = "Mapping index not found" ~ (isSomeString!T ? ": " ~ to!string(index) : "");
throw new Error(msg, startMark_);
}
throw new Error("Trying to index node that does not support indexing", startMark_);
}

View file

@ -2,4 +2,4 @@ main:
dmd -w -I../../ -L-L../../ -L-ldyaml yaml_stats.d
clean:
rm yaml_stats myaml_stats.o
rm yaml_stats yaml_stats.o