Skip to content

Commit b6be868

Browse files
committed
basis: ERROR: changes.
1 parent 225c28f commit b6be868

File tree

178 files changed

+351
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+351
-354
lines changed

basis/alien/c-types/c-types.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ UNION: c-type-name
5555
c-type-word pointer ;
5656

5757
: resolve-typedef ( name -- c-type )
58-
dup void? [ no-c-type ] when
58+
dup void? [ throw-no-c-type ] when
5959
dup c-type-name? [ lookup-c-type ] when ;
6060

6161
M: word lookup-c-type
6262
dup "c-type" word-prop resolve-typedef
63-
[ ] [ no-c-type ] ?if ;
63+
[ ] [ throw-no-c-type ] ?if ;
6464

6565
GENERIC: c-type-class ( name -- class )
6666

basis/alien/data/data.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ M: bad-byte-array-length summary
7979

8080
: cast-array ( byte-array c-type -- array )
8181
[ binary-object ] dip [ heap-size /mod 0 = ] keep swap
82-
[ <c-direct-array> ] [ bad-byte-array-length ] if ; inline
82+
[ <c-direct-array> ] [ throw-bad-byte-array-length ] if ; inline
8383

8484
: malloc-array ( n c-type -- array )
8585
[ heap-size calloc ] [ <c-direct-array> ] 2bi ; inline

basis/alien/endian/endian.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ERROR: invalid-signed-conversion n ;
1515
{ 2 [ [ c:short <ref> c:short deref ] ] }
1616
{ 4 [ [ int <ref> int deref ] ] }
1717
{ 8 [ [ longlong <ref> longlong deref ] ] }
18-
[ invalid-signed-conversion ]
18+
[ throw-invalid-signed-conversion ]
1919
} case ; inline
2020

2121
MACRO: byte-reverse ( n signed? -- quot )

basis/alien/parser/parser.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ERROR: bad-array-type ;
1515

1616
: parse-array-type ( name -- c-type )
1717
"[" split unclip
18-
[ [ "]" ?tail [ bad-array-type ] unless parse-datum ] map ]
18+
[ [ "]" ?tail [ throw-bad-array-type ] unless parse-datum ] map ]
1919
[ (parse-c-type) ]
2020
bi* prefix ;
2121

basis/base64/base64.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CONSTANT: alphabet
2424

2525
: base64>ch ( ch -- ch )
2626
$[ alphabet alphabet-inverse 0 CHAR: = pick set-nth ] nth
27-
[ malformed-base64 ] unless* ; inline
27+
[ throw-malformed-base64 ] unless* ; inline
2828

2929
: (write-lines) ( column byte-array -- column' )
3030
output-stream get dup '[
@@ -84,7 +84,7 @@ PRIVATE>
8484
4 "\n\r" pick read-ignoring dup length {
8585
{ 0 [ 2drop ] }
8686
{ 4 [ decode4 (decode-base64) ] }
87-
[ malformed-base64 ]
87+
[ throw-malformed-base64 ]
8888
} case ;
8989

9090
PRIVATE>

basis/biassocs/biassocs.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ M: no-biassoc-deletion summary
2929
drop "biassocs do not support deletion" ;
3030

3131
M: biassoc delete-at
32-
no-biassoc-deletion ;
32+
throw-no-biassoc-deletion ;
3333

3434
M: biassoc >alist from>> >alist ;
3535

basis/bit-arrays/bit-arrays.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PRIVATE>
4747
ERROR: bad-array-length n ;
4848

4949
: <bit-array> ( n -- bit-array )
50-
dup 0 < [ bad-array-length ] when
50+
dup 0 < [ throw-bad-array-length ] when
5151
dup bits>bytes <byte-array>
5252
bit-array boa ; inline
5353

basis/bit-sets/bit-sets.factor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ M: bit-set delete
3232
ERROR: check-bit-set-failed ;
3333

3434
: check-bit-set ( bit-set -- bit-set )
35-
dup bit-set? [ check-bit-set-failed ] unless ; inline
35+
dup bit-set? [ throw-check-bit-set-failed ] unless ; inline
3636

3737
: bit-set-map ( seq1 seq2 quot -- seq )
3838
[ drop [ length ] bi@ [ assert= ] keep ]

basis/bitstreams/bitstreams.factor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ERROR: invalid-widthed bits #bits ;
2020
dup 0 < [ neg ] when log2 <=
2121
] if-zero
2222
]
23-
} 2|| [ invalid-widthed ] when ;
23+
} 2|| [ throw-invalid-widthed ] when ;
2424

2525
: <widthed> ( bits #bits -- widthed )
2626
check-widthed
@@ -85,11 +85,11 @@ GENERIC: poke ( value n bitstream -- )
8585

8686
<PRIVATE
8787

88-
ERROR: not-enough-bits widthed n ;
88+
ERROR: not-enough-widthed-bits widthed n ;
8989

9090
: check-widthed-bits ( widthed n -- widthed n )
9191
2dup { [ nip 0 < ] [ [ #bits>> ] dip < ] } 2||
92-
[ not-enough-bits ] when ;
92+
[ throw-not-enough-widthed-bits ] when ;
9393

9494
: widthed-bits ( widthed n -- bits )
9595
check-widthed-bits
@@ -161,7 +161,7 @@ ERROR: not-enough-bits n bit-reader ;
161161
] if ;
162162

163163
:: (peek) ( n bs endian> subseq-endian -- bits )
164-
n bs enough-bits? [ n bs not-enough-bits ] unless
164+
n bs enough-bits? [ n bs throw-not-enough-bits ] unless
165165
bs [ byte-pos>> ] [ bit-pos>> n + ] bi #bits>#bytes dupd +
166166
bs bytes>> subseq endian> execute( seq -- x )
167167
n bs subseq-endian execute( bignum n bs -- bits ) ;

basis/bootstrap/image/image.factor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ ERROR: not-in-image vocabulary word ;
365365

366366
: fixup-word ( word -- offset )
367367
transfer-word dup lookup-object
368-
[ ] [ [ vocabulary>> ] [ name>> ] bi not-in-image ] ?if ;
368+
[ ] [ [ vocabulary>> ] [ name>> ] bi throw-not-in-image ] ?if ;
369369

370370
: fixup-words ( -- )
371371
bootstrapping-image get [ dup word? [ fixup-word ] when ] map! drop ;
@@ -437,7 +437,7 @@ M: byte-array '
437437
ERROR: tuple-removed class ;
438438

439439
: require-tuple-layout ( word -- layout )
440-
dup tuple-layout [ ] [ tuple-removed ] ?if ;
440+
dup tuple-layout [ ] [ throw-tuple-removed ] ?if ;
441441

442442
: (emit-tuple) ( tuple -- pointer )
443443
[ tuple-slots ]

0 commit comments

Comments
 (0)