summary ( object -- string )
Converting objects to summary strings


Vocabulary
summary

Inputs and outputs
objectan object
stringa string


Generic word contract
Outputs a brief description of the object.

Notes
New methods can be defined by user code. Most often, this is used with error classes so that The debugger can print friendlier error messages.

Definition

GENERIC: summary ( object -- string )


Methods

M: *-in-c-type-name summary
name>> "Cannot define a C type “"
"” that ends with an asterisk (*)" surround ;



M: :>-outside-lambda-error summary
drop ":> cannot be used outside of [let, [|, or :: forms" ;



M: >r/r>-in-lambda-error summary
drop
"Explicit retain stack manipulation is not permitted in lambda..."
;






M: already-disposed summary
drop "Attempting to operate on disposed object" ;



M: amb-failure summary drop "Backtracking failure" ;



M: ambiguous-use-error summary
name>> "The name “" "” resolves to more than one word."
surround ;



M: assert-sequence summary drop "Assertion failed" ;



M: assert summary drop "Assertion failed" ;



M: attempt-all-error summary drop "Nothing to attempt" ;



M: bad-byte-array-length summary
drop "Byte array length doesn't divide type width" ;



M: bad-create summary drop "Bad parameters to create" ;



M: bad-effect summary drop "Bad stack effect declaration" ;



M: bad-heap-delete summary
drop "Invalid entry passed to heap-delete" ;



M: bad-identifier summary drop "Unknown identifier" ;



M: bad-inheritance summary
drop "Circularity in inheritance chain" ;



M: bad-initial-value summary drop "Incompatible initial value" ;



M: bad-literal-tuple summary drop "Bad literal tuple" ;



M: bad-local summary
drop "You have found a bug in locals. Please report." ;



M: bad-macro-input summary
macro>> name>> "Cannot apply “"
"” to a run-time computed value" surround ;



M: bad-number summary drop "Bad number literal" ;



M: bad-probabilities summary
drop
"The probabilities do not satisfy the rules stated in the docs."
;



M: bad-ptr summary drop "Memory allocation failed" ;



M: bad-rewrite summary
drop "You have found a bug in locals. Please report." ;



M: bad-slot-name summary
drop "Bad slot name in object literal" ;



M: bad-slot-value summary drop "Bad store to specialized slot" ;



M: bad-stack-effect summary
drop
"Words used in infix must declare a stack effect and return ex..."
;



M: bad-superclass summary
drop
"Tuple classes can only inherit from non-final tuple classes"
;



M: bad-tr summary
drop "TR: can only be used with ASCII characters" ;



M: bad-vocab-name summary
drop "Vocab name cannot contain \":/\\ \"" ;



M: bounds-error summary drop "Sequence index out of bounds" ;



M: callsite-not-compiled summary
drop "Caller not compiled with the optimizing compiler" ;



M: cannot-annotate-twice summary
drop "Cannot annotate a word twice" ;



M: cannot-be-inline summary
drop "This type of word cannot be inlined" ;



M: cannot-find-graphviz-installation summary
drop "Cannot find Graphviz installation" ;



M: cannot-send-synchronous-to-self summary
drop "Cannot synchronous send to myself" ;



M: certificate-missing-error summary
drop "Host did not present any certificate" ;



M: certificate-verify-error summary
drop "Certificate verification failed" ;



M: check-method-error summary
drop "Invalid parameters for create-method" ;






M: decode-error summary drop "Character decoding error" ;



M: deprecated-usages summary drop "Deprecated words used" ;



M: did-not-fail summary drop "Did not fail" ;



M: dimensions-not-equal summary drop "Dimensions do not match" ;



M: diverging-recursion-error summary
word>> name>> "The recursive word “"
"” digs arbitrarily deep into the stack" surround ;



M: division-by-zero summary drop "Division by zero" ;



M: do-not-compile summary
word>> name>> "Cannot compile call to “" "”" surround ;



M: duplicate-slot-names summary drop "Duplicate slot names" ;



M: ebnf-foreign-not-found summary
name>> "Foreign word '" "' not found" surround ;



M: effect-error summary
drop "Stack effect declaration is wrong" ;



M: encode-error summary drop "Character encoding error" ;






M: fail summary drop "Matching failed" ;



M: fuzz-test-failure summary
[
"Fuzz test predicate failed for " %
dup failures>> length # " out of " % trials>> #
" trials" %
] "" make ;



M: gir-not-found summary
[ name>> "“" "” file not found on paths:\n" surround ]
[ paths>> "\n" join ] bi
"\n\nUse the existing path or declare GIR_DIRS environment variable"
3append ;






M: groups-error summary drop "Non positive group size" ;



M: immutable summary drop "Sequence is immutable" ;



M: inconsistent-next-method summary
drop
"Executing call-next-method with inconsistent parameters" ;



M: inconsistent-recursive-call-error summary
word>> name>> "The recursive word “"
"” calls itself with a different set of quotation parameters t..."
surround ;



M: input-mismatch-error summary
[
"Typed word “" % dup word>> name>> %
"” expected input value of type " %
dup expected-type>> unparse % " but got " %
dup value>> class-of name>> % drop
] "" make ;



M: input summary
[
"Input: " % string>> "\n" split1
[ % ] [ "..." "" ? % ] bi*
] "" make ;






M: invalid-baud summary
baud>> number>string "Baud rate " " not supported" surround
;



M: invalid-inet-server summary
drop
"Cannot use <server> with <inet>; use <inet4> or <inet6> instead"
;



M: invalid-ipv4 summary drop "Invalid IPv4 address" ;



M: invalid-ipv6 summary drop "Invalid IPv6 address" ;



M: invalid-local-address summary
drop
"Cannot use with-local-address with <inet>; use <inet4> or <in..."
;



M: invalid-row-variable summary
drop
"Stack effect row variables can only occur as the first input ..."
;



M: invalid-slot-name summary drop "Invalid slot name" ;



M: io-timeout summary drop "I/O operation timed out" ;



M: json-fp-special-error summary
drop "JSON serialization: illegal float:" ;



M: let-form-in-literal-error summary
drop "[let not permitted inside literals" ;









M: local-not-defined summary drop "local is not defined" ;



M: local-writer-in-literal-error summary
drop "Local writer words not permitted inside literals" ;



M: missing-effect summary
drop "Missing stack effect declaration" ;



M: negative-count-semaphore summary
drop "Cannot have semaphore with negative count" ;



M: no-article summary drop "Help article does not exist" ;



M: no-biassoc-deletion summary
drop "biassocs do not support deletion" ;



M: no-c-type summary drop "Not a C type" ;



M: no-case summary drop "Fall-through in case" ;



M: no-cond summary drop "Fall-through in cond" ;



M: no-current-vocab-error summary
drop "Not in a vocabulary; IN: form required" ;



M: no-match-cond summary drop "Fall-through in match-cond" ;



M: no-match summary drop "Fall through in switch" ;



M: no-math-method summary drop "No suitable arithmetic method" ;



M: no-method summary drop "No suitable method" ;



M: no-next-method summary
drop "Executing call-next-method from least-specific method"
;



M: no-random-number-generator summary
drop "Random number generator is not defined." ;



M: no-such-library summary drop "Library not found" ;



M: no-such-state summary drop "No such state" ;



M: no-such-symbol summary drop "Symbol not found" ;



M: no-tag summary
drop
"The tag-dispatching word has no method for the given tag name"
;



M: no-vocab summary drop "Vocabulary does not exist" ;



M: no-word-error summary
name>> "No word named “"
"” found in current vocabulary search path" surround ;



M: no-word-in-vocab summary
[ vocab>> ] [ word>> ] bi [
"No word named “" % % "” found in “" % %
"” vocabulary" %
] "" make ;



M: not-a-mixin-class summary drop "Not a mixin class" ;



M: not-a-month summary drop "Months are indexed starting at 1" ;



M: not-a-tuple summary drop "Not a tuple" ;



M: not-compiled summary
word>> name>> "The word "
" cannot be executed because it failed to compile" surround
;



M: not-found-in-roots summary
path>> "Cannot resolve vocab: " prepend ;



M: not-in-a-method-error summary
drop
"call-next-method can only be called in a method definition"
;






M: output-mismatch-error summary
[
"Typed word “" % dup word>> name>> %
"” expected to output value of type " %
dup expected-type>> name>> % " but gave " %
dup value>> class-of name>> % drop
] "" make ;



M: postgresql-result-null summary drop "PQexec returned f." ;



M: premature-close summary
drop
"Connection closed prematurely - potential truncation attack"
;



M: realloc-error summary drop "Memory reallocation failed" ;



M: recursive-quotation-error summary
drop "Recursive quotation" ;



M: redefined-rule summary
name>> "Rule '" "' defined more than once" surround ;



M: row-variable-can't-have-type summary
drop
"Stack effect row variables cannot have a declared type" ;









M: slice-error summary
"Cannot create slice" swap {
{ [ dup from>> 0 < ] [ ": from < 0" ] }
{
[ dup [ to>> ] [ seq>> length ] bi > ]
[ ": to > length" ]
}
{ [ dup [ from>> ] [ to>> ] bi > ] [ ": from > to" ] }
[ f ]
} cond nip append ;






M: stack-effect-omits-dashes summary
drop "Stack effect must contain “--”" ;



M: staging-violation summary
drop
"A parsing word cannot be used in the same file it is defined in."
;






M: struct-must-have-slots summary
drop "Struct definitions must have slots" ;



M: struct summary
[
dup class-of name>> % " struct of " % byte-length #
" bytes " %
] "" make ;



M: subject-name-verify-error summary
drop "Subject name verification failed" ;



M: too-many->r summary
drop
"Quotation pushes elements on retain stack without popping them"
;



M: too-many-r> summary
drop
"Quotation pops retain stack elements which it did not push"
;



M: too-many-redirects summary
drop
[ "Redirection limit of " % max-redirects # " exceeded" % ]
"" make ;






M: transform-expansion-error summary
word>> name>> "Macro expansion of “" "” threw an error"
surround ;






M: unbalanced-branches-error summary
[ word>> name>> ] [ quots>> length 1 = ] bi [
"The input quotation to “"
"” doesn't match its expected effect"
] [
"The input quotations to “"
"” don't match their expected effects"
] if surround ;



M: unbalanced-recursion-error summary
word>> name>> "The recursive word “"
"” leaves with the stack having the wrong height" surround ;



M: undeclared-recursion-error summary
word>> name>> "The inline recursive word “"
"” must be declared recursive" surround ;



M: undefined-derivative summary
[
dup "Derivative of " % word>> name>> %
" is undefined at " % point>> # "." %
] "" make ;



M: undefined-word summary
word>> undefined-word?
"Cannot execute a deferred word before it has been defined"
"Cannot execute a word before it has been compiled" ? ;



M: unknown-macro-input summary
macro>> name>> "Cannot apply “"
"” to an input parameter of a non-inline word" surround ;



M: unknown-typeflag summary
ch>> [ "Unknown typeflag: " ] dip prefix ;



M: unsupported-bitfield-widths summary
drop
"Bitmaps only support bitfield compression in 16/32bit images"
;



M: unsupported-encoding summary
drop
"Must use utf8 or latin1 (match the graph's charset attribute)"
;



M: unsupported-platform summary
drop
"Current operating system not supported by this vocabulary"
;



M: unsupported-preview-format summary
drop "Unsupported preview format" ;



M: upgrade-buffers-full summary
drop
"send-secure-handshake can only be used if buffers are empty"
;



M: upgrade-on-non-socket summary
drop
"send-secure-handshake can only be used if input-stream and"
print "output-stream are a socket" ;



M: version-control-merge-conflict summary
drop "Version control merge conflict in source code" ;



M: vm-error summary drop "VM error" ;


















M: wrong-values summary
drop "Quotation's stack effect does not match call site" ;