diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-06 22:48:37 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-06 22:48:37 -0700 |
commit | a97a00df51316a9246a13f6efb17a8a8f97bbd51 (patch) | |
tree | 7c9452c66b103ac7e0514206fd7ddab1670ece08 /010vm.cc | |
parent | 2c91ac0c6a4b77f268e119eb2366dbc440cbc61f (diff) | |
download | mu-a97a00df51316a9246a13f6efb17a8a8f97bbd51.tar.gz |
3848
Improve an error message. Still lots of room for improving how we render reagents in errors.
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/010vm.cc b/010vm.cc index d23a9fbd..528436c6 100644 --- a/010vm.cc +++ b/010vm.cc @@ -706,8 +706,7 @@ void dump(const string_tree* x, ostream& out) { } string to_string(const type_tree* type) { - // abbreviate a single-node tree to just its contents - if (!type) return "NULLNULLNULL"; // should never happen + if (type == NULL) return "()"; ostringstream out; dump(type, out); return out.str(); @@ -742,8 +741,7 @@ void dump(type_ordinal type, ostream& out) { } string names_to_string(const type_tree* type) { - // abbreviate a single-node tree to just its contents - if (!type) return "()"; // should never happen + if (type == NULL) return "()"; // should never happen ostringstream out; dump_names(type, out); return out.str(); @@ -771,8 +769,7 @@ void dump_names(const type_tree* x, ostream& out) { } string names_to_string_without_quotes(const type_tree* type) { - // abbreviate a single-node tree to just its contents - if (!type) return "NULLNULLNULL"; // should never happen + if (type == NULL) return "()"; ostringstream out; dump_names_without_quotes(type, out); return out.str(); |