]> gitweb.factorcode.org Git - factor.git/commitdiff
asn1: Throw an error not a string.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 29 Mar 2013 16:45:06 +0000 (09:45 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 29 Mar 2013 16:51:26 +0000 (09:51 -0700)
extra/asn1/asn1.factor

index 047f0133ffd5e1719d95bd31a3b6225d8c816135..decaf2940146052904c13ecb3dc03613a0702e3e 100644 (file)
@@ -70,13 +70,13 @@ TUPLE: element syntax id tag tagclass encoding contentlength newobj objtype ;
 : get-id ( -- id )
     elements get id>> ;
 
+ERROR: unsupported-tag-encoding id ;
+
 : (set-tag) ( -- )
     elements get id>> 31 bitand
     dup elements get tag<<
     31 < [
-        [ "unsupported tag encoding: #{" % 
-          get-id # "}" %
-        ] "" make throw
+        get-id unsupported-tag-encoding
     ] unless ;
 
 : set-tagclass ( -- )