]> gitweb.factorcode.org Git - factor.git/commitdiff
basis: ERROR: changes.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 10:20:39 +0000 (03:20 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 10:20:39 +0000 (03:20 -0700)
178 files changed:
basis/alien/c-types/c-types.factor
basis/alien/data/data.factor
basis/alien/endian/endian.factor
basis/alien/parser/parser.factor
basis/base64/base64.factor
basis/biassocs/biassocs.factor
basis/bit-arrays/bit-arrays.factor
basis/bit-sets/bit-sets.factor
basis/bitstreams/bitstreams.factor
basis/bootstrap/image/image.factor
basis/boxes/boxes.factor
basis/byte-arrays/hex/hex.factor
basis/cairo/cairo.factor
basis/calendar/calendar.factor
basis/calendar/format/format.factor
basis/checksums/openssl/openssl.factor
basis/classes/struct/struct.factor
basis/cocoa/messages/messages.factor
basis/cocoa/plists/plists.factor
basis/colors/constants/constants.factor
basis/combinators/random/random.factor
basis/combinators/short-circuit/smart/smart.factor
basis/compiler/cfg/alias-analysis/alias-analysis.factor
basis/compiler/cfg/checker/checker.factor
basis/compiler/cfg/intrinsics/intrinsics.factor
basis/compiler/cfg/intrinsics/simd/backend/backend.factor
basis/compiler/cfg/linear-scan/allocation/spilling/spilling.factor
basis/compiler/cfg/linear-scan/allocation/splitting/splitting.factor
basis/compiler/cfg/linear-scan/allocation/state/state.factor
basis/compiler/cfg/linear-scan/assignment/assignment.factor
basis/compiler/cfg/linear-scan/live-intervals/live-intervals.factor
basis/compiler/cfg/linear-scan/numbering/numbering.factor
basis/compiler/cfg/registers/registers.factor
basis/compiler/cfg/representations/conversion/conversion.factor
basis/compiler/cfg/ssa/destruction/coalescing/coalescing.factor
basis/compiler/cfg/ssa/interference/live-ranges/live-ranges.factor
basis/compiler/cfg/stacks/finalize/finalize.factor
basis/compiler/cfg/stacks/padding/padding.factor
basis/compiler/errors/errors.factor
basis/compiler/tests/intrinsics.factor
basis/compiler/tree/checker/checker.factor
basis/compiler/tree/def-use/def-use.factor
basis/compression/inflate/inflate.factor
basis/compression/lzw/lzw.factor
basis/compression/snappy/snappy.factor
basis/compression/zlib/zlib.factor
basis/concurrency/conditions/conditions.factor
basis/concurrency/count-downs/count-downs.factor
basis/concurrency/messaging/messaging.factor
basis/concurrency/promises/promises.factor
basis/concurrency/semaphores/semaphores.factor
basis/core-foundation/launch-services/launch-services.factor
basis/core-foundation/numbers/numbers.factor
basis/core-text/core-text.factor
basis/cpu/x86/assembler/assembler.factor
basis/cpu/x86/assembler/operands/operands.factor
basis/db/postgresql/lib/lib.factor
basis/db/postgresql/postgresql.factor
basis/db/queries/queries.factor
basis/db/sqlite/sqlite.factor
basis/db/tuples/tuples.factor
basis/db/types/types.factor
basis/delegate/delegate.factor
basis/deques/deques.factor
basis/editors/editors.factor
basis/editors/jedit/jedit.factor
basis/formatting/formatting.factor
basis/fry/fry.factor
basis/ftp/client/client.factor
basis/ftp/server/server.factor
basis/furnace/asides/asides.factor
basis/furnace/utilities/utilities.factor
basis/game/input/input.factor
basis/generalizations/generalizations.factor
basis/gobject-introspection/gobject-introspection.factor
basis/gobject-introspection/types/types.factor
basis/grouping/grouping.factor
basis/heaps/heaps.factor
basis/help/lint/checks/checks.factor
basis/help/markup/markup.factor
basis/help/syntax/syntax.factor
basis/help/topics/topics.factor
basis/hints/hints.factor
basis/html/templates/chloe/compiler/compiler.factor
basis/html/templates/templates.factor
basis/http/client/client.factor
basis/http/server/requests/requests.factor
basis/images/loader/gdiplus/gdiplus.factor
basis/images/loader/loader.factor
basis/interval-maps/interval-maps.factor
basis/interval-sets/interval-sets.factor
basis/inverse/inverse.factor
basis/io/backend/unix/unix.factor
basis/io/directories/search/search.factor
basis/io/files/info/unix/linux/linux.factor
basis/io/files/info/windows/windows.factor
basis/io/files/links/links.factor
basis/io/files/windows/windows.factor
basis/io/launcher/launcher.factor
basis/io/launcher/windows/windows.factor
basis/io/mmap/mmap.factor
basis/io/ports/ports.factor
basis/io/servers/servers.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/io/sockets/sockets.factor
basis/io/streams/duplex/duplex.factor
basis/io/streams/limited/limited.factor
basis/io/streams/throwing/throwing.factor
basis/json/reader/reader.factor
basis/libc/libc.factor
basis/locals/locals.factor
basis/locals/parser/parser.factor
basis/locals/rewrite/point-free/point-free.factor
basis/locals/rewrite/sugar/sugar.factor
basis/logging/logging.factor
basis/match/match.factor
basis/math/bitwise/bitwise.factor
basis/math/complex/complex.factor
basis/math/functions/functions.factor
basis/math/matrices/matrices.factor
basis/math/partial-dispatch/partial-dispatch.factor
basis/math/polynomials/polynomials.factor
basis/math/primes/lucas-lehmer/lucas-lehmer.factor
basis/math/primes/primes.factor
basis/math/vectors/conversion/conversion-tests.factor
basis/math/vectors/conversion/conversion.factor
basis/math/vectors/simd/simd.factor
basis/mime/multipart/multipart.factor
basis/mirrors/mirrors.factor
basis/multiline/multiline.factor
basis/nibble-arrays/nibble-arrays.factor
basis/opengl/gl/extensions/extensions.factor
basis/opengl/textures/textures.factor
basis/pack/pack.factor
basis/peg/ebnf/ebnf.factor
basis/peg/peg.factor
basis/persistent/vectors/vectors.factor
basis/random/random.factor
basis/random/windows/windows.factor
basis/regexp/parser/parser.factor
basis/roman/roman.factor
basis/sequences/unrolled/unrolled.factor
basis/smtp/smtp.factor
basis/specialized-arrays/specialized-arrays.factor
basis/stack-checker/stack-checker-tests.factor
basis/tools/annotations/annotations.factor
basis/tools/annotations/assertions/assertions.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/shaker/strip-specialized-arrays.factor
basis/tools/deploy/test/test.factor
basis/tools/deploy/windows/ico/ico.factor
basis/tools/files/files.factor
basis/tr/tr.factor
basis/tuple-arrays/tuple-arrays.factor
basis/typed/namespaces/namespaces.factor
basis/typed/typed.factor
basis/ui/gadgets/labels/labels.factor
basis/ui/gadgets/worlds/worlds.factor
basis/ui/pixel-formats/pixel-formats.factor
basis/unix/groups/groups.factor
basis/unix/linux/proc/proc.factor
basis/unix/unix.factor
basis/unix/users/users.factor
basis/unrolled-lists/unrolled-lists.factor
basis/urls/urls.factor
basis/vlists/vlists.factor
basis/vocabs/hierarchy/hierarchy.factor
basis/windows/com/com.factor
basis/windows/com/syntax/syntax.factor
basis/windows/errors/errors.factor
basis/windows/gdiplus/gdiplus.factor
basis/windows/iphlpapi/iphlpapi.factor
basis/windows/registry/registry.factor
basis/windows/winmm/winmm.factor
basis/windows/winsock/winsock.factor
basis/xml-rpc/xml-rpc.factor
basis/xml/syntax/syntax.factor
basis/xmode/catalog/catalog.factor

index 4e0e4c111f97e41a8b7409e03c35fd2f378ad52a..710c918604104a06b663d1c93b4f623b8d202bf3 100644 (file)
@@ -55,12 +55,12 @@ UNION: c-type-name
     c-type-word pointer ;
 
 : resolve-typedef ( name -- c-type )
-    dup void? [ no-c-type ] when
+    dup void? [ throw-no-c-type ] when
     dup c-type-name? [ lookup-c-type ] when ;
 
 M: word lookup-c-type
     dup "c-type" word-prop resolve-typedef
-    [ ] [ no-c-type ] ?if ;
+    [ ] [ throw-no-c-type ] ?if ;
 
 GENERIC: c-type-class ( name -- class )
 
index 789094fb8beb8d38d3dc6a5276cae9070a78757c..ba510f7ef3e70b13295172f33a39cf3c700213cf 100644 (file)
@@ -79,7 +79,7 @@ M: bad-byte-array-length summary
 
 : cast-array ( byte-array c-type -- array )
     [ binary-object ] dip [ heap-size /mod 0 = ] keep swap
-    [ <c-direct-array> ] [ bad-byte-array-length ] if ; inline
+    [ <c-direct-array> ] [ throw-bad-byte-array-length ] if ; inline
 
 : malloc-array ( n c-type -- array )
     [ heap-size calloc ] [ <c-direct-array> ] 2bi ; inline
index a7593c05b770a5367ee34831dd151d03a392d159..1847f6294b371be2fb9352f5aaa867882afc1cd5 100644 (file)
@@ -15,7 +15,7 @@ ERROR: invalid-signed-conversion n ;
         { 2 [ [ c:short <ref> c:short deref ] ] }
         { 4 [ [ int <ref> int deref ] ] }
         { 8 [ [ longlong <ref> longlong deref ] ] }
-        [ invalid-signed-conversion ]
+        [ throw-invalid-signed-conversion ]
     } case ; inline
 
 MACRO: byte-reverse ( n signed? -- quot )
index 843f0410aa1908b3fc2f98f9c07b7146f0015d27..507273eda2ad8021f1dd2b6930c049bdbb48100a 100755 (executable)
@@ -15,7 +15,7 @@ ERROR: bad-array-type ;
 
 : parse-array-type ( name -- c-type )
     "[" split unclip
-    [ [ "]" ?tail [ bad-array-type ] unless parse-datum ] map ]
+    [ [ "]" ?tail [ throw-bad-array-type ] unless parse-datum ] map ]
     [ (parse-c-type) ]
     bi* prefix ;
 
index 500784ef7f89dc219d6036c744bbf9c88faba47b..db1ffc75bd416e73d46f221973e363f7c7d00b10 100644 (file)
@@ -24,7 +24,7 @@ CONSTANT: alphabet
 
 : base64>ch ( ch -- ch )
     $[ alphabet alphabet-inverse 0 CHAR: = pick set-nth ] nth
-    [ malformed-base64 ] unless* ; inline
+    [ throw-malformed-base64 ] unless* ; inline
 
 : (write-lines) ( column byte-array -- column' )
     output-stream get dup '[
@@ -84,7 +84,7 @@ PRIVATE>
     4 "\n\r" pick read-ignoring dup length {
         { 0 [ 2drop ] }
         { 4 [ decode4 (decode-base64) ] }
-        [ malformed-base64 ]
+        [ throw-malformed-base64 ]
     } case ;
 
 PRIVATE>
index 590449d77ca00fa14c293b737aad1520278e9190..423b1a2809f94594327f8726eef905d1a7188e7c 100644 (file)
@@ -29,7 +29,7 @@ M: no-biassoc-deletion summary
     drop "biassocs do not support deletion" ;
 
 M: biassoc delete-at
-    no-biassoc-deletion ;
+    throw-no-biassoc-deletion ;
 
 M: biassoc >alist from>> >alist ;
 
index 55fec5bba3cbbe9920051a665d0c2d60675b1365..4068c5e2ccce7ec757da5336f170de6757e70ab6 100644 (file)
@@ -47,7 +47,7 @@ PRIVATE>
 ERROR: bad-array-length n ;
 
 : <bit-array> ( n -- bit-array )
-    dup 0 < [ bad-array-length ] when
+    dup 0 < [ throw-bad-array-length ] when
     dup bits>bytes <byte-array>
     bit-array boa ; inline
 
index 2b4fb129ee4b9d5ff7ba43e1ef7c97d73ab40165..a4c24f0bdc36b1cf788358629116d3ecefb48955 100644 (file)
@@ -32,7 +32,7 @@ M: bit-set delete
 ERROR: check-bit-set-failed ;
 
 : check-bit-set ( bit-set -- bit-set )
-    dup bit-set? [ check-bit-set-failed ] unless ; inline
+    dup bit-set? [ throw-check-bit-set-failed ] unless ; inline
 
 : bit-set-map ( seq1 seq2 quot -- seq )
     [ drop [ length ] bi@ [ assert= ] keep ]
index adbebea3a75b9b5f76c20b5b476d9928520add39..9ece2a2cc55d0eebbb9942ce32f6d473c9b04abc 100644 (file)
@@ -20,7 +20,7 @@ ERROR: invalid-widthed bits #bits ;
                 dup 0 < [ neg ] when log2 <=
             ] if-zero
         ]
-    } 2|| [ invalid-widthed ] when ;
+    } 2|| [ throw-invalid-widthed ] when ;
 
 : <widthed> ( bits #bits -- widthed )
     check-widthed
@@ -85,11 +85,11 @@ GENERIC: poke ( value n bitstream -- )
 
 <PRIVATE
 
-ERROR: not-enough-bits widthed n ;
+ERROR: not-enough-widthed-bits widthed n ;
 
 : check-widthed-bits ( widthed n -- widthed n )
     2dup { [ nip 0 < ] [ [ #bits>> ] dip < ] } 2||
-    [ not-enough-bits ] when ;
+    [ throw-not-enough-widthed-bits ] when ;
 
 : widthed-bits ( widthed n -- bits )
     check-widthed-bits
@@ -161,7 +161,7 @@ ERROR: not-enough-bits n bit-reader ;
     ] if ;
 
 :: (peek) ( n bs endian> subseq-endian -- bits )
-    n bs enough-bits? [ n bs not-enough-bits ] unless
+    n bs enough-bits? [ n bs throw-not-enough-bits ] unless
     bs [ byte-pos>> ] [ bit-pos>> n + ] bi #bits>#bytes dupd +
     bs bytes>> subseq endian> execute( seq -- x )
     n bs subseq-endian execute( bignum n bs -- bits ) ;
index dda459e5956374ef8b09e6c95036be6733b526cf..ddf5471fe2f62ecd19903a351d6ac4e3c4fdf47a 100755 (executable)
@@ -365,7 +365,7 @@ ERROR: not-in-image vocabulary word ;
 
 : fixup-word ( word -- offset )
     transfer-word dup lookup-object
-    [ ] [ [ vocabulary>> ] [ name>> ] bi not-in-image ] ?if ;
+    [ ] [ [ vocabulary>> ] [ name>> ] bi throw-not-in-image ] ?if ;
 
 : fixup-words ( -- )
     bootstrapping-image get [ dup word? [ fixup-word ] when ] map! drop ;
@@ -437,7 +437,7 @@ M: byte-array '
 ERROR: tuple-removed class ;
 
 : require-tuple-layout ( word -- layout )
-    dup tuple-layout [ ] [ tuple-removed ] ?if ;
+    dup tuple-layout [ ] [ throw-tuple-removed ] ?if ;
 
 : (emit-tuple) ( tuple -- pointer )
     [ tuple-slots ]
index 25f2b963b414cba8cbcb345b628ddf844ad15609..585389a5711bb9b4a88a017da32e431c3fe55300 100644 (file)
@@ -11,7 +11,7 @@ ERROR: box-full box ;
 
 : >box ( value box -- )
     dup occupied>>
-    [ box-full ] [ t >>occupied value<< ] if ; inline
+    [ throw-box-full ] [ t >>occupied value<< ] if ; inline
 
 ERROR: box-empty box ;
 
index 41444b54e6a61502f768606b6987efb48b006cbc..a59c1762cae4f3b651c17a0d713cf216eeb93548 100644 (file)
@@ -9,6 +9,6 @@ ERROR: odd-length-hex-string string ;
 SYNTAX: HEX{
     "}" parse-tokens concat
     [ blank? ] reject
-    dup length even? [ odd-length-hex-string ] unless
+    dup length even? [ throw-odd-length-hex-string ] unless
     2 <groups> [ hex> ] B{ } map-as
     suffix! ;
index d3edd9022abc81586fce656b8bae2f8df1f4535b..9ed9d3bdcee6874fa5adfd3d03478ab95781694e 100644 (file)
@@ -10,7 +10,7 @@ ERROR: cairo-error n message ;
 
 : (check-cairo) ( cairo_status_t -- )
     dup CAIRO_STATUS_SUCCESS =
-    [ drop ] [ [ ] [ cairo_status_to_string ] bi cairo-error ] if ;
+    [ drop ] [ [ ] [ cairo_status_to_string ] bi throw-cairo-error ] if ;
 
 : check-cairo ( cairo -- ) cairo_status (check-cairo) ;
 
index cee2358f67f161028b519f29502c1977dd64b0bf..9ed39ec7d601ea44dc05bb66ed3c792995809204 100644 (file)
@@ -57,7 +57,7 @@ M: not-a-month summary
 <PRIVATE
 
 : check-month ( n -- n )
-    [ not-a-month ] when-zero ;
+    [ throw-not-a-month ] when-zero ;
 
 PRIVATE>
 
@@ -93,7 +93,7 @@ CONSTANT: month-abbreviations-hash
 
 : month-abbreviation-index ( string -- n )
     month-abbreviations-hash ?at
-    [ not-a-month-abbreviation ] unless ;
+    [ throw-not-a-month-abbreviation ] unless ;
 
 CONSTANT: day-counts { 0 31 28 31 30 31 30 31 31 30 31 30 31 }
 
index a7f2c589a03f8e81e1aba13d629d311d56576afe..bc07f6e9eeb026925b5a1106fc2952f3f5557439 100644 (file)
@@ -202,7 +202,7 @@ M: timestamp year. ( timestamp -- )
 ERROR: invalid-timestamp-format ;
 
 : check-timestamp ( obj/f -- obj )
-    [ invalid-timestamp-format ] unless* ;
+    [ throw-invalid-timestamp-format ] unless* ;
 
 : read-token ( seps -- token )
     [ read-until ] keep member? check-timestamp drop ;
index 41c8537d45820f1976c22a5ecda9673dd08aeaf1..c8eab9a95e35a07157f2ffda50d8ac64badd45bc 100644 (file)
@@ -33,7 +33,7 @@ M: evp-md-context dispose*
 
 : digest-named ( name -- md )
     dup EVP_get_digestbyname
-    [ ] [ unknown-digest ] ?if ;
+    [ ] [ throw-unknown-digest ] ?if ;
 
 : set-digest ( name ctx -- )
     handle>> swap digest-named f EVP_DigestInit_ex ssl-error ;
index 63c3fd159c1c7afa4bd39e866601326f33f02ba4..dc742c72c0fed5cdecfbca363412d8049a40226b 100644 (file)
@@ -285,7 +285,7 @@ M: struct binary-zero? binary-object uchar <c-direct-array> [ 0 = ] all? ; inlin
 
 :: (define-struct-class) ( class slot-specs offsets-quot alignment-quot -- )
     slot-specs check-struct-slots
-    slot-specs empty? [ struct-must-have-slots ] when
+    slot-specs empty? [ throw-struct-must-have-slots ] when
     class redefine-struct-tuple-class
     slot-specs offsets-quot call :> unaligned-size
     slot-specs alignment-quot call :> alignment
@@ -376,7 +376,7 @@ PRIVATE>
     scan-token {
         { ";" [ f ] }
         { "{" [ parse-struct-slot suffix! t ] }
-        [ invalid-struct-slot ]
+        [ throw-invalid-struct-slot ]
     } case ;
 
 : parse-struct-definition ( -- class slots )
@@ -413,7 +413,7 @@ SYNTAX: S@
     scan-token {
         { ";" [ f ] }
         { "{" [ parse-struct-slot` t ] }
-        [ invalid-struct-slot ]
+        [ throw-invalid-struct-slot ]
     } case ;
 
 PRIVATE>
index 0b641b5c015a2e8344748ffedba8c85543cce18a..058062d9004dde5a28a245a846d1d8d63c1a401f 100644 (file)
@@ -67,7 +67,7 @@ ERROR: no-objc-method name ;
     objc-methods get at ;
 
 : lookup-method ( selector -- method )
-    dup ?lookup-method [ ] [ no-objc-method ] ?if ;
+    dup ?lookup-method [ ] [ throw-no-objc-method ] ?if ;
 
 : lookup-sender ( name -- method )
     lookup-method message-senders get at ;
@@ -196,7 +196,7 @@ ERROR: no-objc-type name ;
 
 : decode-type ( ch -- ctype )
     1string dup objc>alien-types get at
-    [ ] [ no-objc-type ] ?if ;
+    [ ] [ throw-no-objc-type ] ?if ;
 
 : (parse-objc-type) ( i string -- ctype )
     [ [ 1 + ] dip ] [ nth ] 2bi {
index dccb43d026231805c926869e877317bac4a15128..2c2dd1ce1aa336e6b4c37be7d1dbd83f898fe3b6 100644 (file)
@@ -58,7 +58,7 @@ ERROR: invalid-plist-object object ;
         { NSArray [ (plist-NSArray>) ] }
         { NSDictionary [ (plist-NSDictionary>) ] }
         { NSObject [ ] }
-        [ invalid-plist-object ]
+        [ throw-invalid-plist-object ]
     } objc-class-case ;
 
 : read-plist ( path -- assoc )
index ad489a51a2d26a086e5364554c22d88d2a3c879a..60eefab88256116c5a806845706d1fab7aad737e 100644 (file)
@@ -28,6 +28,6 @@ PRIVATE>
 ERROR: no-such-color name ;
 
 : named-color ( name -- color )
-    dup colors at [ ] [ no-such-color ] ?if ;
+    dup colors at [ ] [ throw-no-such-color ] ?if ;
 
 SYNTAX: COLOR: scan-token named-color suffix! ;
index 661ed3f08dbd0d8e992bc2f1bbb55cf802fb5bbb..5422a9c67940104ee5baa718dabda31f4e8ffd8e 100644 (file)
@@ -35,7 +35,7 @@ M: bad-probabilities summary
     dup good-probabilities? [
         [ dup pair? [ prepare-pair ] [ with-drop ] if ] map
         cond>quot
-    ] [ bad-probabilities ] if ;
+    ] [ throw-bad-probabilities ] if ;
 
 MACRO: (casep) ( assoc -- quot ) (casep>quot) ;
 
index 7264a07917a1867fd933efc750f96ec5240741f5..b2f2a6e1de38dab588dfa16ff0f8d75554eadd90 100644 (file)
@@ -8,7 +8,7 @@ ERROR: cannot-determine-arity ;
 
 : arity ( quots -- n )
     first infer
-    dup terminated?>> [ cannot-determine-arity ] when
+    dup terminated?>> [ throw-cannot-determine-arity ] when
     effect-height neg 1 + ;
 
 PRIVATE>
index 9243af28d2641161eef2ff516331260df3305714..b1462a76fad60376038f68d0ddc862768b2d4363 100644 (file)
@@ -67,7 +67,7 @@ ERROR: vreg-not-new vreg ;
 
 :: set-ac ( vreg ac -- )
     #! Set alias class of newly-seen vreg.
-    vreg vregs>acs get key? [ vreg vreg-not-new ] when
+    vreg vregs>acs get key? [ vreg throw-vreg-not-new ] when
     ac vreg vregs>acs get set-at
     vreg ac ac>vregs push ;
 
index 23c5b25b6de05e55870475e016ee68766b5ca00e..94160334007774374b97eacb5965fdb052ec09d2 100644 (file)
@@ -7,7 +7,7 @@ ERROR: bad-successors ;
 
 : check-successors ( bb -- )
     dup successors>> [ predecessors>> member-eq? ] with all?
-    [ bad-successors ] unless ;
+    [ throw-bad-successors ] unless ;
 
 : check-cfg ( cfg -- )
     [ check-successors ] each-basic-block ;
index 24b7e05bdc25b8d0c3e97a6c071e40468580b375..aaace50e56dac90e0160400959977930b4c818db 100644 (file)
@@ -28,7 +28,7 @@ ERROR: inline-intrinsics-not-supported word quot ;
 
 : enable-intrinsics ( alist -- )
     [
-        over inline? [ inline-intrinsics-not-supported ] when
+        over inline? [ throw-inline-intrinsics-not-supported ] when
         "intrinsic" set-word-prop
     ] assoc-each ;
 
index 94fa2778f26cab2cc990acf966cc7335f2c03793..779f4f55e8560a445a88c1b7ae016c269aa5217e 100644 (file)
@@ -121,7 +121,7 @@ MACRO: if-literals-match ( quots -- quot )
             ! node literals quot
             [ _ firstn ] dip call
             drop
-        ] [ 2drop bad-simd-intrinsic ] if
+        ] [ 2drop throw-bad-simd-intrinsic ] if
     ] ;
 
 CONSTANT: [unary]        [ ds-drop  ds-pop ]
index 81924ad4cc8531930fb9dd1d7fdcfeea19ef7175..778fd0a1ec2b8275f5d827c64be55259880e8ea1 100644 (file)
@@ -12,7 +12,7 @@ ERROR: bad-live-ranges interval ;
 : check-ranges ( live-interval -- )
     check-allocation? get [
         dup ranges>> [ [ from>> ] [ to>> ] bi <= ] all?
-        [ drop ] [ bad-live-ranges ] if
+        [ drop ] [ throw-bad-live-ranges ] if
     ] [ drop ] if ;
 
 : trim-before-ranges ( live-interval -- )
index bbcb6154f6cfd6d361155f5786aa4bdb8cf9913b..1914c13cf0f3328cea90be3d83774586d7536d46 100644 (file)
@@ -40,10 +40,12 @@ ERROR: splitting-atomic-interval ;
 
 : check-split ( live-interval n -- )
     check-allocation? get [
-        [ [ start>> ] dip > [ splitting-too-early ] when ]
-        [ [ end>> ] dip < [ splitting-too-late ] when ]
-        [ drop [ end>> ] [ start>> ] bi = [ splitting-atomic-interval ] when ]
-        2tri
+        [ [ start>> ] dip > [ throw-splitting-too-early ] when ]
+        [ [ end>> ] dip < [ throw-splitting-too-late ] when ]
+        [
+            drop [ end>> ] [ start>> ] bi =
+            [ throw-splitting-atomic-interval ] when
+        ] 2tri
     ] [ 2drop ] if ; inline
 
 : split-before ( before -- before' )
index 0ab2b9060b90318d6835dc32695e71791e9f03cd..664956d7760122850d2f53c3f9efc528dd6988be 100644 (file)
@@ -71,7 +71,7 @@ ERROR: register-already-used live-interval ;
 : check-activate ( live-interval -- )
     check-allocation? get [
         dup [ reg>> ] [ active-intervals-for [ reg>> ] map ] bi member?
-        [ register-already-used ] [ drop ] if
+        [ throw-register-already-used ] [ drop ] if
     ] [ drop ] if ;
 
 : activate ( n live-interval -- keep? )
index 81cbfa4cf7764461e73f13c9871573b72e657076..c85278c1f6c6d25449ea073a82b193d708b438a5 100644 (file)
@@ -28,7 +28,9 @@ SYMBOL: pending-interval-assoc
 ERROR: not-spilled-error vreg ;
 
 : vreg>spill-slot ( vreg -- spill-slot )
-    dup vreg>reg dup spill-slot? [ nip ] [ drop leader not-spilled-error ] if ;
+    dup vreg>reg dup spill-slot?
+    [ nip ]
+    [ drop leader throw-not-spilled-error ] if ;
 
 : vregs>regs ( vregs -- assoc )
     [ dup vreg>reg ] H{ } map>assoc ;
index f7f54cde10b173574eb82dc87604b403312a70b4..305bc9777f89ee6b0dff6f73882ad1b30ffaf43f 100644 (file)
@@ -172,7 +172,7 @@ M: hairy-clobber-insn compute-live-intervals* ( insn -- )
 ERROR: bad-live-interval live-interval ;
 
 : check-start ( live-interval -- )
-    dup start>> -1 = [ bad-live-interval ] [ drop ] if ;
+    dup start>> -1 = [ throw-bad-live-interval ] [ drop ] if ;
 
 : finish-live-intervals ( live-intervals -- )
     [
index cf61de5ef35eafba9676592a2335ea415abc1448..dda239d64223905f25535d0e22c2f1e810729071 100644 (file)
@@ -18,7 +18,7 @@ ERROR: bad-numbering bb ;
 
 : check-block-numbering ( bb -- )
     dup instructions>> [ insn#>> ] map sift [ <= ] monotonic?
-    [ drop ] [ bad-numbering ] if ;
+    [ drop ] [ throw-bad-numbering ] if ;
 
 : check-numbering ( cfg -- )
     check-numbering? get
index c6b630b79ed8132941fb1f575fc48036bd944cd9..4b29c16b746ff5735c4c3311abab95eaa5cc7f07 100644 (file)
@@ -16,7 +16,7 @@ SYMBOL: representations
 ERROR: bad-vreg vreg ;
 
 : rep-of ( vreg -- rep )
-    representations get ?at [ bad-vreg ] unless ;
+    representations get ?at [ throw-bad-vreg ] unless ;
 
 : set-rep-of ( rep vreg -- )
     representations get set-at ;
index e01a030495b907e8105a547831417aad01bae95a..01b447a3fe844016856d67d8316fcc8c5f6246a8 100644 (file)
@@ -77,7 +77,7 @@ M: scalar-rep int>rep ( dst src rep -- )
                 ! it is allowed... otherwise bail out.
                 [
                     drop 2dup [ reg-class-of ] bi@ eq?
-                    [ drop ##copy, ] [ bad-conversion ] if
+                    [ drop ##copy, ] [ throw-bad-conversion ] if
                 ]
             } case
         ]
index c9e88cd83d888b04fe0e3f5c062893d1f94279be..e9b6f682ce482a35ddedbdf8497b5480ce05bf23 100644 (file)
@@ -27,7 +27,7 @@ ERROR: vregs-shouldn't-interfere vreg1 vreg2 ;
 : try-eliminate-copy ( follower leader must? -- )
     -rot leaders 2dup = [ 3drop ] [
         2dup vregs-interfere? [
-            drop rot [ vregs-shouldn't-interfere ] [ 2drop ] if
+            drop rot [ throw-vregs-shouldn't-interfere ] [ 2drop ] if
         ] [ -rot coalesce-vregs drop ] if
     ] if ;
 
index 73d7a492e2b0165f4b0aa01ea9c7258c4ea8d99c..e3982983ad7ea1a09b5491434214a24d7f532e30 100644 (file)
@@ -68,6 +68,6 @@ ERROR: bad-kill-index vreg bb ;
     2dup live-out? [ 2drop 1/0. ] [
         2dup kill-indices get at at* [ 2nip ] [
             drop 2dup live-in?
-            [ bad-kill-index ] [ 2drop -1/0. ] if
+            [ throw-bad-kill-index ] [ 2drop -1/0. ] if
         ] if
     ] if ;
index 210c9787729db95cf38b6dd5af1dcd1596a40c4c..985c4a32cea0b4828a35b8e4bdf6e6476045b3f8 100644 (file)
@@ -24,7 +24,7 @@ ERROR: bad-peek dst loc ;
 
 : insert-peeks ( from to -- )
     [ inserting-peeks ] keep
-    [ dup n>> 0 < [ bad-peek ] [ ##peek, ] if ] each-insertion ;
+    [ dup n>> 0 < [ throw-bad-peek ] [ ##peek, ] if ] each-insertion ;
 
 : insert-replaces ( from to -- )
     [ inserting-replaces ] keep
index 78bd22dad0dd1fe2e002cf2ed917863949f1ce32..79d84488343a5df1702f69ee1a80c615290c555a 100644 (file)
@@ -42,7 +42,7 @@ CONSTANT: initial-state { { 0 { } } { 0 { } } }
     [ register-write ] apply-stack-op ;
 
 : ensure-no-vacant ( state -- )
-    [ second ] map dup { { } { } } = [ drop ] [ vacant-when-calling ] if ;
+    [ second ] map dup { { } { } } = [ drop ] [ throw-vacant-when-calling ] if ;
 
 : all-live ( state -- state' )
     [ first { } 2array ] map ;
@@ -68,7 +68,7 @@ ERROR: vacant-peek insn ;
 
 : underflowable-peek? ( state peek -- ? )
     2dup loc>> >loc< swap [ 0 1 ? swap nth ] dip classify-read
-    dup 2 = [ drop vacant-peek ] [ 2nip 1 = ] if ;
+    dup 2 = [ drop throw-vacant-peek ] [ 2nip 1 = ] if ;
 
 M: ##peek visit-insn ( state insn -- state )
     dup loc>> n>> 0 >= t assert=
index 1409925f9a8203bc7be67e5788ee896743991539..2c61621762fea351df959359eeda51ea096780a1 100644 (file)
@@ -61,13 +61,15 @@ ERROR: no-such-library name message ;
 
 M: no-such-library summary drop "Library not found" ;
 
-: no-such-library-error ( name message word -- ) \ no-such-library set-linkage-error ;
+: no-such-library-error ( name message word -- )
+    \ no-such-library set-linkage-error ;
 
 ERROR: no-such-symbol name message ;
 
 M: no-such-symbol summary drop "Symbol not found" ;
 
-: no-such-symbol-error ( name message word -- ) \ no-such-symbol set-linkage-error ;
+: no-such-symbol-error ( name message word -- )
+    \ no-such-symbol set-linkage-error ;
 
 ERROR: not-compiled word error ;
 
index 78a6b5ee7a7de75c6e6067f16c4099e0f7537232..95ae1674c5cac1c5d071dfc47f4befebf8f5986c 100644 (file)
@@ -319,7 +319,7 @@ ERROR: bug-in-fixnum* x y a b ;
         32 random-bits >fixnum
         32 random-bits >fixnum
         2dup [ fixnum* ] [ compiled-fixnum* ] 2bi 2dup =
-        [ 4drop ] [ bug-in-fixnum* ] if
+        [ 4drop ] [ throw-bug-in-fixnum* ] if
     ] times
 ] unit-test
 
index 03249db124f5d32fc866cb4e23822cfd11b499f7..bc616fe8c869584b16fc0cb1b45744c07aed5106 100644 (file)
@@ -11,8 +11,12 @@ IN: compiler.tree.checker
 ERROR: check-use-error value message ;
 
 : check-use ( value uses -- )
-    [ empty? [ "No use" check-use-error ] [ drop ] if ]
-    [ all-unique? [ drop ] [ "Uses not all unique" check-use-error ] if ] 2bi ;
+    [ empty? [ "No use" throw-check-use-error ] [ drop ] if ]
+    [
+        all-unique?
+        [ drop ]
+        [ "Uses not all unique" throw-check-use-error ] if
+    ] 2bi ;
 
 : check-def-use ( -- )
     def-use get [ uses>> check-use ] assoc-each ;
@@ -58,7 +62,7 @@ ERROR: check-node-error node error ;
         [ node-defs-values check-values ]
         [ check-node* ]
         tri
-    ] [ check-node-error ] recover ;
+    ] [ throw-check-node-error ] recover ;
 
 SYMBOL: datastack
 SYMBOL: retainstack
index d572ba0965f5b9a16b76403587d74630bdb82c08..786e276def9f557d22ed3abbbfa87a9d8c5ef71a 100644 (file)
@@ -18,7 +18,7 @@ TUPLE: definition value node uses ;
 ERROR: no-def-error value ;
 
 : (def-of) ( value def-use -- definition )
-    ?at [ no-def-error ] unless ; inline
+    ?at [ throw-no-def-error ] unless ; inline
 
 : def-of ( value -- definition )
     def-use get (def-of) ;
@@ -27,7 +27,7 @@ ERROR: multiple-defs-error ;
 
 : (def-value) ( node value def-use -- )
     2dup key? [
-        multiple-defs-error
+        throw-multiple-defs-error
     ] [
         [ [ <definition> ] keep ] dip set-at
     ] if ; inline
index b4166044a915984073778fcc3522469c3fd0d106..7b7149c6ff293fe0a9971afe0c81667f97fbe2cf 100644 (file)
@@ -9,7 +9,6 @@ IN: compression.inflate
 
 <PRIVATE
 
-ERROR: zlib-unimplemented ;
 ERROR: bad-zlib-data ;
 ERROR: bad-zlib-header ;
 
@@ -18,7 +17,7 @@ ERROR: bad-zlib-header ;
     0 assert=
     4 data bs:read 8 assert=            ! compression method: deflate
     4 data bs:read                      ! log2(max length)-8, 32K max
-    7 <= [ bad-zlib-header ] unless
+    7 <= [ throw-bad-zlib-header ] unless
     5 data bs:seek                      ! drop check bits
     1 data bs:read 0 assert=            ! dictionary - not allowed in png
     2 data bs:seek                      ! compression level; ignore
@@ -105,7 +104,7 @@ CONSTANT: dist-table
             dup 285 = [
                 dup 264 > [
                     dup 261 - 4 /i
-                    dup 5 > [ bad-zlib-data ] when
+                    dup 5 > [ throw-bad-zlib-data ] when
                     bitstream bs:read 2array
                 ] when
             ] unless
@@ -114,7 +113,7 @@ CONSTANT: dist-table
 
             dup 3 > [
                 dup 2 - 2 /i dup 13 >
-                [ bad-zlib-data ] when
+                [ throw-bad-zlib-data ] when
                 bitstream bs:read 2array
             ] when 2array
         ] when dup 256 = not
@@ -158,7 +157,7 @@ CONSTANT: dist-table
             { 0 [ inflate-raw ] }
             { 1 [ inflate-static ] }
             { 2 [ inflate-dynamic ] }
-            { 3 [ bad-zlib-data f ] }
+            { 3 [ throw-bad-zlib-data f ] }
         } case
     ] [ produce ] keep call suffix concat ;
 
index 79a8b02e4e105100bca2703f1bd01dc15331c9e0..efe026a58ebfd512798d7fb93ad40c0eddbaefc7 100755 (executable)
@@ -30,7 +30,7 @@ ERROR: code-size-zero ;
 
 : <lzw-uncompress> ( input code-size class -- obj )
     new
-        swap [ code-size-zero ] when-zero >>code-size
+        swap [ throw-code-size-zero ] when-zero >>code-size
         dup code-size>> >>initial-code-size
         dup code-size>> 1 - 2^ >>clear-code
         dup clear-code>> 1 + >>end-of-information-code
@@ -38,8 +38,6 @@ ERROR: code-size-zero ;
         BV{ } clone >>output
         reset-lzw-uncompress ;
 
-ERROR: not-in-table value ;
-
 : lookup-old-code ( lzw -- vector )
     [ old-code>> ] [ table>> ] bi nth ;
 
index 590c9d4b713725f535c2e4878020f95044cf29cd..f368ebec3b8d36d52a09d5a9987cdb7da8657195 100644 (file)
@@ -9,7 +9,7 @@ ERROR: snappy-error error ;
 <PRIVATE
 
 : check-snappy ( ret -- )
-    dup SNAPPY_OK = [ drop ] [ snappy-error ] if ;
+    dup SNAPPY_OK = [ drop ] [ throw-snappy-error ] if ;
 
 : n>outs ( n -- byte-array size_t* )
     [ <byte-array> ] [ size_t <ref> ] bi ;
index 533d55bb68b68feaa05c0bbfa9e984f044e46f40..a82352327d68374210d5c72e62a9670c2fd0ee20 100644 (file)
@@ -20,13 +20,13 @@ ERROR: zlib-failed n string ;
             "stream error" "data error"
             "memory error" "buffer error" "zlib version error"
         } ?nth
-    ] if zlib-failed ;
+    ] if throw-zlib-failed ;
 
 : zlib-error ( n -- )
     dup {
         { compression.zlib.ffi:Z_OK [ drop ] }
         { compression.zlib.ffi:Z_STREAM_END [ drop ] }
-        [ dup zlib-error-message zlib-failed ]
+        [ dup zlib-error-message throw-zlib-failed ]
     } case ;
 
 : compressed-size ( byte-array -- n )
index 48a685efda4074b2c86bd7032c5edaac15de243e..ca72e47e8f3f8731a6d9bc8e0c9187cba78d61e3 100644 (file)
@@ -28,7 +28,7 @@ ERROR: timed-out-error timer ;
 : wait ( queue timeout status -- )
     over [
         [ queue-timeout ] dip suspend
-        [ timed-out-error ] [ stop-timer ] if
+        [ throw-timed-out-error ] [ stop-timer ] if
     ] [
         [ drop queue ] dip suspend drop
     ] if ; inline
index c5d1d57985dce08e3fb85849de5bafe6fdee3e64..0a5891d7e2bfe1c60612b014dfa158660b744fa7 100755 (executable)
@@ -14,7 +14,7 @@ TUPLE: count-down-tuple n promise ;
 ERROR: invalid-count-down-count count ;
 
 : <count-down> ( n -- count-down )
-    dup 0 < [ invalid-count-down-count ] when
+    dup 0 < [ throw-invalid-count-down-count ] when
     <promise> \ count-down-tuple boa
     dup count-down-check ;
 
@@ -22,7 +22,7 @@ ERROR: count-down-already-done ;
 
 : count-down ( count-down -- )
     dup n>> dup zero?
-    [ count-down-already-done ]
+    [ throw-count-down-already-done ]
     [ 1 - >>n count-down-check ] if ;
 
 : await-timeout ( count-down timeout -- )
index dc3e810871157f0418abb05c11b33edd4b38529a..e685f243f689ad42ce9577cdad3426fe3e104e42 100644 (file)
@@ -56,7 +56,7 @@ M: cannot-send-synchronous-to-self summary
 
 : send-synchronous ( message thread -- reply )
     dup self eq? [
-        cannot-send-synchronous-to-self
+        throw-cannot-send-synchronous-to-self
     ] [
         [ <synchronous> dup ] dip send
         '[ _ synchronous-reply? ] receive-if
index f47ee05c75d9d765dd03cbf2405fd37235ef1563..44e98e2f1a9e092ff7436c309e8d1f07e218d072 100644 (file)
@@ -15,7 +15,7 @@ ERROR: promise-already-fulfilled promise ;
 
 : fulfill ( value promise -- )
     dup promise-fulfilled? [
-        promise-already-fulfilled
+        throw-promise-already-fulfilled
     ] [
         mailbox>> mailbox-put
     ] if ;
index 392b7557d69e21a5e3f4198986e4f55b0256c1fa..fae9cc576ce5418beaa29096c994edd6a408517d 100644 (file)
@@ -12,7 +12,7 @@ M: negative-count-semaphore summary
     drop "Cannot have semaphore with negative count" ;
 
 : <semaphore> ( n -- semaphore )
-    dup 0 < [ negative-count-semaphore ] when
+    dup 0 < [ throw-negative-count-semaphore ] when
     <dlist> semaphore boa ;
 
 : wait-to-acquire ( semaphore timeout -- )
index 77a984e75ac09a01f923ab3ff3fbda1befebee5e..9e75dd8680288d422ebf22868a6792ef7e8797b8 100644 (file)
@@ -113,7 +113,7 @@ CONSTANT: kLSUnknownCreator f
 ERROR: core-foundation-error n ;
 
 : cf-error ( n -- )
-    dup 0 = [ drop ] [ core-foundation-error ] if ;
+    dup 0 = [ drop ] [ throw-core-foundation-error ] if ;
 
 : fsref>string ( fsref -- string )
     MAXPATHLEN [ <char-array> ] [ ] bi
index bdeb3bf0174fceabac110d6f47447d5d510fd8c3..08ce305c7a287e7aa71988e2ee884b033f89db6d 100644 (file)
@@ -67,5 +67,5 @@ ERROR: unsupported-number-type type ;
         { kCFNumberLongType [ long (CFNumber>number) ] }
         { kCFNumberLongLongType [ longlong (CFNumber>number) ] }
         { kCFNumberDoubleType [ double (CFNumber>number) ] }
-        [ unsupported-number-type ]
+        [ throw-unsupported-number-type ]
     } case ;
index 98b6c4a189eaf2ac2e7f38ba2fa07ec127b0bd14..c4f20998e8929801602e9e1cf404d46dbd3a6fdb 100644 (file)
@@ -45,7 +45,7 @@ MEMO: make-attributes ( open-font color -- hashtable )
     [
         [
             dup selection? [ string>> ] when
-            dup string? [ not-a-string ] unless
+            dup string? [ throw-not-a-string ] unless
         ] 2dip
         make-attributes <CFAttributedString> &CFRelease
         CTLineCreateWithAttributedString
index 6426af85cdd14b62b6abcdb969be0a9bf3b1b3f5..b21aeada62ab90b9eb7960d4199b0250655efe8c 100644 (file)
@@ -234,14 +234,14 @@ M: operand MOV 0x88 2-operand ;
 ERROR: bad-movabs-operands dst src ;
 
 GENERIC: MOVABS ( dst src -- )
-M: object MOVABS bad-movabs-operands ;
+M: object MOVABS throw-bad-movabs-operands ;
 M: register MOVABS
     {
         { AL [ 0xa2 , cell, ] }
         { AX [ 0x66 , 0xa3 , cell, ] }
         { EAX [ 0xa3 , cell, ] }
         { RAX [ 0x48 , 0xa3 , cell, ] }
-        [ swap bad-movabs-operands ]
+        [ swap throw-bad-movabs-operands ]
     } case ;
 M: integer MOVABS
     swap {
@@ -249,7 +249,7 @@ M: integer MOVABS
         { AX [ 0x66 , 0xa1 , cell, ] }
         { EAX [ 0xa1 , cell, ] }
         { RAX [ 0x48 , 0xa1 , cell, ] }
-        [ swap bad-movabs-operands ]
+        [ swap throw-bad-movabs-operands ]
     } case ;
 
 : LEA ( dst src -- ) swap 0x8d 2-operand ;
@@ -481,7 +481,7 @@ ERROR: bad-x87-operands ;
 :: x87-st0-op ( src opcode reg -- )
     src register?
     [ src opcode reg (x87-op) ]
-    [ bad-x87-operands ] if ;
+    [ throw-bad-x87-operands ] if ;
 
 :: x87-m-st0/n-op ( dst src opcode reg -- )
     {
@@ -494,7 +494,7 @@ ERROR: bad-x87-operands ;
         { [ src ST0 = dst register? and ] [
             dst opcode 4 + reg (x87-op)
         ] }
-        [ bad-x87-operands ]
+        [ throw-bad-x87-operands ]
     } cond ;
 
 PRIVATE>
index 2a2faa4039911995af8fbe9884a9dc9eb6838729..6368405e6597b611855062a9d99d3e1baaf4a312 100644 (file)
@@ -66,7 +66,7 @@ M: indirect extended? base>> extended? ;
 ERROR: bad-index indirect ;
 
 : check-ESP ( indirect -- indirect )
-    dup index>> { ESP RSP } member-eq? [ bad-index ] when ;
+    dup index>> { ESP RSP } member-eq? [ throw-bad-index ] when ;
 
 : canonicalize ( indirect -- indirect )
     #! Modify the indirect to work around certain addressing mode
index 7f350d17ee82251b41d37bd7de35d327862d02d4..2b18514288d2f81db4cc1c6a24c2c8c4e88db44c 100644 (file)
@@ -37,7 +37,7 @@ M: postgresql-result-null summary ( obj -- str )
     drop "PQexec returned f." ;
 
 : postgresql-result-ok? ( res -- ? )
-    [ postgresql-result-null ] unless*
+    [ throw-postgresql-result-null ] unless*
     PQresultStatus
     PGRES_COMMAND_OK PGRES_TUPLES_OK 2array member? ;
 
index 12acded9c068aabd250152d09c810a10a44bec3b..837cd414f57bd828523b6a0db5f27ec436762eab 100644 (file)
@@ -278,7 +278,7 @@ M: postgresql-db-connection compound ( string object -- string' )
         { "default" [ first number>string " " glue ] }
         { "varchar" [ first number>string "(" ")" surround append ] }
         { "references" [ >reference-string ] }
-        [ drop no-compound-found ]
+        [ drop throw-no-compound-found ]
     } case ;
 
 M: postgresql-db-connection parse-db-error
index fb3a7e107a22526a8678c965adb7d734071de7cd..5b7a91eefb7f94b25c6ec8fdb056ba5723611880 100644 (file)
@@ -158,7 +158,7 @@ M: db-connection <select-by-slots-statement> ( tuple class -- statement )
     [
         "select " 0%
         [ dupd filter-ignores ] dip
-        over empty? [ all-slots-ignored ] when
+        over empty? [ throw-all-slots-ignored ] when
         over
         [ ", " 0% ]
         [ dup column-name>> 0% 2, ] interleave
index 9005b48f17f5ee7024b2f53aac6501f9f46e64e7..8131e18d3cb86beac70e434ccd22bbd5efa96762 100644 (file)
@@ -100,7 +100,7 @@ ERROR: sqlite-last-id-fail ;
 
 : last-insert-id ( -- id )
     db-connection get handle>> sqlite3_last_insert_rowid
-    dup zero? [ sqlite-last-id-fail ] when ;
+    dup zero? [ throw-sqlite-last-id-fail ] when ;
 
 M: sqlite-db-connection insert-tuple-set-key ( tuple statement -- )
     execute-statement last-insert-id swap set-primary-key ;
index 0bdb2978ee1580285be2f91ad2d8b0757595aa62..ac010e5a6654560310d1a51c51a2cef5a7e80f1d 100644 (file)
@@ -78,7 +78,7 @@ ERROR: no-slots-named class seq ;
         [ keys ]
         [ all-slots [ name>> ] map ] bi* diff
     ] 2bi
-    [ drop ] [ no-slots-named ] if-empty ;
+    [ drop ] [ throw-no-slots-named ] if-empty ;
 
 : define-persistent ( class table columns -- )
     pick dupd
@@ -103,7 +103,7 @@ ERROR: no-defined-persistent object ;
 
 : ensure-defined-persistent ( object -- object )
     dup { [ class? ] [ "db-table" word-prop ] } 1&& [
-        no-defined-persistent
+        throw-no-defined-persistent
     ] unless ;
 
 : create-table ( class -- )
index 5fb86e5ea96fca005bfeddbf6238b5cfb7f2de5b..5b92512d60cdac689c3715376d8af6dc501bc428 100644 (file)
@@ -38,7 +38,7 @@ SYMBOL: IGNORE
 ERROR: not-persistent class ;
 
 : db-table-name ( class -- object )
-    dup "db-table" word-prop [ ] [ not-persistent ] ?if ;
+    dup "db-table" word-prop [ ] [ throw-not-persistent ] ?if ;
 
 : db-columns ( class -- object )
     superclasses-of [ "db-columns" word-prop ] map concat ;
@@ -117,13 +117,13 @@ ERROR: unknown-modifier modifier ;
 : lookup-modifier ( obj -- string )
     {
         { [ dup array? ] [ unclip lookup-modifier swap compound ] }
-        [ persistent-table ?at [ unknown-modifier ] unless third ]
+        [ persistent-table ?at [ throw-unknown-modifier ] unless third ]
     } cond ;
 
 ERROR: no-sql-type type ;
 
 : (lookup-type) ( obj -- string )
-    persistent-table ?at [ no-sql-type ] unless ;
+    persistent-table ?at [ throw-no-sql-type ] unless ;
 
 : lookup-type ( obj -- string )
     dup array? [
@@ -152,5 +152,5 @@ ERROR: no-column column ;
     first2
     [ [ db-table-name " " glue ] [ db-columns ] bi ] dip
     swap [ column-name>> = ] with find nip
-    [ no-column ] unless*
+    [ throw-no-column ] unless*
     column-name>> "(" ")" surround append ;
index 6a18de6c0eba702fb90663184d28b59cc19db69d..1faf570e9714c6655e14ef97001742f531e5cef6 100644 (file)
@@ -38,7 +38,7 @@ M: tuple-class group-words
 
 : check-broadcast-group ( group -- group )
     dup group-words [ first stack-effect out>> empty? ] all?
-    [ broadcast-words-must-have-no-outputs ] unless ;
+    [ throw-broadcast-words-must-have-no-outputs ] unless ;
 
 ! Consultation
 
@@ -160,7 +160,7 @@ ERROR: not-a-generic word ;
 
 : check-generic ( generic -- )
     dup array? [ first ] when
-    dup generic? [ drop ] [ not-a-generic ] if ;
+    dup generic? [ drop ] [ throw-not-a-generic ] if ;
 
 PRIVATE>
 
index 8ecde83a14a2081c81b2a2d657353e0c826849d7..79fc81c5b568786d7488d3811a2c0cbbcb272148 100644 (file)
@@ -18,13 +18,13 @@ GENERIC: deque-empty? ( deque -- ? )
 ERROR: empty-deque ;
 
 : peek-front ( deque -- obj )
-    peek-front* [ drop empty-deque ] unless ;
+    peek-front* [ drop throw-empty-deque ] unless ;
 
 : ?peek-front ( deque -- obj/f )
     peek-front* [ drop f ] unless ;
 
 : peek-back ( deque -- obj )
-    peek-back* [ drop empty-deque ] unless ;
+    peek-back* [ drop throw-empty-deque ] unless ;
 
 : ?peek-back ( deque -- obj/f )
     peek-back* [ drop f ] unless ;
index fe21dfe4df8eeb8441b32ef01fd042982f8dbbba..85b7484247d2bbbf619a0f7dedc9ba0d07bfe370 100644 (file)
@@ -37,7 +37,7 @@ M: object editor-detached? t ;
 ERROR: invalid-location file line ;
 
 : edit-location ( file line -- )
-    over [ invalid-location ] unless
+    over [ throw-invalid-location ] unless
     [ absolute-path ] dip
     editor-command [ run-and-wait-for-editor ] when* ;
 
@@ -66,7 +66,7 @@ PRIVATE>
 GENERIC: edit ( object -- )
 
 M: object edit
-    dup where [ first2 edit-location ] [ cannot-find-source ] ?if ;
+    dup where [ first2 edit-location ] [ throw-cannot-find-source ] ?if ;
 
 M: string edit edit-vocab ;
 
index 7a2b8114ede1dc718c7488c338cfe1e97372a2e5..26d20375dc35c144482e0a647435c2ad4c80c5f1 100644 (file)
@@ -8,8 +8,6 @@ IN: editors.jedit
 SINGLETON: jedit
 jedit editor-class set-global
 
-ERROR: jedit-not-found ;
-
 HOOK: find-jedit-path os ( -- path )
 
 M: object find-jedit-path f ;
index f36b04262240f45ac8b475d4ac079b1d30a86c02..2cc26266dcd1acdb01d7a7dce65e51106cec1496 100644 (file)
@@ -72,7 +72,7 @@ fmt-E     = digits "E"           => [[ first '[ _ format-scientific >upper ] ]]
 fmt-f     = digits "f"           => [[ first '[ _ format-decimal ] ]]
 fmt-x     = "x"                  => [[ [ >hex ] ]]
 fmt-X     = "X"                  => [[ [ >hex >upper ] ]]
-unknown   = (.)*                 => [[ unknown-printf-directive ]]
+unknown   = (.)*                 => [[ throw-unknown-printf-directive ]]
 
 strings_  = fmt-c|fmt-C|fmt-s|fmt-S|fmt-u
 strings   = pad width strings_   => [[ <reversed> compose-all ]]
index cca4aef3b5fe266c81d6461e67221589606b3082..2b447fa4db09c0d5b948991d8664a422c7f82d3d 100644 (file)
@@ -15,7 +15,7 @@ GENERIC: fry ( quot -- quot' )
 
 : check-fry ( quot -- quot )
     dup { load-local load-locals get-local drop-locals } intersect
-    [ >r/r>-in-fry-error ] unless-empty ;
+    [ throw->r/r>-in-fry-error ] unless-empty ;
 
 PREDICATE: fry-specifier < word { _ @ } member-eq? ;
 
index c94d5a273a20bbc46e4774c61d3d606d47002acc..b676798fb05d64dab0f8aa093ac275cacfb55cc2 100644 (file)
@@ -28,7 +28,7 @@ IN: ftp.client
 ERROR: ftp-error got expected ;
 
 : ftp-assert ( ftp-response n -- )
-    2dup [ n>> ] dip = [ 2drop ] [ ftp-error ] if ;
+    2dup [ n>> ] dip = [ 2drop ] [ throw-ftp-error ] if ;
 
 : ftp-command ( string -- ftp-response )
     ftp-send read-response ;
index 6dacaf72cc3ce2af7c7b835014d53fd456f07cf2..f3d4b708893110e9c227e580fb4db0a081977bff 100644 (file)
@@ -111,7 +111,7 @@ ERROR: type-error type ;
     >upper {
         { "IMAGE" [ "Binary" ] }
         { "I" [ "Binary" ] }
-        [ type-error ]
+        [ throw-type-error ]
     } case ;
 
 : handle-TYPE ( obj -- )
@@ -287,9 +287,6 @@ M: ftp-disconnect handle-passive-command ( stream obj -- )
         "" not-a-plain-file
     ] if* ;
 
-ERROR: not-a-directory ;
-ERROR: no-directory-permissions ;
-
 : directory-change-success ( -- )
     "Directory successully changed." 250 server-response ;
 
index 4f2568b636ad67a4cd6fa1b75b4c2fefe5b46a8e..76f9e675c49aa9efc444d7a8e58b1a5a9e5894c7 100644 (file)
@@ -77,7 +77,7 @@ M: asides call-responder*
 ERROR: end-aside-in-get-error ;
 
 : move-on ( id -- response )
-    post-request? [ end-aside-in-get-error ] unless
+    post-request? [ throw-end-aside-in-get-error ] unless
     dup method>> {
         { "GET" [ url>> <redirect> ] }
         { "HEAD" [ url>> <redirect> ] }
index 57a6919ae92459fa6ece6c9b143b14fea224f5a3..0826bf9e7be3525a52456a8202b3c1ad9939285a 100644 (file)
@@ -16,7 +16,7 @@ ERROR: no-such-word name vocab ;
 
 : string>word ( string -- word )
     ":" split1 swap 2dup lookup-word dup
-    [ 2nip ] [ drop no-such-word ] if ;
+    [ 2nip ] [ drop throw-no-such-word ] if ;
 
 : strings>words ( seq -- seq' )
     [ string>word ] map ;
@@ -32,7 +32,7 @@ ERROR: no-such-responder responder ;
 : base-path ( string -- seq )
     dup responder-nesting get
     [ second class-of superclasses-of [ name>> = ] with any? ] with find nip
-    [ first ] [ no-such-responder ] ?if ;
+    [ first ] [ throw-no-such-responder ] ?if ;
 
 : resolve-base-path ( string -- string' )
     "$" ?head [
index e46587f5bad5b5c658eeb1bbc3e05dc7751e2941..a4395aaaf8c44eafd8f003ca6965862203b88965 100644 (file)
@@ -50,7 +50,7 @@ ERROR: game-input-not-open ;
     reset-mouse ;
 : close-game-input ( -- )
     game-input-opened [
-        dup zero? [ game-input-not-open ] when
+        dup zero? [ throw-game-input-not-open ] when
         1 -
     ] change-global
     game-input-opened? [
index 91b42d5a833611f2d7ee7ad411a9349f3607e862..49be966f0e8924a1f99509536963c5bd94fd0021 100644 (file)
@@ -28,7 +28,7 @@ ERROR: nonpositive-npick n ;
 
 MACRO: npick ( n -- quot )
     {
-        { [ dup 0 <= ] [ nonpositive-npick ] }
+        { [ dup 0 <= ] [ throw-nonpositive-npick ] }
         { [ dup 1 = ] [ drop [ dup ] ] }
         [ 1 - [ dup ] [ '[ _ dip swap ] ] repeat ]
     } cond ;
index 3d380cb68b7c58462625685beee2f173ac3f744d..61646275c881c77f1e49108f63f0d95f95c234d3 100755 (executable)
@@ -39,7 +39,7 @@ M: gir-not-found summary
         current-vocab-dirs custom-gir-dirs system-gir-dirs
         3append sift :> paths
         paths [ path append-path exists? ] find nip
-        [ path append-path ] [ path paths gir-not-found ] if*
+        [ path append-path ] [ path paths throw-gir-not-found ] if*
     ] if ;
 
 : define-gir-vocab ( path -- )
index cd244cf9aaa9567705d1079f03f70c6f762cc8de..1d975523a45918d1956393f4abb2c237de876c12 100644 (file)
@@ -79,7 +79,7 @@ ERROR: unknown-type-error type ;
 
 : get-type-info ( data-type -- info )
     qualified-type-name dup type-infos get-global at
-    [ ] [ unknown-type-error ] ?if ;
+    [ ] [ throw-unknown-type-error ] ?if ;
 
 : find-type-info ( data-type -- info/f )
     qualified-type-name type-infos get-global at ;
@@ -105,8 +105,8 @@ ERROR: deferred-type-error ;
 
 <<
 void* lookup-c-type clone
-    [ drop deferred-type-error ] >>unboxer-quot
-    [ drop deferred-type-error ] >>boxer-quot
+    [ drop throw-deferred-type-error ] >>unboxer-quot
+    [ drop throw-deferred-type-error ] >>boxer-quot
     object >>boxed-class
 "deferred-type" create-word-in typedef
 >>
index 233d793483bc21f8f3f785ec26fd22efade18f99..00cc454ee9669aac6b92d431e512591a1237e08c 100644 (file)
@@ -57,7 +57,7 @@ M: abstract-clumps group@
 TUPLE: chunking-seq { seq read-only } { n read-only } ;
 
 : check-groups ( seq n -- seq n )
-    dup 0 <= [ groups-error ] when ; inline
+    dup 0 <= [ throw-groups-error ] when ; inline
 
 : new-groups ( seq n class -- groups )
     [ check-groups ] dip boa ; inline
index b92bfe36687087cc668f8ca19fe2f674acb2e038..3f41c1bc26ca984e4b3d15544b0f811295a5cda0 100644 (file)
@@ -24,7 +24,7 @@ TUPLE: heap { data vector } ;
 ERROR: not-a-heap object ;
 
 : check-heap ( heap -- heap )
-    dup heap? [ not-a-heap ] unless ; inline
+    dup heap? [ throw-not-a-heap ] unless ; inline
 
 TUPLE: entry value key heap index ;
 
@@ -164,7 +164,7 @@ M: bad-heap-delete summary
 <PRIVATE
 
 : entry>index ( entry heap -- n )
-    over heap>> eq? [ bad-heap-delete ] unless
+    over heap>> eq? [ throw-bad-heap-delete ] unless
     index>> { fixnum } declare ; inline
 
 PRIVATE>
index 0133e3b7c8cef4bf55cd57ad5798f92347b90e16..b94aa677d7ddf4bb3311496d502314f163ced2d6 100644 (file)
@@ -30,7 +30,7 @@ SYMBOL: vocab-articles
             last assert=
         ] vocabs-quot get call( quot -- )
     ] leaks members length [
-        "%d disposable(s) leaked in example" sprintf simple-lint-error
+        "%d disposable(s) leaked in example" sprintf throw-simple-lint-error
     ] unless-zero ;
 
 : check-examples ( element -- )
@@ -88,7 +88,7 @@ SYMBOL: vocab-articles
         [ effect-values ] [ extract-values ] bi* 2dup
         sequence= [ 2drop ] [
             "$values don't match stack effect; expected %u, got %u" sprintf
-            simple-lint-error
+            throw-simple-lint-error
         ] if
     ] if ;
 
@@ -96,17 +96,17 @@ SYMBOL: vocab-articles
     [ effect-effects ] [ extract-value-effects ] bi*
     [ 2dup and [ = ] [ 2drop t ] if ] 2all? [
         "$quotation stack effects in $values don't match"
-        simple-lint-error
+        throw-simple-lint-error
     ] unless ;
 
 : check-nulls ( element -- )
     \ $values swap elements
     null swap deep-member?
-    [ "$values should not contain null" simple-lint-error ] when ;
+    [ "$values should not contain null" throw-simple-lint-error ] when ;
 
 : check-see-also ( element -- )
     \ $see-also swap elements [ rest all-unique? ] all?
-    [ "$see-also are not unique" simple-lint-error ] unless ;
+    [ "$see-also are not unique" throw-simple-lint-error ] unless ;
 
 : vocab-exists? ( name -- ? )
     [ lookup-vocab ] [ all-vocabs-list get member? ] bi or ;
@@ -116,7 +116,7 @@ SYMBOL: vocab-articles
         second
         vocab-exists? [
             "$vocab-link to non-existent vocabulary"
-            simple-lint-error
+            throw-simple-lint-error
         ] unless
     ] each ;
 
@@ -127,23 +127,23 @@ SYMBOL: vocab-articles
     [
         "\n\t" intersects? [
             "Paragraph text should not contain \\n or \\t"
-            simple-lint-error
+            throw-simple-lint-error
         ] when
     ] [
         "  " swap subseq? [
             "Paragraph text should not contain double spaces"
-            simple-lint-error
+            throw-simple-lint-error
         ] when
     ] bi ;
 
 : check-whitespace ( str1 str2 -- )
     [ " " tail? ] [ " " head? ] bi* or
-    [ "Missing whitespace between strings" simple-lint-error ] unless ;
+    [ "Missing whitespace between strings" throw-simple-lint-error ] unless ;
 
 : check-bogus-nl ( element -- )
     { { $nl } { { $nl } } } [ head? ] with any? [
         "Simple element should not begin with a paragraph break"
-        simple-lint-error
+        throw-simple-lint-error
     ] when ;
 
 : extract-slots ( elements -- seq )
@@ -158,18 +158,18 @@ SYMBOL: vocab-articles
         ] [ extract-slots ] bi*
         [ swap member? ] with reject [
             ", " join "Described $slot does not exist: " prepend
-            simple-lint-error
+            throw-simple-lint-error
         ] unless-empty
     ] [
         nip empty? not [
             "A word that is not a class has a $class-description"
-            simple-lint-error
+            throw-simple-lint-error
         ] when
     ] if ;
 
 : check-article-title ( article -- )
     article-title first LETTER?
-    [ "Article title must begin with a capital letter" simple-lint-error ] unless ;
+    [ "Article title must begin with a capital letter" throw-simple-lint-error ] unless ;
 
 : check-elements ( element -- )
     {
@@ -184,7 +184,7 @@ SYMBOL: vocab-articles
     swap '[
         _ elements [
             rest { { } { "" } } member?
-            [ "Empty $description" simple-lint-error ] when
+            [ "Empty $description" throw-simple-lint-error ] when
         ] each
     ] each ;
 
index 61b16ab746970726acbd010343fba14948c662d3..799e45f45be1bc1d4e8cfe857eb7495a8e279f3c 100644 (file)
@@ -210,11 +210,11 @@ M: word link-long-text
 ERROR: number-of-arguments found required ;
 
 : check-first ( seq -- first )
-    dup length 1 = [ length 1 number-of-arguments ] unless
+    dup length 1 = [ length 1 throw-number-of-arguments ] unless
     first-unsafe ;
 
 : check-first2 ( seq -- first second )
-    dup length 2 = [ length 2 number-of-arguments ] unless
+    dup length 2 = [ length 2 throw-number-of-arguments ] unless
     first2-unsafe ;
 
 PRIVATE>
index 74c14e1f87acd2667f45292464dd3b4c4a6a7543..505cd6734403a7d7bb39e27eda924f24c47735f3 100644 (file)
@@ -15,7 +15,7 @@ ERROR: article-expects-name-and-title got ;
 SYNTAX: ARTICLE:
     location [
         \ ; parse-until >array
-        dup length 2 < [ article-expects-name-and-title ] when
+        dup length 2 < [ throw-article-expects-name-and-title ] when
         [ first2 ] [ 2 tail ] bi <article>
         over add-article >link
     ] dip remember-definition ;
index 995fcbca5205e52f903e7ac29c3e1e221f0e201c..3f80275fc576952de28a5bec1cf3831592a3b401 100644 (file)
@@ -63,7 +63,7 @@ M: no-article summary
     drop "Help article does not exist" ;
 
 : lookup-article ( name -- article )
-    articles get ?at [ no-article ] unless ;
+    articles get ?at [ throw-no-article ] unless ;
 
 M: object valid-article? articles get key? ;
 M: object article-title lookup-article article-title ;
index b5b41603d263f90e651c3b81648b90034f4a00d5..3e84da82865cb4636c4a3a6fc2e68c231d9bce46 100644 (file)
@@ -70,7 +70,7 @@ M: object specializer-declaration class-of ;
 ERROR: cannot-specialize word specializer ;
 
 : set-specializer ( word specializer -- )
-    over inline-recursive? [ cannot-specialize ] when
+    over inline-recursive? [ throw-cannot-specialize ] when
     "specializer" set-word-prop ;
 
 SYNTAX: HINTS:
index 1c7c73c90f07ce663e7581ed744878f87ce7a2be..5338c6d387444c8358577d800b43d3a3b2ceb5fc 100644 (file)
@@ -75,7 +75,7 @@ SYMBOL: string-context?
 ERROR: tag-not-allowed-here ;
 
 : check-tag ( -- )
-    string-context? get [ tag-not-allowed-here ] when ;
+    string-context? get [ throw-tag-not-allowed-here ] when ;
 
 : compile-tag ( tag -- )
     check-tag
index fd48d81ecdfa12aba967e66fd73ce5b71c3bd41e..f6b890c6933d65b6dacf21f711f81d19c0e75c3d 100644 (file)
@@ -39,10 +39,10 @@ M: no-boilerplate error.
 SYMBOL: title
 
 : set-title ( string -- )
-    title get [ >box ] [ no-boilerplate ] if* ;
+    title get [ >box ] [ throw-no-boilerplate ] if* ;
 
 : get-title ( -- string )
-    title get [ value>> ] [ no-boilerplate ] if* ;
+    title get [ value>> ] [ throw-no-boilerplate ] if* ;
 
 : write-title ( -- )
     get-title write ;
index b1a9daed1f857aad986bd9c7b91db4c98737f47d..902d066b7fc7e52568b264a959f105bbf4acf9c3 100644 (file)
@@ -93,7 +93,7 @@ SYMBOL: redirects
         response "location" header redirect-url
         response code>> 307 = [ "GET" >>method ] unless
         quot (with-http-request)
-    ] [ too-many-redirects ] if ; inline recursive
+    ] [ throw-too-many-redirects ] if ; inline recursive
 
 : read-chunk-size ( -- n )
     read-crlf ";" split1 drop [ blank? ] trim-tail
index 8348c029ff3b316adca3bc76b80e29457eb1ec9e..42804604e98dcc201ca61fb12d5702088e82bedb 100644 (file)
@@ -17,10 +17,10 @@ ERROR: content-length-missing < request-error ;
 ERROR: bad-request-line < request-error parse-error ;
 
 : check-absolute ( url -- )
-    path>> dup "/" head? [ drop ] [ invalid-path ] if ; inline
+    path>> dup "/" head? [ drop ] [ throw-invalid-path ] if ; inline
 
 : parse-request-line-safe ( string -- triple )
-    [ parse-request-line ] [ nip bad-request-line ] recover ;
+    [ parse-request-line ] [ nip throw-bad-request-line ] recover ;
 
 : read-request-line ( request -- request )
     read-?crlf [ dup "" = ] [ drop read-?crlf ] while
@@ -36,7 +36,7 @@ upload-limit [ 200,000,000 ] initialize
 
 : parse-multipart-form-data ( string -- separator )
     ";" split1 nip
-    "=" split1 nip [ no-boundary ] unless* ;
+    "=" split1 nip [ throw-no-boundary ] unless* ;
 
 : maybe-limit-input ( content-length -- )
     unlimited-input upload-limit get [ min ] when* limited-input ;
@@ -49,10 +49,10 @@ upload-limit [ 200,000,000 ] initialize
     "content-length" header [
         dup string>number [
             nip dup 0 upload-limit get between? [
-                invalid-content-length
+                throw-invalid-content-length
             ] unless
-        ] [ invalid-content-length ] if*
-    ] [ content-length-missing ] if* ;
+        ] [ throw-invalid-content-length ] if*
+    ] [ throw-content-length-missing ] if* ;
 
 : parse-content ( request content-type -- post-data )
     dup <post-data> -rot over parse-content-length-safe swap
index 6ed16ba3c3cf09684649d1b7add51ba15de5cf01..de87bf87c9aa3ac097f32e2adb5eb1a113a89a71 100644 (file)
@@ -58,7 +58,7 @@ os windows? [
 ERROR: unsupported-pixel-format component-order ;
 
 : check-pixel-format ( image -- )
-    component-order>> dup BGRA = [ drop ] [ unsupported-pixel-format ] if ;
+    component-order>> dup BGRA = [ drop ] [ throw-unsupported-pixel-format ] if ;
 
 : image>gdi+-bitmap ( image -- bitmap )
     dup check-pixel-format
index 1496ae00ae76a730c44bd17917678232814aabbc..e48a238f80234f1e5785616c092355162a44092e 100644 (file)
@@ -13,7 +13,7 @@ SYMBOL: types
 types [ H{ } clone ] initialize
 
 : (image-class) ( type -- class )
-    >lower types get ?at [ unknown-image-extension ] unless ;
+    >lower types get ?at [ throw-unknown-image-extension ] unless ;
 
 : image-class ( path -- class )
     file-extension (image-class) ;
index a089fa3972ff63491b21d00af2ece8e39e90b104..9412eaf57705690d2fdc6d558b36442fda00f202 100644 (file)
@@ -34,7 +34,7 @@ ALIAS: value third-unsafe
 ERROR: not-an-interval-map obj ;
 
 : check-interval-map ( map -- map )
-    dup interval-map? [ not-an-interval-map ] unless ; inline
+    dup interval-map? [ throw-not-an-interval-map ] unless ; inline
 
 PRIVATE>
 
index 6668a3c9102cc7ecbbc3261a9508964e5be33ade..3ef65ab55eb713283df5ef232fc24c6255152326 100644 (file)
@@ -14,7 +14,7 @@ TUPLE: interval-set { array uint-array read-only } ;
 ERROR: not-an-interval-set obj ;
 
 : check-interval-set ( map -- map )
-    dup interval-set? [ not-an-interval-set ] unless ; inline
+    dup interval-set? [ throw-not-an-interval-set ] unless ; inline
 
 PRIVATE>
 
index 896b0d920a1496544afa7de7166a11aaf7355688..6fcf7a59f120380c889dc65bcb7b7e1a2344e8e5 100644 (file)
@@ -12,7 +12,7 @@ IN: inverse
 ERROR: fail ;
 M: fail summary drop "Matching failed" ;
 
-: assure ( ? -- ) [ fail ] unless ; inline
+: assure ( ? -- ) [ throw-fail ] unless ; inline
 
 : =/fail ( obj1 obj2 -- ) = assure ; inline
 
@@ -32,14 +32,10 @@ M: fail summary drop "Matching failed" ;
     [ dupd "pop-length" set-word-prop ] dip
     "pop-inverse" set-word-prop ;
 
-ERROR: no-inverse word ;
-M: no-inverse summary
-    drop "The word cannot be used in pattern matching" ;
-
 ERROR: bad-math-inverse ;
 
 : next ( revquot -- revquot* first )
-    [ bad-math-inverse ]
+    [ throw-bad-math-inverse ]
     [ unclip-slice ] if-empty ;
 
 : constant-word? ( word -- ? )
@@ -48,7 +44,7 @@ ERROR: bad-math-inverse ;
     [ in>> empty? ] bi and ;
 
 : assure-constant ( constant -- quot )
-    dup word? [ bad-math-inverse ] when 1quotation ;
+    dup word? [ throw-bad-math-inverse ] when 1quotation ;
 
 : swap-inverse ( math-inverse revquot -- revquot* quot )
     next assure-constant rot second '[ @ swap @ ] ;
@@ -173,7 +169,7 @@ ERROR: missing-literal ;
 
 \ ? 2 [
     [ assert-literal ] bi@
-    [ swap [ over = ] dip swap [ 2drop f ] [ = [ t ] [ fail ] if ] if ]
+    [ swap [ over = ] dip swap [ 2drop f ] [ = [ t ] [ throw-fail ] if ] if ]
     2curry
 ] define-pop-inverse
 
@@ -259,7 +255,7 @@ DEFER: __
 
 : empty-inverse ( class -- quot )
     deconstruct-pred
-    [ tuple-slots [ ] any? [ fail ] when ]
+    [ tuple-slots [ ] any? [ throw-fail ] when ]
     compose ;
 
 \ new 1 [ ?wrapped empty-inverse ] define-pop-inverse
index 2468c53e58addad7154f3ee3009e16dc27bcaab4..30a349ec23651493d778904293174c62881e3e38 100755 (executable)
@@ -75,7 +75,7 @@ M: unix wait-for-fd ( handle event -- )
             { +input+ [ add-input-callback ] }
             { +output+ [ add-output-callback ] }
         } case
-        "I/O" suspend [ io-timeout ] when
+        "I/O" suspend [ throw-io-timeout ] when
     ] if ;
 
 : wait-for-port ( port event -- )
@@ -86,7 +86,7 @@ M: unix wait-for-fd ( handle event -- )
 ERROR: not-a-buffered-port port ;
 
 : check-buffered-port ( port -- port )
-    dup buffered-port? [ not-a-buffered-port ] unless ; inline
+    dup buffered-port? [ throw-not-a-buffered-port ] unless ; inline
 
 M: fd refill
     [ check-buffered-port buffer>> ] [ fd>> ] bi*
index e0df575bf0bf124042c40addceabf96cce984d92..80f9f7cd15b3c6d1ca8f5f5affe72622b4ab261f 100644 (file)
@@ -103,13 +103,13 @@ PRIVATE>
 ERROR: file-not-found path bfs? quot ;
 
 : find-file-throws ( path bfs? quot -- path )
-    3dup find-file [ 2nip nip ] [ file-not-found ] if* ; inline
+    3dup find-file [ 2nip nip ] [ throw-file-not-found ] if* ; inline
 
 ERROR: sequence-expected obj ;
 
 : ensure-sequence-of-directories ( obj -- seq )
     dup string? [ 1array ] when
-    dup sequence? [ sequence-expected ] unless ;
+    dup sequence? [ throw-sequence-expected ] unless ;
 
 ! Can't make this generic# on string/sequence because of combinators
 : find-in-directories ( directories bfs? quot -- path'/f )
index 6446dc269f8fb00b4a25c45178ea5883dbc3e3d4..644535dbd5d27f0ef007ddc9b8b5beeea78e7e5c 100644 (file)
@@ -80,8 +80,6 @@ M: linux file-systems
     resolve-symlinks
     parse-mtab [ [ mount-point>> ] keep ] H{ } map>assoc (find-mount-point) ;
 
-ERROR: file-system-not-found ;
-
 M: linux file-system-info ( path -- file-system-info )
     normalize-path
     [
index fc651c366b8480bc9d374a593e670e0a14aea6a2..0f1266c1a9b458eb553eb1b94b01c21c0b68081a 100755 (executable)
@@ -147,7 +147,7 @@ ERROR: not-absolute-path ;
         [ length 2 >= ]
         [ second CHAR: : = ]
         [ first Letter? ]
-    } 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
+    } 1&& [ 2 head "\\" append ] [ throw-not-absolute-path ] if ;
 
 <PRIVATE
 
index 42a5535cca988bb1839f4062e699b56d56baa57d..28b0daed792ee61137ef9fd966b12459c5a54b92 100644 (file)
@@ -26,7 +26,7 @@ ERROR: too-many-symlinks path n ;
 <PRIVATE
 
 : (follow-links) ( n path -- path' )
-    over 0 = [ symlink-depth get too-many-symlinks ] when
+    over 0 = [ symlink-depth get throw-too-many-symlinks ] when
     dup link-info symbolic-link?
     [ [ 1 - ] [ follow-link ] bi* (follow-links) ]
     [ nip ] if ; inline recursive
index a46ef80c4d374bc385acbbd4a64d737b798af15d..21a17b9f8f7eaeee7d59c75025e47ff06034ca8d 100755 (executable)
@@ -108,8 +108,6 @@ M: windows init-io ( -- )
     <master-completion-port> master-completion-port set-global
     H{ } clone pending-overlapped set-global ;
 
-ERROR: invalid-file-size n ;
-
 : (handle>file-size) ( handle -- n/f )
     0 ulonglong <ref> [ GetFileSizeEx ] keep swap
     [ drop f ] [ drop ulonglong deref ] if-zero ;
@@ -124,7 +122,7 @@ ERROR: invalid-file-size n ;
 ERROR: seek-before-start n ;
 
 : set-seek-ptr ( n handle -- )
-    [ dup 0 < [ seek-before-start ] when ] dip ptr<< ;
+    [ dup 0 < [ throw-seek-before-start ] when ] dip ptr<< ;
 
 M: windows tell-handle ( handle -- n ) ptr>> ;
 
index c93309177de20879ef7675860af4c731c09f9628..216085a163f692c2c001b6166cea8f149701fec7 100755 (executable)
@@ -116,7 +116,7 @@ M: process-already-started error.
     process>> . ;
 
 M: process >process
-    dup process-started? [ process-already-started ] when
+    dup process-started? [ throw-process-already-started ] when
     clone ;
 
 M: object >process <process> swap >>command ;
@@ -135,7 +135,7 @@ M: process-was-killed error.
 : (wait-for-process) ( process -- status )
     dup handle>>
     [ self over processes get at push "process" suspend drop ] when
-    dup killed>> [ process-was-killed ] [ status>> ] if ;
+    dup killed>> [ throw process-was-killed ] [ status>> ] if ;
 
 : wait-for-process ( process -- status )
     [ (wait-for-process) ] with-timeout ;
@@ -158,7 +158,7 @@ M: process-failed error.
     ] [ process>> . ] bi ;
 
 : check-success ( process status -- )
-    0 = [ drop ] [ process-failed ] if ;
+    0 = [ drop ] [ throw-process-failed ] if ;
 
 : wait-for-success ( process -- )
     dup wait-for-process check-success ;
@@ -290,7 +290,7 @@ M: output-process-error error.
     [ +closed+ or ] change-stdin
     utf8 (process-reader)
     [ [ stream-contents ] [ dup (wait-for-process) ] bi* ] with-timeout
-    0 = [ 2drop ] [ output-process-error ] if ;
+    0 = [ 2drop ] [ throw-output-process-error ] if ;
 
 <PRIVATE
 
index a2db855881ca86f0caa1078b70e179ebb00e9bc3..49b234904388f926394551cfe50f940fec5b7374 100755 (executable)
@@ -281,4 +281,4 @@ M: windows (run-process) ( process -- handle )
             dup call-CreateProcess
             lpProcessInformation>>
         ] with-destructors
-    ] [ launch-error ] recover ;
+    ] [ throw-launch-error ] recover ;
index 67c245d9565d77264800ff8fc06d2f847fed2dc4..352d0558f457437a92ed8fbe2cc2d19356c9db45 100644 (file)
@@ -16,7 +16,7 @@ HOOK: (mapped-file-r/w) os ( path length -- address handle )
 : prepare-mapped-file ( path quot -- mapped-file path' length )
     [
         [ normalize-path ] [ file-info size>> ] bi
-        [ dup 0 <= [ bad-mmap-size ] [ 2drop ] if ]
+        [ dup 0 <= [ throw-bad-mmap-size ] [ 2drop ] if ]
         [ nip mapped-file new-disposable swap >>length ]
     ] dip 2tri [ >>address ] [ >>handle ] bi* ; inline
 
index 208e023e08348ae5f1df529d46769a4aa680d901..0ff1a1465a57f377638b478533cc340a1dd82407 100644 (file)
@@ -45,7 +45,7 @@ M: input-port stream-read1
 ERROR: not-a-c-ptr object ;
 
 : check-c-ptr ( c-ptr -- c-ptr )
-    dup c-ptr? [ not-a-c-ptr ] unless ; inline
+    dup c-ptr? [ throw-not-a-c-ptr ] unless ; inline
 
 <PRIVATE
 
index ccdd15b2ea4f1b8a60ac5228b36c804d96a77c6b..733298f3757d44bc2477371ffa81e6ef8a74ec10 100755 (executable)
@@ -27,17 +27,17 @@ secure-context ;
 SYMBOL: running-servers
 running-servers [ HS{ } clone ] initialize
 
-ERROR: server-already-running threaded-server ;
-
 ERROR: server-not-running threaded-server ;
 
+ERROR: server-already-running threaded-server ;
+
 <PRIVATE
 
 : must-be-running ( threaded-server -- threaded-server )
-    dup running-servers get in? [ server-not-running ] unless ;
+    dup running-servers get in? [ throw-server-not-running ] unless ;
 
 : must-not-be-running ( threaded-server -- threaded-server )
-    dup running-servers get in? [ server-already-running ] when ;
+    dup running-servers get in? [ throw-server-already-running ] when ;
 
 : add-running-server ( threaded-server -- )
     must-not-be-running
index 137741cc1556ede2dcca0fc69be6f3bfcdbae516..d54a4b65c7cbe121d7d870a297f685eec0e30712 100644 (file)
@@ -29,7 +29,7 @@ TUPLE: openssl-context < secure-context aliens sessions ;
 ERROR: file-expected path ;
 
 : ensure-exists ( path -- path )
-    dup exists? [ file-expected ] unless ; inline
+    dup exists? [ throw-file-expected ] unless ; inline
 
 : ssl-file-path ( path -- path' )
     absolute-path ensure-exists ;
@@ -187,7 +187,10 @@ SYMBOL: default-secure-context
 : syscall-error ( r -- event )
     ERR_get_error [
         {
-            { -1 [ errno ECONNRESET = [ premature-close ] [ throw-errno ] if ] }
+            { -1 [
+                errno ECONNRESET = [ throw-premature-close ]
+                [ throw-errno ] if
+            ] }
             ! OpenSSL docs say this it is an error condition for
             ! a server to not send a close notify, but web
             ! servers in the wild don't seem to do this, for
@@ -283,7 +286,7 @@ M: ssl-handle dispose*
 
 : check-verify-result ( ssl-handle -- )
     SSL_get_verify_result dup X509_V_OK =
-    [ drop ] [ verify-message certificate-verify-error ] if ;
+    [ drop ] [ verify-message throw-certificate-verify-error ] if ;
 
 : x509name>string ( x509name -- string )
     NID_commonName 256 <byte-array>
@@ -312,8 +315,8 @@ M: ssl-handle dispose*
     SSL_get_peer_certificate [
         [ alternative-dns-names ] [ subject-name ] bi suffix
         2dup [ subject-names-match? ] with any?
-        [ 2drop ] [ subject-name-verify-error ] if
-    ] [ certificate-missing-error ] if* ;
+        [ 2drop ] [ throw-subject-name-verify-error ] if
+    ] [ throw-certificate-missing-error ] if* ;
 
 M: openssl check-certificate ( host ssl -- )
     current-secure-context config>> verify>> [
@@ -324,20 +327,20 @@ M: openssl check-certificate ( host ssl -- )
     ] [ 2drop ] if ;
 
 : check-buffer ( port -- port )
-    dup buffer>> buffer-empty? [ upgrade-buffers-full ] unless ;
+    dup buffer>> buffer-empty? [ throw-upgrade-buffers-full ] unless ;
 
 : input/output-ports ( -- input output )
     input-stream output-stream
     [ get underlying-port check-buffer ] bi@
-    2dup [ handle>> ] bi@ eq? [ upgrade-on-non-socket ] unless ;
+    2dup [ handle>> ] bi@ eq? [ throw-upgrade-on-non-socket ] unless ;
 
 : make-input/output-secure ( input output -- )
-    dup handle>> non-ssl-socket? [ upgrade-on-non-socket ] unless
+    dup handle>> non-ssl-socket? [ throw-upgrade-on-non-socket ] unless
     [ <ssl-socket> ] change-handle
     handle>> >>handle drop ;
 
 : (send-secure-handshake) ( output -- )
-    remote-address get [ upgrade-on-non-socket ] unless*
+    remote-address get [ throw-upgrade-on-non-socket ] unless*
     secure-connection ;
 
 M: openssl send-secure-handshake
index ff01ecf037b1f3e852e14509d7e4535387a9ebfd..43220f4f0f527b8f7131bfa1ea2bc8733e7d279a 100644 (file)
@@ -78,12 +78,12 @@ ERROR: bad-ipv4-component string ;
 
 : parse-ipv4 ( string -- seq )
     [ f ] [
-        "." split dup length 4 = [ malformed-ipv4 ] unless
-        [ dup string>number [ ] [ bad-ipv4-component ] ?if ] B{ } map-as
+        "." split dup length 4 = [ throw-malformed-ipv4 ] unless
+        [ dup string>number [ ] [ throw-bad-ipv4-component ] ?if ] B{ } map-as
     ] if-empty ;
 
 : check-ipv4 ( string -- )
-    [ parse-ipv4 drop ] [ invalid-ipv4 ] recover ;
+    [ parse-ipv4 drop ] [ throw-invalid-ipv4 ] recover ;
 
 PRIVATE>
 
@@ -93,7 +93,7 @@ M: ipv4 inet-ntop ( data addrspec -- str )
     drop 4 memory>byte-array [ number>string ] { } map-as "." join ;
 
 M: ipv4 inet-pton ( str addrspec -- data )
-    drop [ parse-ipv4 ] [ invalid-ipv4 ] recover ;
+    drop [ parse-ipv4 ] [ throw-invalid-ipv4 ] recover ;
 
 M: ipv4 address-size drop 4 ;
 
@@ -146,7 +146,7 @@ ERROR: bad-ipv4-embedded-prefix obj ;
 ERROR: more-than-8-components ;
 
 : parse-ipv6-component ( seq -- seq' )
-    [ dup hex> [ nip ] [ bad-ipv6-component ] if* ] { } map-as ;
+    [ dup hex> [ nip ] [ throw-bad-ipv6-component ] if* ] { } map-as ;
 
 : parse-ipv6 ( string -- seq )
     [ f ] [
@@ -159,7 +159,7 @@ ERROR: more-than-8-components ;
     ] if-empty ;
 
 : check-ipv6 ( string -- )
-    [ "::" split1 [ parse-ipv6 ] bi@ 2drop ] [ invalid-ipv6 ] recover ;
+    [ "::" split1 [ parse-ipv6 ] bi@ 2drop ] [ throw-invalid-ipv6 ] recover ;
 
 PRIVATE>
 
@@ -172,7 +172,7 @@ M: ipv6 inet-ntop ( data addrspec -- str )
 
 : pad-ipv6 ( string1 string2 -- seq )
     2dup [ length ] bi@ + 8 swap -
-    dup 0 < [ more-than-8-components ] when
+    dup 0 < [ throw-more-than-8-components ] when
     <byte-array> glue ;
 
 : ipv6-bytes ( seq -- bytes )
@@ -183,7 +183,7 @@ PRIVATE>
 M: ipv6 inet-pton ( str addrspec -- data )
     drop
     [ "::" split1 [ parse-ipv6 ] bi@ pad-ipv6 ipv6-bytes ]
-    [ invalid-ipv6 ]
+    [ throw-invalid-ipv6 ]
     recover ;
 
 M: ipv6 address-size drop 16 ;
@@ -293,7 +293,7 @@ ERROR: invalid-port object ;
     pick class-of byte-array assert= ;
 
 : check-connectionless-port ( port -- port )
-    dup { [ datagram-port? ] [ raw-port? ] } 1|| [ invalid-port ] unless ;
+    dup { [ datagram-port? ] [ raw-port? ] } 1|| [ throw-invalid-port ] unless ;
 
 : check-send ( packet addrspec port -- packet addrspec port )
     check-connectionless-port check-disposed check-port ;
@@ -411,7 +411,7 @@ C: <inet> inet
 M: string resolve-host
     f prepare-addrinfo f void* <ref> [
         getaddrinfo [
-            dup addrinfo-error-string addrinfo-error
+            dup addrinfo-error-string throw-addrinfo-error
         ] unless-zero
     ] keep void* deref addrinfo memory>struct
     [ parse-addrinfo-list ] keep freeaddrinfo ;
@@ -452,7 +452,7 @@ M: invalid-inet-server summary
     drop "Cannot use <server> with <inet>; use <inet4> or <inet6> instead" ;
 
 M: inet (server)
-    invalid-inet-server ;
+    throw-invalid-inet-server ;
 
 ERROR: invalid-local-address addrspec ;
 
@@ -463,7 +463,7 @@ M: invalid-local-address summary
     [
         [ ] [ inet4? ] [ inet6? ] tri or
         [ bind-local-address ]
-        [ invalid-local-address ] if
+        [ throw-invalid-local-address ] if
     ] dip with-variable ; inline
 
 : protocol-port ( protocol -- port )
index ddc5974bdedaf3abd12d121e167817b97701c8eb..118f01e5ccef881e3ad398b951b5119389ef2fb7 100644 (file)
@@ -46,4 +46,4 @@ ERROR: invalid-duplex-stream ;
 M: duplex-stream underlying-handle
     >duplex-stream<
     [ underlying-handle ] bi@
-    [ = [ invalid-duplex-stream ] when ] keep ;
+    [ = [ throw-invalid-duplex-stream ] when ] keep ;
index 1455c8fa8c2812cedaf4e5efa11f35687fd2734b..087281667afc9e2a410121c624b91f24989294d7 100644 (file)
@@ -62,11 +62,11 @@ ERROR: limit-exceeded n stream ;
 
 : check-count-bounds ( n stream -- n stream )
     dup [ count>> ] [ limit>> ] bi >
-    [ limit-exceeded ] when ;
+    [ throw-limit-exceeded ] when ;
 
 : check-current-bounds ( n stream -- n stream )
     dup [ current>> ] [ start>> ] bi <
-    [ limit-exceeded ] when ;
+    [ throw-limit-exceeded ] when ;
 
 : adjust-limited-read ( n stream -- n stream )
     dup start>> [
index 1d53d14d3ae415c721a174a43e0f0c192ba3c414..a7c340e1f181d8f45c0e7f88d7dbdfc2702be4bc 100644 (file)
@@ -17,15 +17,15 @@ M: throws-on-eof-stream dispose stream>> dispose ;
 
 M:: throws-on-eof-stream stream-read1 ( stream -- obj )
     stream stream>> stream-read1
-    [ 1 stream \ read1 stream-exhausted ] unless* ;
+    [ 1 stream \ read1 throw-stream-exhausted ] unless* ;
 
 M:: throws-on-eof-stream stream-read-unsafe ( n buf stream -- count )
     n buf stream stream>> stream-read-unsafe
-    dup n = [ n stream \ stream-read-unsafe stream-exhausted ] unless ;
+    dup n = [ n stream \ stream-read-unsafe throw-stream-exhausted ] unless ;
 
 M:: throws-on-eof-stream stream-read-partial-unsafe ( n buf stream -- count )
     n buf stream stream>> stream-read-partial-unsafe
-    [ n stream \ stream-read-partial-unsafe stream-exhausted ] when-zero ;
+    [ n stream \ stream-read-partial-unsafe throw-stream-exhausted ] when-zero ;
 
 M: throws-on-eof-stream stream-tell
     stream>> stream-tell ;
@@ -41,7 +41,7 @@ M: throws-on-eof-stream stream-length
 
 M: throws-on-eof-stream stream-read-until
     [ stream>> stream-read-until ]
-    [ '[ length _ \ read-until stream-exhausted ] unless* ] bi ;
+    [ '[ length _ \ read-until throw-stream-exhausted ] unless* ] bi ;
 
 : stream-throw-on-eof ( ..a stream quot: ( ..a stream' -- ..b ) -- ..b )
     [ <throws-on-eof-stream> ] dip with-input-stream* ; inline
index 742d8773f568f54452e83a7d136e672b31db649c..4fc83930bac87a2aa7172a466770c8f13daeeb8a 100644 (file)
@@ -22,7 +22,7 @@ ERROR: not-a-json-number string ;
     ] dip ;
 
 : json-expect ( token stream -- )
-    [ dup length ] [ stream-read ] bi* = [ json-error ] unless ; inline
+    [ dup length ] [ stream-read ] bi* = [ throw-json-error ] unless ; inline
 
 DEFER: (read-json-string)
 
@@ -54,7 +54,7 @@ DEFER: (read-json-string)
         { CHAR: t [ CHAR: \t ] }
         { CHAR: u [ over read-json-escape-unicode ] }
         [ ]
-    } case [ suffix! (read-json-string) ] [ json-error ] if* ;
+    } case [ suffix! (read-json-string) ] [ throw-json-error ] if* ;
 
 : (read-json-string) ( stream accum -- accum )
     { sbuf } declare
@@ -72,7 +72,7 @@ DEFER: (read-json-string)
     [ length 1 - ] keep [ nth-unsafe ] [ shorten ] 2bi ; inline
 
 : check-length ( seq n -- seq )
-    [ dup length ] [ >= ] bi* [ json-error ] unless ; inline
+    [ dup length ] [ >= ] bi* [ throw-json-error ] unless ; inline
 
 : v-over-push ( accum -- accum )
     { vector } declare 2 check-length
index 5490070397e0202909bb50bb8d1dadea17981b71..3d1bf3494e527a897c187d40679a10a27c74279a 100644 (file)
@@ -45,7 +45,7 @@ M: object strerror strerror_unsafe ;
 
 ERROR: libc-error errno message ;
 
-: (throw-errno) ( errno -- * ) dup strerror libc-error ;
+: (throw-errno) ( errno -- * ) dup strerror throw-libc-error ;
 
 : throw-errno ( -- * ) errno (throw-errno) ;
 
@@ -72,7 +72,7 @@ M: bad-ptr summary
     drop "Memory allocation failed" ;
 
 : check-ptr ( c-ptr -- c-ptr )
-    [ bad-ptr ] unless* ;
+    [ throw-bad-ptr ] unless* ;
 
 ERROR: realloc-error ptr size ;
 
@@ -100,7 +100,7 @@ PRIVATE>
 
 : realloc ( alien size -- newalien )
     [ >c-ptr ] dip
-    over malloc-exists? [ realloc-error ] unless
+    over malloc-exists? [ throw-realloc-error ] unless
     [ drop ] [ (realloc) check-ptr ] 2bi
     [ delete-malloc ] [ add-malloc ] bi* ;
 
index a95de5ffeae86552f0a48e82b2eaf0c19a53ce1b..1545fc66a02b685f412afe0f46cfef72056687ff 100644 (file)
@@ -6,7 +6,7 @@ locals.errors ;
 IN: locals
 
 SYNTAX: :>
-    in-lambda? get [ :>-outside-lambda-error ] unless
+    in-lambda? get [ throw-:>-outside-lambda-error ] unless
     scan-token parse-def suffix! ;
 
 SYNTAX: [| parse-lambda append! ;
index 3036bcb7cb44f92016b064b64c4c4c2cafd5453b..dfb1d43aef909bcbf5c8b31e063aae6dae80e172 100644 (file)
@@ -14,7 +14,7 @@ SYMBOL: in-lambda?
 ERROR: invalid-local-name name ;
 
 : check-local-name ( name -- name )
-    dup { "]" "]!" } member? [ invalid-local-name ] when ;
+    dup { "]" "]!" } member? [ throw-invalid-local-name ] when ;
 
 : make-local ( name -- word )
     check-local-name "!" ?tail [
@@ -79,7 +79,7 @@ M: lambda-parser parse-quotation ( -- quotation )
 : (parse-locals-definition) ( effect vars assoc reader-quot -- word quot effect )
     with-lambda-scope <lambda>
     [ nip "lambda" set-word-prop ]
-    [ nip rewrite-closures dup length 1 = [ first ] [ bad-rewrite ] if ]
+    [ nip rewrite-closures dup length 1 = [ first ] [ throw-bad-rewrite ] if ]
     [ drop nip ] 3tri ; inline
 
 : parse-locals-definition ( word reader-quot -- word quot effect )
index 283a3bbd5a112ab602d69575759cfe5c9f530a35..b823cd273550ba3af74e8e1941c409bcd4258103 100644 (file)
@@ -10,7 +10,7 @@ IN: locals.rewrite.point-free
 
 : local-index ( args obj -- n )
     2dup '[ unquote _ eq? ] find drop
-    [ 2nip ] [ bad-local ] if* ;
+    [ 2nip ] [ throw-bad-local ] if* ;
 
 : read-local-quot ( args obj -- quot )
     local-index neg [ get-local ] curry ;
index 6689f959e757931b3f792770b1c44d02f892e1ee..11dc896d837a1c9caae6f668baace22e118342fd 100644 (file)
@@ -73,14 +73,14 @@ M: quotation rewrite-element rewrite-sugar* ;
 
 M: lambda rewrite-element rewrite-sugar* ;
 
-M: let rewrite-element let-form-in-literal-error ;
+M: let rewrite-element throw-let-form-in-literal-error ;
 
 M: local rewrite-element , ;
 
 M: local-reader rewrite-element , ;
 
 M: local-writer rewrite-element
-    local-writer-in-literal-error ;
+    throw-local-writer-in-literal-error ;
 
 M: word rewrite-element <wrapper> , ;
 
index 7b2d8205ca4e8b54ec9e4da855f1cd17d20868a2..fe0a8b9255c97cd6d9508f711f10c42aa94c7edd 100644 (file)
@@ -26,7 +26,7 @@ log-level [ DEBUG ] initialize
 ERROR: undefined-log-level ;
 
 : log-level<=> ( log-level log-level -- <=> )
-    [ log-levels at* [ undefined-log-level ] unless ] compare ;
+    [ log-levels at* [ throw-undefined-log-level ] unless ] compare ;
 
 : log? ( log-level -- ? )
     log-level get log-level<=> +lt+ = not ;
@@ -40,7 +40,7 @@ ERROR: bad-log-message-parameters msg word level ;
 
 : check-log-message ( msg word level -- msg word level )
     3dup [ string? ] [ word? ] [ word? ] tri* and and
-    [ bad-log-message-parameters ] unless ; inline
+    [ throw-bad-log-message-parameters ] unless ; inline
 
 : log-message ( msg word level -- )
     check-log-message
index 489fa83a38845e97b72d76bbeef53e0d5626b7f6..b5735b834f885f607815375d48fa4843cae9acae 100644 (file)
@@ -51,7 +51,7 @@ M: no-match-cond summary drop "Fall-through in match-cond" ;
 
 MACRO: match-cond ( assoc -- quot )
     <reversed>
-    dup ?first callable? [ unclip ] [ [ no-match-cond ] ] if
+    dup ?first callable? [ unclip ] [ [ throw-no-match-cond ] ] if
     [
         first2
         [ [ dupd match ] curry ] dip
index 658d3586e005c9b7cb20e33c2e21ad4b2aac8912..8fd652b8d9ba96a834ec2d8d9eb2d5174aad96ac 100644 (file)
@@ -29,7 +29,7 @@ IN: math.bitwise
 
 ERROR: bit-range-error x high low ;
 : bit-range ( x high low -- y )
-    2dup { [ nip 0 < ] [ < ] } 2|| [ bit-range-error ] when
+    2dup { [ nip 0 < ] [ < ] } 2|| [ throw-bit-range-error ] when
     [ nip neg shift ] [ - 1 + ] 2bi bits ; inline
 
 : bitroll ( x s w -- y )
index f57523dd02137214f7e72b79b317bb5737c0058a..0de7db33a0ff8ca13c8fcfb15f38b2f01ab4fcd2 100644 (file)
@@ -38,7 +38,7 @@ IN: syntax
 ERROR: malformed-complex obj ;
 
 : parse-complex ( seq -- complex )
-    dup length 2 = [ first2-unsafe rect> ] [ malformed-complex ] if ;
+    dup length 2 = [ first2-unsafe rect> ] [ throw-malformed-complex ] if ;
 
 SYNTAX: C{ \ } [ parse-complex ] parse-literal ;
 
index 22e07db9844cb13a90636e87696d691e9133b2c4..b0fd43deb3f3e4a77626b5772ce4c53dc21b2baf 100644 (file)
@@ -116,7 +116,7 @@ ERROR: non-trivial-divisor n ;
 : mod-inv ( x n -- y )
     [ nip ] [ gcd 1 = ] 2bi
     [ dup 0 < [ + ] [ nip ] if ]
-    [ non-trivial-divisor ] if ; foldable
+    [ throw-non-trivial-divisor ] if ; foldable
 
 : ^mod ( x y n -- z )
     over 0 <
index d1894108c083b9742d7a348452e1bfe40d9a1c57..a41d803410a9aa57118300eaf26fd880102e6e0b 100644 (file)
@@ -174,7 +174,7 @@ ERROR: negative-power-matrix m n ;
     [ [ dupd m. ] when [ dup m. ] dip ] reduce nip ;
 
 : m^n ( m n -- n )
-    dup 0 >= [ (m^n) ] [ negative-power-matrix ] if ;
+    dup 0 >= [ (m^n) ] [ throw-negative-power-matrix ] if ;
 
 : stitch ( m -- m' )
     [ ] [ [ append ] 2map ] map-reduce ;
index 078908604489f7dac4206b5158c312c60d22e2ab..339ef5fb507d393ad7efa025b089f96e69750778 100644 (file)
@@ -19,7 +19,7 @@ ERROR: bad-integer-op word ;
 
 M: word integer-op-input-classes
     dup "input-classes" word-prop
-    [ ] [ bad-integer-op ] ?if ;
+    [ ] [ throw-bad-integer-op ] ?if ;
 
 : generic-variant ( op -- generic-op/f )
     dup "derived-from" word-prop [ first ] [ ] ?if ;
index b2ce6945f2e71aa14aad830885587ae2d41460e5..2c4bb9ed8ffe6d29d9b493ee1b4278ffd151f7d6 100644 (file)
@@ -46,7 +46,7 @@ ERROR: negative-power-polynomial p n ;
     make-bits { 1 } [ [ over p* ] when [ p-sq ] dip ] reduce nip ;
 
 : p^ ( p n -- p^n )
-    dup 0 >= [ (p^) ] [ negative-power-polynomial ] if ;
+    dup 0 >= [ (p^) ] [ throw-negative-power-polynomial ] if ;
 
 <PRIVATE
 
index a8bf097dbed4082546fa4d60bf7f627ef21cbdd8..adb4364d34c6f5c48bf7c06672d7c99299211a70 100644 (file)
@@ -14,7 +14,7 @@ ERROR: invalid-lucas-lehmer-candidate obj ;
 
 : lucas-lehmer-guard ( obj -- obj )
     dup { [ integer? ] [ 0 > ] } 1&&
-    [ invalid-lucas-lehmer-candidate ] unless ;
+    [ throw-invalid-lucas-lehmer-candidate ] unless ;
 
 PRIVATE>
 
index 8ed1675ca7f3185649ced3abbc6a3619087039ab..1e9e0691c319cb0acd84634e411a68826faee297 100644 (file)
@@ -88,7 +88,7 @@ PRIVATE>
 ERROR: no-relative-prime n ;
 
 : find-relative-prime* ( n guess -- p )
-    [ dup 1 <= [ no-relative-prime ] when ]
+    [ dup 1 <= [ throw-no-relative-prime ] when ]
     [ >odd dup 1 <= [ drop 3 ] when ] bi*
     [ 2dup coprime? ] [ 2 + ] until nip ;
 
@@ -98,6 +98,6 @@ ERROR: no-relative-prime n ;
 ERROR: too-few-primes n numbits ;
 
 : unique-primes ( n numbits -- seq )
-    2dup 2^ estimated-primes > [ too-few-primes ] when
+    2dup 2^ estimated-primes > [ throw-too-few-primes ] when
     2dup [ random-prime ] curry replicate
     dup all-unique? [ 2nip ] [ drop unique-primes ] if ;
index 85416f294ee27a04fc62222f53e513d75a53ae15..42109be718c0389e5b671a2d2a2defbfd3277210 100644 (file)
@@ -21,7 +21,7 @@ MACRO:: test-vconvert ( from-type to-type -- quot )
         inputs narray
         [ quot with-datastack ]
         [ [ [ declaration declare quot call ] compile-call ] with-datastack ] bi
-        2dup = [ optimized-vconvert-inconsistent ] unless
+        2dup = [ throw-optimized-vconvert-inconsistent ] unless
         drop outputs firstn
     ] ;
 
index 3c884710769cf7d300fc970d17fd9479c56cb531..47a9acd702accfe97824f778d56560132feeef2c 100644 (file)
@@ -18,7 +18,7 @@ ERROR: bad-vconvert-input value expected-type ;
     { uchar ushort uint ulonglong } member-eq? ;
 
 : check-vconvert-type ( value expected-type -- value )
-    2dup instance? [ drop ] [ bad-vconvert-input ] if ; inline
+    2dup instance? [ drop ] [ throw-bad-vconvert-input ] if ; inline
 
 :: [vconvert] ( from-element to-element from-size to-size from-type to-type -- quot )
     {
@@ -46,7 +46,7 @@ ERROR: bad-vconvert-input value expected-type ;
         [ steps 1 = not ]
         [ from-element to-element [ float-type? ] bi@ xor ]
         [ from-element unsigned-type? to-element unsigned-type? not and ]
-    } 0|| [ from-type to-type bad-vconvert ] when ;
+    } 0|| [ from-type to-type throw-bad-vconvert ] when ;
 
 :: ([vpack-unsigned]) ( from-type to-type -- quot )
     from-type new simd-rep
@@ -75,7 +75,7 @@ ERROR: bad-vconvert-input value expected-type ;
         [ steps 1 = not ]
         [ from-element to-element [ float-type? ] bi@ xor ]
         [ from-element unsigned-type? not to-element unsigned-type? and ]
-    } 0|| [ from-type to-type bad-vconvert ] when ;
+    } 0|| [ from-type to-type throw-bad-vconvert ] when ;
 
 :: ([vunpack]) ( from-type to-type -- quot )
     from-type new simd-rep
@@ -98,7 +98,7 @@ MACRO:: vconvert ( from-type to-type -- quot )
     from-element heap-size :> from-size
     to-element   heap-size :> to-size
 
-    from-length to-length = [ from-type to-type bad-vconvert ] unless
+    from-length to-length = [ from-type to-type throw-bad-vconvert ] unless
 
     from-element to-element from-size to-size from-type to-type {
         { [ from-size to-size < ] [ [vunpack] ] }
index 1714cfb0c8623a9c1d8bbc03f9fd6c22a76411f3..90ccfcaf09d8df032ed1ae5cadf9735828d45de6 100644 (file)
@@ -9,7 +9,6 @@ QUALIFIED-WITH: alien.c-types c
 IN: math.vectors.simd
 
 ERROR: bad-simd-length got expected ;
-
 ERROR: bad-simd-vector obj ;
 
 <<
@@ -139,7 +138,7 @@ M: simd-128 byte-length drop 16 ; inline
 M: simd-128 new-sequence
     2dup length =
     [ nip [ 16 (byte-array) ] make-underlying ]
-    [ length bad-simd-length ] if ; inline
+    [ length throw-bad-simd-length ] if ; inline
 
 M: simd-128 equal?
     dup simd-rep [ drop v= vall? ] [ 3drop f ] if-both-vectors-match ; inline
@@ -322,7 +321,7 @@ c:<c-type>
     A >>boxed-class
     { A-rep alien-vector A boa } >quotation >>getter
     {
-        [ dup simd-128? [ bad-simd-vector ] unless underlying>> ] 2dip
+        [ dup simd-128? [ throw-bad-simd-vector ] unless underlying>> ] 2dip
         A-rep set-alien-vector
     } >quotation >>setter
     16 >>size
index d2797f1a6f8356bc68d44ed66a42fb83f56fbaa0..20082a35c0a3322e26b1e9231b5a4d35a9106fb3 100644 (file)
@@ -29,16 +29,12 @@ C: <mime-variable> mime-variable
         swap >>mime-separator
         H{ } clone >>mime-parts ;
 
-ERROR: bad-header bytes ;
-
 : mime-write ( sequence -- )
     >byte-array write ;
 
 : parse-headers ( string -- hashtable )
     string-lines harvest [ parse-header-line ] map >hashtable ;
 
-ERROR: end-of-stream multipart ;
-
 : fill-bytes ( multipart -- multipart )
     buffer-size read
     [ '[ _ B{ } append-as ] change-bytes ]
@@ -120,7 +116,7 @@ ERROR: unknown-content-disposition multipart ;
             [ dup mime-separator>> dump-string >>name-content ] dip
             >>name dup save-mime-part
         ] [
-             unknown-content-disposition
+             throw-unknown-content-disposition
         ] if*
     ] if* ;
 
@@ -132,7 +128,7 @@ ERROR: no-content-disposition multipart ;
             parse-content-disposition-form-data >>content-disposition
             parse-form-data
         ] }
-        [ no-content-disposition ]
+        [ throw-no-content-disposition ]
     } case ;
 
 : read-assert-sequence= ( sequence -- )
index 00c6232e76bcadde28173dbfe2d8319ba190baad..9562f0b40686f5b5c18aa0f9d92539509d026eea 100644 (file)
@@ -21,8 +21,8 @@ ERROR: read-only-slot slot ;
 
 : check-set-slot ( val slot -- val offset )
     {
-        { [ dup not ] [ no-such-slot ] }
-        { [ dup read-only>> ] [ read-only-slot ] }
+        { [ dup not ] [ throw-no-such-slot ] }
+        { [ dup read-only>> ] [ throw-read-only-slot ] }
         { [ 2dup class>> instance? not ] [ class>> bad-slot-value ] }
         [ offset>> ]
     } cond ; inline
index 1c2c1d462dfac8ba3a856db332fa941c76dcb9db..a374290ad7e8bb8904dfd99436b1230ba1b63847 100644 (file)
@@ -28,7 +28,7 @@ ERROR: text-found-before-eol string ;
 : parse-here ( -- str )
     [
         lexer get
-        dup rest-of-line [ text-found-before-eol ] unless-empty
+        dup rest-of-line [ throw-text-found-before-eol ] unless-empty
         (parse-here)
     ] "" make but-last ;
 
@@ -71,7 +71,7 @@ SYNTAX: STRING:
             begin-text lexer (parse-til-line-begins)
         ] if
     ] [
-        begin-text bad-heredoc
+        begin-text throw-bad-heredoc
     ] if ;
 
 : parse-til-line-begins ( begin-text lexer -- seq )
index d519d4f5bc975ea1f3b35a53ecef64b79c391ea2..0a9e4cd7b00855c1387b583559312f1448dc0ffa 100644 (file)
@@ -33,7 +33,7 @@ PRIVATE>
 ERROR: bad-array-length n ;
 
 : <nibble-array> ( n -- nibble-array )
-    dup 0 < [ bad-array-length ] when
+    dup 0 < [ throw-bad-array-length ] when
     dup nibbles>bytes <byte-array> nibble-array boa ; inline
 
 M: nibble-array length length>> ;
index 15d225bd04dfbbeef582fafe6abeb4a2becb8aca..5d6ea92ff5233b9ce82d842b343064be5270d611 100644 (file)
@@ -8,7 +8,7 @@ ERROR: unknown-gl-platform ;
     { [ os windows? ] [ "opengl.gl.windows" ] }
     { [ os macosx? ]  [ "opengl.gl.macosx" ] }
     { [ os unix? ] [ "opengl.gl.gtk" ] }
-    [ unknown-gl-platform ]
+    [ throw-unknown-gl-platform ]
 } cond use-vocab >>
 
 SYMBOL: +gl-function-counter+
index f44b1fa22b1183bb95cde2e0691791dd9dcb968d..d94f7e4f02fc367dc0addd2150d920db03975c8e 100644 (file)
@@ -148,7 +148,7 @@ M: XBGR fix-internal-component-order drop RGBA ;
 : image-internal-format ( component-order component-type -- internal-format )
     2dup
     [ fix-internal-component-order ] dip 2array image-internal-formats at
-    [ 2nip ] [ unsupported-component-order ] if* ;
+    [ 2nip ] [ throw-unsupported-component-order ] if* ;
 
 : reversed-type? ( component-type -- ? )
     { u-9-9-9-e5-components float-11-11-10-components } member? ;
@@ -167,7 +167,7 @@ M: XBGR fix-internal-component-order drop RGBA ;
             { RGBA [ drop GL_RGBA_INTEGER ] }
             { BGRX [ drop GL_BGRA_INTEGER ] }
             { RGBX [ drop GL_RGBA_INTEGER ] }
-            [ swap unsupported-component-order ]
+            [ swap throw-unsupported-component-order ]
         } case
     ] [
         swap {
@@ -189,22 +189,22 @@ M: XBGR fix-internal-component-order drop RGBA ;
             { INTENSITY [ drop GL_INTENSITY ] }
             { DEPTH [ drop GL_DEPTH_COMPONENT ] }
             { DEPTH-STENCIL [ drop GL_DEPTH_STENCIL ] }
-            [ swap unsupported-component-order ]
+            [ swap throw-unsupported-component-order ]
         } case
     ] if ;
 
 GENERIC: (component-type>type) ( component-order component-type -- gl-type )
 
-M: object (component-type>type) unsupported-component-order ;
+M: object (component-type>type) throw-unsupported-component-order ;
 
 : four-channel-alpha-first? ( component-order component-type -- ? )
     over component-count 4 =
     [ drop alpha-channel-precedes-colors? ]
-    [ unsupported-component-order ] if ;
+    [ throw-unsupported-component-order ] if ;
 
 : not-alpha-first ( component-order component-type -- )
     over alpha-channel-precedes-colors?
-    [ unsupported-component-order ]
+    [ throw-unsupported-component-order ]
     [ 2drop ] if ;
 
 M: ubyte-components          (component-type>type)
@@ -237,19 +237,23 @@ M: u-10-10-10-2-components   (component-type>type)
 
 M: u-24-components           (component-type>type)
     over DEPTH =
-    [ 2drop GL_UNSIGNED_INT ] [ unsupported-component-order ] if ;
+    [ 2drop GL_UNSIGNED_INT ]
+    [ throw-unsupported-component-order ] if ;
 
 M: u-24-8-components         (component-type>type)
     over DEPTH-STENCIL =
-    [ 2drop GL_UNSIGNED_INT_24_8 ] [ unsupported-component-order ] if ;
+    [ 2drop GL_UNSIGNED_INT_24_8 ]
+    [ throw-unsupported-component-order ] if ;
 
 M: u-9-9-9-e5-components     (component-type>type)
     over BGR =
-    [ 2drop GL_UNSIGNED_INT_5_9_9_9_REV ] [ unsupported-component-order ] if ;
+    [ 2drop GL_UNSIGNED_INT_5_9_9_9_REV ]
+    [ throw-unsupported-component-order ] if ;
 
 M: float-11-11-10-components (component-type>type)
     over BGR =
-    [ 2drop GL_UNSIGNED_INT_10F_11F_11F_REV ] [ unsupported-component-order ] if ;
+    [ 2drop GL_UNSIGNED_INT_10F_11F_11F_REV ]
+    [ throw-unsupported-component-order ] if ;
 
 : image-data-format ( component-order component-type -- gl-format gl-type )
     [ (component-order>format) ] [ (component-type>type) ] 2bi ;
index 8fe0e9f8a9a1efab7120850a0bd813e227ca8f7d..25ab4386d8ddc3077ee4bb2965058f60dd8cae9e 100644 (file)
@@ -142,7 +142,7 @@ ERROR: packed-read-fail str bytes ;
 
 : read-packed-bytes ( str -- bytes )
     dup packed-length [ read dup length ] keep =
-    [ nip ] [ packed-read-fail ] if ; inline
+    [ nip ] [ throw-packed-read-fail ] if ; inline
 
 PRIVATE>
 
index 49ad57ac1bd38e560690186d8c20367ad9b9863d..d5ff45c206c432bb9fd8201162a956358b5e4364 100644 (file)
@@ -18,7 +18,7 @@ ERROR: no-rule rule parser ;
 <PRIVATE
 
 : lookup-rule ( rule parser -- rule' )
-        2dup rule [ 2nip ] [ no-rule ] if* ;
+        2dup rule [ 2nip ] [ throw-no-rule ] if* ;
 
 TUPLE: tokenizer-tuple any one many ;
 
@@ -48,7 +48,7 @@ M: no-tokenizer summary
     drop "Tokenizer not found" ;
 
 SYNTAX: TOKENIZER:
-    scan-word-name dup search [ nip ] [ no-tokenizer ] if*
+    scan-word-name dup search [ nip ] [ throw-no-tokenizer ] if*
     execute( -- tokenizer ) \ tokenizer set-global ;
 
 TUPLE: ebnf-non-terminal symbol ;
@@ -395,7 +395,7 @@ M: redefined-rule summary
 M: ebnf-rule (transform) ( ast -- parser )
     dup elements>>
     (transform) [
-        swap symbol>> dup get parser? [ redefined-rule ] [ set ] if
+        swap symbol>> dup get parser? [ throw-redefined-rule ] [ set ] if
     ] keep ;
 
 M: ebnf-sequence (transform) ( ast -- parser )
index f08f0359f9716acf9005b86db76c8ca9a666d60c..5294f82038d44955a141836ccf42034a03a206f3 100644 (file)
@@ -618,7 +618,7 @@ SYNTAX: PEG:
             def call compile :> compiled-def
             [
               dup compiled-def compiled-parse
-              [ ast>> ] [ word parse-failed ] ?if
+              [ ast>> ] [ word throw-parse-failed ] ?if
             ]
             word swap effect define-declared
           ] with-compilation-unit
index 862eed1aa906268323f9ffae4aadaf6babdec9c8..bf2e93fa7142debbbd27137412ada74562fe1f5e 100644 (file)
@@ -161,7 +161,7 @@ PRIVATE>
 
 M: persistent-vector ppop ( pvec -- pvec' )
     dup count>> {
-        { 0 [ empty-error ] }
+        { 0 [ throw-empty-error ] }
         { 1 [ drop T{ persistent-vector } ] }
         [
             [
index 2584412bcd06ed799e073f7857d22b881a34e2f5..5bbf18649417899bf5006ed472e18b7a87d74cbe 100644 (file)
@@ -35,9 +35,9 @@ ERROR: no-random-number-generator ;
 M: no-random-number-generator summary
     drop "Random number generator is not defined." ;
 
-M: f random-bytes* ( n obj -- * ) no-random-number-generator ;
+M: f random-bytes* ( n obj -- * ) throw-no-random-number-generator ;
 
-M: f random-32* ( obj -- * ) no-random-number-generator ;
+M: f random-32* ( obj -- * ) throw-no-random-number-generator ;
 
 : random-32 ( -- n )
     random-generator get random-32* ;
@@ -127,7 +127,7 @@ M: hash-set random
 ERROR: too-many-samples seq n ;
 
 : sample ( seq n -- seq' )
-    2dup [ length ] dip < [ too-many-samples ] when
+    2dup [ length ] dip < [ throw-too-many-samples ] when
     [ [ length iota >array ] dip [ randomize-n-last ] keep tail-slice* ]
     [ drop ] 2bi nths-unsafe ;
 
index bda828a7b57cef96b29f75783621e2a94659f18c..3b20527f5f388e46d5812ef6970678d82e8dc4ab 100755 (executable)
@@ -31,7 +31,10 @@ ERROR: acquire-crypto-context-failed provider type error ;
 
 : attempt-crypto-context ( provider type -- handle )
     [ acquire-crypto-context ]
-    [ drop [ create-crypto-context ] [ acquire-crypto-context-failed ] recover ] recover ;
+    [
+        drop [ create-crypto-context ]
+        [ throw-acquire-crypto-context-failed ] recover
+    ] recover ;
 
 : initialize-crypto-context ( crypto-context -- crypto-context )
     dup [ provider>> ] [ type>> ] bi attempt-crypto-context >>handle ;
index 01cff989018f80ce0580acc25dba5127adf67f4a..fb9336c4044cfbc46891bfe96f97286c11d486fc 100644 (file)
@@ -13,7 +13,7 @@ IN: regexp.parser
 ERROR: bad-number ;
 
 : ensure-number ( n -- n )
-    [ bad-number ] unless* ;
+    [ throw-bad-number ] unless* ;
 
 :: at-error ( key assoc quot: ( key -- replacement ) -- value )
     key assoc at* [ drop key quot call ] unless ; inline
@@ -45,13 +45,13 @@ MEMO: simple-category-table ( -- table )
         { [ "script=" ?head ] [
             dup simple-script-table at
             [ <script-class> ]
-            [ "script=" prepend bad-class ] ?if
+            [ "script=" prepend throw-bad-class ] ?if
         ] }
-        [ bad-class ]
+        [ throw-bad-class ]
     } cond ;
 
 : unicode-class ( name -- class )
-    dup parse-unicode-class [ ] [ bad-class ] ?if ;
+    dup parse-unicode-class [ ] [ throw-bad-class ] ?if ;
 
 : name>class ( name -- class )
     >string simple {
@@ -106,7 +106,7 @@ MEMO: simple-category-table ( -- table )
 ERROR: nonexistent-option name ;
 
 : ch>option ( ch -- singleton )
-    dup options-assoc at [ ] [ nonexistent-option ] ?if ;
+    dup options-assoc at [ ] [ throw-nonexistent-option ] ?if ;
 
 : option>ch ( option -- string )
     options-assoc value-at ;
@@ -198,7 +198,7 @@ Number = (!(","|"}").)* => [[ string>number ensure-number ]]
 Times = "," Number:n "}" => [[ 0 n <from-to> ]]
       | Number:n ",}" => [[ n <at-least> ]]
       | Number:n "}" => [[ n n <from-to> ]]
-      | "}" => [[ bad-number ]]
+      | "}" => [[ throw-bad-number ]]
       | Number:n "," Number:m "}" => [[ n m <from-to> ]]
 
 Repeated = Element:e "{" Times:t => [[ e t <times> ]]
index 346226bf4e7cb5659e873b66cdc77ece722f4f2d..a5791d7ac7ce54cc8f2498835f98bbd683bd592f 100644 (file)
@@ -18,7 +18,7 @@ CONSTANT: roman-values
 ERROR: roman-range-error n ;
 
 : roman-range-check ( n -- n )
-    dup 1 10000 between? [ roman-range-error ] unless ;
+    dup 1 10000 between? [ throw-roman-range-error ] unless ;
 
 : roman-digit-index ( ch -- n )
     1string roman-digits index ; inline
index ad28dde00dd0715fd98169dfa271a706e54f2e94..4d83294dd0f2b1812b5a2ec8d9e64e058986a48e 100644 (file)
@@ -34,11 +34,11 @@ ERROR: unrolled-2bounds-error
 
 <PRIVATE
 : unrolled-bounds-check ( seq len quot -- seq len quot )
-    2over swap length > [ 2over unrolled-bounds-error ] when ; inline
+    2over swap length > [ 2over throw-unrolled-bounds-error ] when ; inline
 
 :: unrolled-2bounds-check ( xseq yseq len quot -- xseq yseq len quot )
     { [ len xseq length > ] [ len yseq length > ] } 0||
-    [ xseq yseq len unrolled-2bounds-error ]
+    [ xseq yseq len throw-unrolled-2bounds-error ]
     [ xseq yseq len quot ] if ; inline
 
 : (unrolled-each) ( seq len quot -- len quot )
index 48ea2c181443c315d3bf9dfe82794f1581a7bef6..47429b823d8a06f71de463c3b5c6ce23a6c50058 100644 (file)
@@ -69,7 +69,7 @@ ERROR: bad-email-address email ;
 : validate-address ( string -- string' )
     #! Make sure we send funky stuff to the server by accident.
     dup "\r\n>" intersects?
-    [ bad-email-address ] when ;
+    [ throw-bad-email-address ] when ;
 
 : mail-from ( fromaddr -- )
     validate-address
@@ -130,17 +130,17 @@ ERROR: smtp-transaction-failed < smtp-error ;
 : check-response ( response -- )
     dup code>> {
         { [ dup { 220 235 250 221 354 } member? ] [ 2drop ] }
-        { [ dup 400 499 between? ] [ drop smtp-server-busy ] }
-        { [ dup 500 = ] [ drop smtp-syntax-error ] }
-        { [ dup 501 = ] [ drop smtp-command-not-implemented ] }
-        { [ dup 500 509 between? ] [ drop smtp-syntax-error ] }
-        { [ dup 530 539 between? ] [ drop smtp-bad-authentication ] }
-        { [ dup 550 = ] [ drop smtp-mailbox-unavailable ] }
-        { [ dup 551 = ] [ drop smtp-user-not-local ] }
-        { [ dup 552 = ] [ drop smtp-exceeded-storage-allocation ] }
-        { [ dup 553 = ] [ drop smtp-bad-mailbox-name ] }
-        { [ dup 554 = ] [ drop smtp-transaction-failed ] }
-        [ drop smtp-error ]
+        { [ dup 400 499 between? ] [ drop throw-smtp-server-busy ] }
+        { [ dup 500 = ] [ drop throw-smtp-syntax-error ] }
+        { [ dup 501 = ] [ drop throw-smtp-command-not-implemented ] }
+        { [ dup 500 509 between? ] [ drop throw-smtp-syntax-error ] }
+        { [ dup 530 539 between? ] [ drop throw-smtp-bad-authentication ] }
+        { [ dup 550 = ] [ drop throw-smtp-mailbox-unavailable ] }
+        { [ dup 551 = ] [ drop throw-smtp-user-not-local ] }
+        { [ dup 552 = ] [ drop throw-smtp-exceeded-storage-allocation ] }
+        { [ dup 553 = ] [ drop throw-smtp-bad-mailbox-name ] }
+        { [ dup 554 = ] [ drop throw-smtp-transaction-failed ] }
+        [ drop throw-smtp-error ]
     } cond ;
 
 : get-ok ( -- ) receive-response check-response ;
@@ -168,7 +168,7 @@ ERROR: invalid-header-string string ;
 
 : validate-header ( string -- string' )
     dup "\r\n" intersects?
-    [ invalid-header-string ] when ;
+    [ throw-invalid-header-string ] when ;
 
 : write-header ( key value -- )
     [ validate-header write ]
index 7976a5c14865f8b062383393de22f7d97e1642de..5e593c4fab1f52fe5299a75b970604389f00e8b7 100644 (file)
@@ -136,35 +136,35 @@ ERROR: specialized-array-vocab-not-loaded c-type ;
 M: c-type-word c-array-constructor
     underlying-type
     dup [ name>> "<" "-array>" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ throw-specialized-array-vocab-not-loaded ] ?if ; foldable
 
 M: pointer c-array-constructor drop void* c-array-constructor ;
 
 M: c-type-word c-(array)-constructor
     underlying-type
     dup [ name>> "(" "-array)" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ throw-specialized-array-vocab-not-loaded ] ?if ; foldable
 
 M: pointer c-(array)-constructor drop void* c-(array)-constructor ;
 
 M: c-type-word c-direct-array-constructor
     underlying-type
     dup [ name>> "<direct-" "-array>" surround ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ throw-specialized-array-vocab-not-loaded ] ?if ; foldable
 
 M: pointer c-direct-array-constructor drop void* c-direct-array-constructor ;
 
 M: c-type-word c-array-type
     underlying-type
     dup [ name>> "-array" append ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ throw-specialized-array-vocab-not-loaded ] ?if ; foldable
 
 M: pointer c-array-type drop void* c-array-type ;
 
 M: c-type-word c-array-type?
     underlying-type
     dup [ name>> "-array?" append ] [ specialized-array-vocab ] bi lookup-word
-    [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable
+    [ ] [ throw-specialized-array-vocab-not-loaded ] ?if ; foldable
 
 M: pointer c-array-type? drop void* c-array-type? ;
 
index 5426b773b24ff0c12e305e15d3f5fbea08e02063..8f97d38f92c2ac818c2d596269a21accfe11e916 100644 (file)
@@ -297,7 +297,7 @@ DEFER: an-inline-word
 ERROR: custom-error ;
 
 { T{ effect f { } { } t } } [
-    [ custom-error ] infer
+    [ throw-custom-error ] infer
 ] unit-test
 
 : funny-throw ( a -- * ) throw ; inline
@@ -307,7 +307,7 @@ ERROR: custom-error ;
 ] unit-test
 
 { T{ effect f { } { } t } } [
-    [ custom-error inference-error ] infer
+    [ throw-custom-error inference-error ] infer
 ] unit-test
 
 { T{ effect f { "x" } { "x" "x" } t } } [
index dd71e63ffb428622ed65684306d8f6ce1f56e8da..7fd3bd6b14b85e8e9f77a38cfb7c161d60fc6563 100644 (file)
@@ -33,7 +33,7 @@ PREDICATE: annotated < word "unannotated-def" word-prop >boolean ;
 <PRIVATE
 
 : check-annotate-twice ( word -- word )
-    dup annotated? [ cannot-annotate-twice ] when ;
+    dup annotated? [ throw-cannot-annotate-twice ] when ;
 
 : annotate-generic ( word quot -- )
     [ "methods" word-prop values ] dip each ; inline
index 0e3c5cbb8426f27f5418f4e7aae6f7d8cb291a21..1ff38107af44ab51faffbd38d936a8635fbc743b 100644 (file)
@@ -24,13 +24,13 @@ ERROR: invalid-stream-read-unsafe-return out-len in-len buf port word ;
 :: check-stream-read-unsafe-before ( n buf stream word -- n buf stream )
     buf alien? [ n buf port ] [
         n buf byte-length >
-        [ n buf stream word invalid-stream-read-unsafe ]
+        [ n buf stream word throw-invalid-stream-read-unsafe ]
         [ n buf stream ] if
     ] if ; inline
 
 :: check-stream-read-unsafe-after ( count n buf stream word -- count )
     count n >
-    [ count n buf stream word invalid-stream-read-unsafe-return ]
+    [ count n buf stream word throw-invalid-stream-read-unsafe-return ]
     [ count ] if ;
 
 : (assert-stream-read-unsafe) ( word -- )
index 1523cd5f9838ad3c435110e6d62e02c623b4b3dd..8d830e6ba4b1fe4ebb174b7866bdc3beee1140cc 100644 (file)
@@ -25,7 +25,7 @@ ERROR: can't-deploy-library-file library ;
 : copy-library ( dir library -- )
     dup find-library-file
     [ swap over file-name append-path copy-file ]
-    [ can't-deploy-library-file ] ?if ;
+    [ throw-can't-deploy-library-file ] ?if ;
 
 : copy-libraries ( manifest name dir -- )
     append-path swap libraries>> [ copy-library ] with each ;
index 195a3db97631d000ffd60898362b3353ef99e664..7b402ab436a743c5367958d7cae3ab8ed8667a89 100644 (file)
@@ -2,4 +2,4 @@ IN: specialized-arrays
 
 ERROR: cannot-define-array-in-deployed-app type ;
 
-: define-array-vocab ( type -- ) cannot-define-array-in-deployed-app ;
+: define-array-vocab ( type -- ) throw-cannot-define-array-in-deployed-app ;
index 05e16ca10f1581fc31e132731eeca937dd785de9..367aa21fff3c4653fac12018ee53ceee85fc30d2 100644 (file)
@@ -23,7 +23,7 @@ ERROR: image-too-big actual-size max-size ;
         cpu ppc? [ 100000 + ] when
         os windows? [ 160000 + ] when
     ] bi*
-    2dup <= [ 2drop ] [ image-too-big ] if ;
+    2dup <= [ 2drop ] [ throw-image-too-big ] if ;
 
 : deploy-test-command ( -- args )
     os macosx?
index e656597a38f4d3c6392c2deab3eeebec4d40aec4..adf2bdd60041ae11852b9d8b9a03e0bca1de111a 100755 (executable)
@@ -58,10 +58,10 @@ ERROR: unsupported-ico-format bytes format ;
 
 : check-ico-type ( bytes -- bytes )
     dup "PNG" head? [
-        "PNG" unsupported-ico-format
+        "PNG" throw-unsupported-ico-format
     ] when
     dup B{ 0 0 } head? [
-        "UNKNOWN" unsupported-ico-format
+        "UNKNOWN" throw-unsupported-ico-format
     ] unless ;
 
 PRIVATE>
index 185791883f69df3dc17bdc1db32295952c82d225..01d6c325ba70f162c358b1beddd33fac63be9f37 100644 (file)
@@ -66,7 +66,7 @@ M: object file-spec>string ( file-listing spec -- string )
         { +file-date+ [ file-info>> modified>> listing-date ] }
         { +file-time+ [ file-info>> modified>> listing-time ] }
         { +file-datetime+ [ file-info>> modified>> timestamp>ymdhms ] }
-        [ unknown-file-spec ]
+        [ throw-unknown-file-spec ]
     } case ;
 
 : list-files-fast ( listing-tool -- array )
index b937b25b932357e5981928c395241b10680106b9..f6349e091e896195c5559cf3b797e5e06eac05c6 100644 (file)
@@ -15,7 +15,7 @@ M: bad-tr summary
 : tr-nth ( n mapping -- ch ) nth-unsafe 127 bitand ; inline
 
 : check-tr ( from to -- )
-    [ [ ascii? ] all? ] both? [ bad-tr ] unless ;
+    [ [ ascii? ] all? ] both? [ throw-bad-tr ] unless ;
 
 : compute-tr ( quot from to -- mapping )
     [ 128 iota ] 3dip zip
index 869f8bf5a1bb5a1390c6f67c7c02b210a217f90f..6e995a813dfede2d534ee3e9cea6f9576a6a6f0e 100644 (file)
@@ -33,8 +33,8 @@ MACRO: write-tuple ( class -- quot )
 
 : check-final ( class -- )
     {
-        { [ dup tuple-class? not ] [ not-a-tuple ] }
-        { [ dup final-class? not ] [ not-final ] }
+        { [ dup tuple-class? not ] [ throw-not-a-tuple ] }
+        { [ dup final-class? not ] [ throw-not-final ] }
         [ drop ]
     } cond ;
 
index f86ad952a37ab62b02277a453930422422872000..5b371ea0d61586e4fe760cec5410072e957c1d36 100644 (file)
@@ -19,7 +19,7 @@ PRIVATE>
 
 :: (typed-get) ( name type getter: ( name -- value ) -- value )
     name getter call :> value
-    value type instance? [ name value type variable-type-error ] unless
+    value type instance? [ name value type throw-variable-type-error ] unless
     value type declare1 ; inline
 
 : typed-get ( name type -- value )
@@ -29,7 +29,7 @@ PRIVATE>
     [ get-global ] (typed-get) ; inline
 
 :: (typed-set) ( value name type setter: ( value name -- ) -- )
-    value type instance? [ name value type variable-type-error ] unless
+    value type instance? [ name value type throw-variable-type-error ] unless
     value name setter call ; inline
 
 : typed-set ( value name type -- )
index 4a14e5d3b72e263ce92d5e7aebb424853d6f66aa..c8357136060ddc519e50968902cf5923b02d95ca 100644 (file)
@@ -69,14 +69,14 @@ PREDICATE: typed-word < word "typed-word" word-prop >boolean ;
 :: typed-inputs ( quot word types -- quot' )
     types unboxed-types :> unboxed-types
 
-    [ input-mismatch-error ] word types make-unboxer
+    [ throw-input-mismatch-error ] word types make-unboxer
     unboxed-types quot '[ _ declare @ ]
     compose ;
 
 ! typed outputs
 
 :: typed-outputs ( quot word types -- quot' )
-    [ output-mismatch-error ] word types make-unboxer
+    [ throw-output-mismatch-error ] word types make-unboxer
     quot prepose ;
 
 DEFER: make-boxer
@@ -143,7 +143,7 @@ MACRO: typed ( quot word effect -- quot' )
     dup {
         [ effect-in-types typed-stack-effect? ]
         [ effect-out-types typed-stack-effect? ]
-    } 1|| [ (typed-def) ] [ nip no-types-specified ] if ;
+    } 1|| [ (typed-def) ] [ nip throw-no-types-specified ] if ;
 
 M: typed-word subwords
     [ call-next-method ]
index 38fb92e1f03c131e7ec7beaab51d9236ebf7ae1d..b9204f585343f1a15121f62d2ad1d5af265d322a 100644 (file)
@@ -30,7 +30,7 @@ M: label string<< ( string label -- )
         {
             { [ dup string-array? ] [ ] }
             { [ dup string? ] [ ?string-lines ] }
-            [ not-a-string ]
+            [ throw-not-a-string ]
         } cond
     ] dip [ text<< ] [ relayout ] bi ; inline
 
index f4b494fa3f0eb8271daff0eaa21538ac7a313585..961f9bc7666f209db6dcaf4787fe42567d89a65a 100644 (file)
@@ -103,7 +103,7 @@ ERROR: no-world-found ;
 
 : find-gl-context ( gadget -- )
     find-world dup
-    [ set-gl-context ] [ no-world-found ] if ;
+    [ set-gl-context ] [ throw-no-world-found ] if ;
 
 : (request-focus) ( child world ? -- )
     pick parent>> pick eq? [
index caca019cbcca3b7998967279db654ecab8ecd4a6..1f05c667f00b1522d74bd0b49ba4b46fd8a5f0cc 100644 (file)
@@ -52,7 +52,7 @@ TUPLE: pixel-format < disposable world handle ;
 : <pixel-format> ( world attributes -- pixel-format )
     2dup (make-pixel-format)
     [ pixel-format new-disposable swap >>handle swap >>world ]
-    [ invalid-pixel-format-attributes ]
+    [ throw-invalid-pixel-format-attributes ]
     ?if ;
 
 M: pixel-format dispose*
index e51ccc40c47632b829f2de706279cf803a162be2..9138a2f5335c7424fa1ef5358ccdc6f4a5d975a9 100644 (file)
@@ -62,7 +62,7 @@ PRIVATE>
 ERROR: no-group string ;
 
 : ?group-id ( string -- id )
-    dup group-struct [ nip gr_gid>> ] [ no-group ] if* ;
+    dup group-struct [ nip gr_gid>> ] [ throw-no-group ] if* ;
 
 <PRIVATE
 
index 644a3ab3778d4a1a47f7a782f241e7713ab2bf46..b36f75eb223ba07879bbff833588b39459125d10 100644 (file)
@@ -92,7 +92,7 @@ ERROR: unknown-cpuinfo-line string ;
         { "vendor_id" [ >>vendor-id ] }
         { "wp" [ "yes" = >>wp? ] }
         { "TLB size" [ >>tlb-size ] }
-        [ unknown-cpuinfo-line ]
+        [ throw-unknown-cpuinfo-line ]
     } case ;
 
 
index 4364fd40d0e618cc76bb15c14dd01aa7a311cccb..76b06634792a2bf24d64df8cc0510aaf127275c1 100644 (file)
@@ -32,7 +32,7 @@ MACRO:: unix-system-call ( quot -- quot )
         failed [
             n narray
             errno dup strerror
-            word unix-system-call-error
+            word throw-unix-system-call-error
         ] [
             n ndrop
             ret
@@ -51,7 +51,7 @@ MACRO:: unix-system-call-allow-eintr ( quot -- quot )
             errno EINTR = [
                 n narray
                 errno dup strerror
-                word unix-system-call-error
+                word throw-unix-system-call-error
             ] unless
         ] [
             n ndrop
index ee2e592c1f452b0da224939534178bdb2d14e8bd..a3c4432d89a8e108e230a3abc6e83f219a71f92d 100644 (file)
@@ -71,7 +71,7 @@ M: string user-passwd ( string -- passwd/f )
 ERROR: no-user string ;
 
 : ?user-id ( string -- id/f )
-    dup user-passwd [ nip uid>> ] [ no-user ] if* ;
+    dup user-passwd [ nip uid>> ] [ throw-no-user ] if* ;
 
 : real-user-id ( -- id )
     unix.ffi:getuid ; inline
@@ -132,6 +132,6 @@ M: string set-effective-user ( string -- )
 ERROR: no-such-user obj ;
 
 : user-home ( name/uid -- path )
-    dup user-passwd [ nip dir>> ] [ no-such-user ] if* ;
+    dup user-passwd [ nip dir>> ] [ throw-no-such-user ] if* ;
 
 os macosx? [ "unix.users.macosx" require ] when
index bfb8e07e4f3b525bd7473dd054716a0492a66d65..000782743f2f6e15a983c7bdeeeccbbd55275070 100644 (file)
@@ -85,7 +85,7 @@ M: unrolled-list peek-front*
     drop ; inline
 
 M: unrolled-list pop-front*
-    dup front>> [ empty-unrolled-list ] unless*
+    dup front>> [ throw-empty-unrolled-list ] unless*
     over front-pos>> unroll-factor 1 - eq?
     [ pop-front/new ] [ pop-front/existing ] if ;
 
@@ -131,7 +131,7 @@ M: unrolled-list peek-back*
     drop ; inline
 
 M: unrolled-list pop-back*
-    dup back>> [ empty-unrolled-list ] unless*
+    dup back>> [ throw-empty-unrolled-list ] unless*
     over back-pos>> 1 eq?
     [ pop-back/new ] [ pop-back/existing ] if ;
 
index f149f499d96bd1f6efa58a9ac6765431dc8d7ef8..a1f26d43ebdd5345ad56cf260737d3c2eb5c142a 100644 (file)
@@ -30,7 +30,7 @@ ERROR: malformed-port ;
 : parse-host ( string -- host/f port/f )
     [
         ":" split1-last [ url-decode ]
-        [ dup [ string>number [ malformed-port ] unless* ] when ] bi*
+        [ dup [ string>number [ throw-malformed-port ] unless* ] when ] bi*
     ] [ f f ] if* ;
 
 GENERIC: >url ( obj -- url )
index 79870b483f35561109d46d7061123456f1920f3e..97e9b29cccfbb1f54dd626a45f3458d76ee60a13 100644 (file)
@@ -33,7 +33,7 @@ M: vlist ppush
 ERROR: empty-vlist-error ;
 
 M: vlist ppop
-    [ empty-vlist-error ]
+    [ throw-empty-vlist-error ]
     [ [ length>> 1 - ] [ vector>> ] bi vlist boa ] if-empty ;
 
 M: vlist clone
index 96b8723e684d46a9a2c45da61da97a9124183fde..7172c461cb71219c22e59ad0ecdeecc1068d6601 100644 (file)
@@ -34,7 +34,7 @@ M: vocab-prefix vocab-name name>> ;
 ERROR: vocab-root-required root ;
 
 : ensure-vocab-root ( root -- root )
-    dup vocab-roots get member? [ vocab-root-required ] unless ;
+    dup vocab-roots get member? [ throw-vocab-root-required ] unless ;
 
 : ensure-vocab-root/prefix ( root prefix -- root prefix )
     [ ensure-vocab-root ] [ check-vocab-name ] bi* ;
index 15abd924d827b6cb82bda3d3d06572e0ddf745e3..d69e02ab8d8888834dbe487791486b43b4030c34 100644 (file)
@@ -94,7 +94,7 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium )
 
 ERROR: null-com-release ;
 : com-release ( interface -- )
-    [ IUnknown::Release drop ] [ null-com-release ] if* ; inline
+    [ IUnknown::Release drop ] [ throw-null-com-release ] if* ; inline
 
 : with-com-interface ( interface quot -- )
     over [ com-release ] curry [ ] cleanup ; inline
index f6cf51d3d40fde2748c99b2c1b0f0e5c9295a66b..85a1fbb00ab4e9972750288904ce9ca169963933 100755 (executable)
@@ -31,7 +31,7 @@ ERROR: no-com-interface interface ;
 : find-com-interface-definition ( name -- definition )
     [
         dup +com-interface-definitions+ get-global at*
-        [ nip ] [ drop no-com-interface ] if
+        [ nip ] [ drop throw-no-com-interface ] if
     ] [ f ] if* ;
 
 : save-com-interface-definition ( definition -- )
index fca62c85bef4dc366277822144dc0fece5facb15..43b0052b18b3329b7e2a73b177b7968231060704 100755 (executable)
@@ -723,7 +723,7 @@ CONSTANT: FORMAT_MESSAGE_MAX_WIDTH_MASK   0x000000FF
 ERROR: windows-error n string ;
 
 : (win32-error) ( n -- )
-    [ dup win32-error-string windows-error ] unless-zero ;
+    [ dup win32-error-string throw-windows-error ] unless-zero ;
 
 : win32-error ( -- )
     GetLastError (win32-error) ;
@@ -737,7 +737,7 @@ ERROR: windows-error n string ;
     dup ERROR_SUCCESS = [
         drop
     ] [
-        dup n>win32-error-string windows-error
+        dup n>win32-error-string throw-windows-error
     ] if ;
 
 : throw-win32-error ( -- * )
index a43ce235ba8c3f8822e2f8f338aede71f9d9764c..5398dd4706e49df2438f951c3ddbadd6ac198768 100644 (file)
@@ -1628,7 +1628,7 @@ FUNCTION: GpStatus GdipTestControl ( GpTestControlEnum x, void* x )
 ERROR: gdi+-error status ;
 
 : check-gdi+-status ( GpStatus -- )
-    dup Ok = [ drop ] [ gdi+-error ] if ;
+    dup Ok = [ drop ] [ throw-gdi+-error ] if ;
 
 CONSTANT: standard-gdi+-startup-input
     S{ GdiplusStartupInput
index e3f2da7b189fb18d9f6c4f39f146f3b066eff66f..422d83fbc19282b2902bdf8edd0b133ead2d5e89 100644 (file)
@@ -141,7 +141,7 @@ ERROR: unknown-sockaddr-length sockaddr length ;
     dup iSockaddrLength>> {
         { 16 [ lpSockaddr>> sockaddr-in memory>struct ] }
         { 28 [ lpSockaddr>> sockaddr-in6 memory>struct ] }
-        [ unknown-sockaddr-length ]
+        [ throw-unknown-sockaddr-length ]
     } case ;
 
 TYPEDEF: SOCKET_ADDRESS* PSOCKET_ADDRESS
index 968b52fbe49730285c7962f7f994edbe6de6d389..65d64b85fb24958cb0563c0d02a83473c87b3384 100644 (file)
@@ -19,7 +19,7 @@ CONSTANT: registry-value-max-length 16384
             drop
         ] [
             [ key subkey mode ] dip n>win32-error-string
-            open-key-failed
+            throw-open-key-failed
         ] if
     ] keep HKEY deref ;
 
@@ -36,7 +36,7 @@ CONSTANT: registry-value-max-length 16384
             hKey lpSubKey 0 lpClass dwOptions samDesired
             lpSecurityAttributes
         ] dip n>win32-error-string
-        create-key-failed
+        throw-create-key-failed
     ] unless ;
 
 : create-key ( hkey lsubkey -- hkey )
index db6a18e69b27c44b93272cecf217635835ada92e..fa87ad900145bec0dfa24fac22a478304521e452 100644 (file)
@@ -20,7 +20,7 @@ ALIAS: mciSendString mciSendStringW
 ERROR: mci-error n ;
 
 : check-mci-error ( n -- )
-    [ mci-error ] unless-zero ;
+    [ throw-mci-error ] unless-zero ;
 
 : open-command ( path -- )
     "open \"%s\" type mpegvideo alias MediaFile" sprintf f 0 f
index 163b5f9e9dd9893454f9eb2878737d0c90d49361..59a26512635c77a988fd99aeb1576815faebeb17 100644 (file)
@@ -447,7 +447,7 @@ ERROR: winsock-exception n string ;
     maybe-winsock-exception [ throw ] when* ;
 
 : (throw-winsock-error) ( n -- * )
-    [ ] [ n>win32-error-string ] bi winsock-exception ;
+    [ ] [ n>win32-error-string ] bi throw-winsock-exception ;
 
 : throw-winsock-error ( -- * )
     WSAGetLastError (throw-winsock-error) ;
index 36bc349e11fe5b6902d6cbb6caf19fe032732f16..86a67afd17de87295b00c0c23e3d02f919e47433 100644 (file)
@@ -125,7 +125,7 @@ TAG: boolean xml>item
     children>string {
         { "1" [ t ] }
         { "0" [ f ] }
-        [ "Bad boolean" server-error ]
+        [ "Bad boolean" throw-server-error ]
     } case ;
 
 : unstruct-member ( tag -- )
@@ -167,7 +167,7 @@ TAG: array xml>item
             dup first-child-tag main>> "fault" =
             [ parse-fault <rpc-fault> ]
             [ parse-rpc-response <rpc-response> ] if
-        ] [ "Bad main tag name" server-error ] if
+        ] [ "Bad main tag name" throw-server-error ] if
     ] if ;
 
 <PRIVATE
index d43c127e1f056dc8dbd2f7aef787c40c00a31338..d0c6f005a80af7286e4f4afdba4155d46eba614c 100644 (file)
@@ -16,7 +16,7 @@ M: no-tag summary
     drop "The tag-dispatching word has no method for the given tag name" ;
 
 : compile-tags ( word xtable -- quot )
-    >alist swap '[ _ no-tag ] suffix '[ dup main>> _ case ] ;
+    >alist swap '[ _ throw-no-tag ] suffix '[ dup main>> _ case ] ;
 
 : define-tags ( word effect -- )
     [ dup dup "xtable" word-prop compile-tags ] dip define-declared ;
index 67faefff33356f1b76d360efc855bd9a5e3ee647..473d5305eaba74d7809c2281b1708944fa5c53ae 100644 (file)
@@ -87,8 +87,6 @@ DEFER: finalize-rule-set
         ] with-variable
     ] with each ;
 
-ERROR: mutually-recursive-rulesets ruleset ;
-
 : finalize-rule-set ( ruleset -- )
     dup finalized?>> [ drop ] [
         t >>finalized?