Better error. for assertion failures
parent
130e936310
commit
234242e631
|
@ -1,13 +1,13 @@
|
||||||
! Copyright (C) 2004, 2008 Slava Pestov.
|
! Copyright (C) 2004, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays definitions generic hashtables inspector io kernel
|
USING: arrays definitions generic hashtables inspector io kernel
|
||||||
math namespaces prettyprint sequences assocs sequences.private
|
math namespaces prettyprint prettyprint.config sequences assocs
|
||||||
strings io.styles vectors words system splitting math.parser
|
sequences.private strings io.styles vectors words system
|
||||||
classes.tuple continuations continuations.private combinators
|
splitting math.parser classes.tuple continuations
|
||||||
generic.math io.streams.duplex classes.builtin classes
|
continuations.private combinators generic.math io.streams.duplex
|
||||||
compiler.units generic.standard vocabs threads threads.private
|
classes.builtin classes compiler.units generic.standard vocabs
|
||||||
init kernel.private libc io.encodings mirrors accessors
|
threads threads.private init kernel.private libc io.encodings
|
||||||
math.order ;
|
mirrors accessors math.order ;
|
||||||
IN: debugger
|
IN: debugger
|
||||||
|
|
||||||
GENERIC: error. ( error -- )
|
GENERIC: error. ( error -- )
|
||||||
|
@ -241,6 +241,15 @@ M: condition error-help error>> error-help ;
|
||||||
|
|
||||||
M: assert summary drop "Assertion failed" ;
|
M: assert summary drop "Assertion failed" ;
|
||||||
|
|
||||||
|
M: assert error.
|
||||||
|
"Assertion failed" print
|
||||||
|
standard-table-style [
|
||||||
|
15 length-limit set
|
||||||
|
5 line-limit set
|
||||||
|
[ expect>> [ [ "Expect:" write ] with-cell pprint-cell ] with-row ]
|
||||||
|
[ got>> [ [ "Got:" write ] with-cell pprint-cell ] with-row ] bi
|
||||||
|
] tabular-output ;
|
||||||
|
|
||||||
M: immutable summary drop "Sequence is immutable" ;
|
M: immutable summary drop "Sequence is immutable" ;
|
||||||
|
|
||||||
M: redefine-error error.
|
M: redefine-error error.
|
||||||
|
|
Loading…
Reference in New Issue