1 ! Copyright (C) 2008, 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays debugger io kernel prettyprint sequences
4 stack-checker.errors summary ;
6 M: unknown-macro-input summary
7 macro>> name>> "Cannot apply “" "” to an input parameter of a non-inline word" surround ;
9 M: bad-macro-input summary
10 macro>> name>> "Cannot apply “" "” to a run-time computed value" surround ;
12 M: too-many->r summary
13 drop "Quotation pushes elements on retain stack without popping them" ;
15 M: too-many-r> summary
16 drop "Quotation pops retain stack elements which it did not push" ;
18 M: missing-effect summary
19 drop "Missing stack effect declaration" ;
21 M: effect-error summary
22 drop "Stack effect declaration is wrong" ;
24 M: recursive-quotation-error summary
25 drop "Recursive quotation" ;
27 M: undeclared-recursion-error summary
29 "The inline recursive word “" "” must be declared recursive" surround ;
31 M: diverging-recursion-error summary
33 "The recursive word “" "” digs arbitrarily deep into the stack" surround ;
35 M: unbalanced-recursion-error summary
37 "The recursive word “" "” leaves with the stack having the wrong height" surround ;
39 M: inconsistent-recursive-call-error summary
41 "The recursive word “"
42 "” calls itself with a different set of quotation parameters than were input" surround ;
44 M: transform-expansion-error summary
45 word>> name>> "Macro expansion of “" "” threw an error" surround ;
47 M: transform-expansion-error error.
49 [ nl "The error was:" print error>> error. nl ]
50 [ continuation>> traceback-link. ]
53 M: do-not-compile summary
54 word>> name>> "Cannot compile call to “" "”" surround ;
56 M: unbalanced-branches-error summary
57 [ word>> name>> ] [ quots>> length 1 = ] bi
58 [ "The input quotation to “" "” doesn't match its expected effect" ]
59 [ "The input quotations to “" "” don't match their expected effects" ] if
62 M: unbalanced-branches-error error.
64 [ quots>> ] [ declareds>> ] [ actuals>> ] tri 3array flip
65 { "Input" "Expected" "Got" } prefix simple-table. ;