]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.scaffold: include vocab-root in error message.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 25 Feb 2018 00:07:24 +0000 (16:07 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 25 Feb 2018 00:07:24 +0000 (16:07 -0800)
basis/tools/scaffold/scaffold.factor

index 6f9209aec93b44179ab73fe5fb61cded61084fbe..026eb98ff06b0003b4e1adeaa0df3b0bb9ba6b4e 100644 (file)
@@ -14,7 +14,7 @@ SYMBOL: using
 
 ERROR: not-a-vocab-root string ;
 
-ERROR: vocab-must-not-exist string ;
+ERROR: vocab-must-not-exist name root ;
 
 <PRIVATE
 
@@ -31,7 +31,7 @@ ERROR: vocab-must-not-exist string ;
     [ check-root ] [ check-vocab-name ] bi* ;
 
 : check-vocab-exists ( string -- string )
-    dup vocab-exists? [ vocab-must-not-exist ] when ;
+    dup vocab-exists? [ dup find-vocab-root vocab-must-not-exist ] when ;
 
 : replace-vocab-separators ( vocab -- path )
     path-separator first CHAR: . associate substitute ; inline
@@ -132,8 +132,10 @@ ERROR: vocab-must-not-exist string ;
         { "exemplar" object }
         { "assoc" assoc }
         { "alist" "an array of key/value pairs" }
-        { "keys" sequence } { "values" sequence }
-        { "class" class } { "tuple" tuple }
+        { "keys" sequence }
+        { "values" sequence }
+        { "class" class }
+        { "tuple" tuple }
         { "url" url }
     } at* [ swap [ \ $maybe swap 2array ] when ] dip ;