| 
									
										
										
										
											2011-09-12 03:56:24 -04:00
										 |  |  | ! Copyright (C) 2004, 2011 Slava Pestov. | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							| 
									
										
										
										
											2016-08-03 04:53:48 -04:00
										 |  |  | USING: accessors alien alien.strings arrays assocs classes | 
					
						
							| 
									
										
										
										
											2014-06-04 11:35:31 -04:00
										 |  |  | classes.builtin classes.mixin classes.tuple classes.tuple.parser | 
					
						
							| 
									
										
										
										
											2016-08-03 04:53:48 -04:00
										 |  |  | combinators combinators.short-circuit compiler.errors compiler.units | 
					
						
							|  |  |  | continuations definitions destructors effects.parser fry generic | 
					
						
							|  |  |  | generic.math generic.parser generic.single grouping io io.encodings | 
					
						
							|  |  |  | io.styles kernel kernel.private lexer libc make math math.order | 
					
						
							|  |  |  | math.parser math.ratios namespaces parser prettyprint sequences | 
					
						
							|  |  |  | sequences.private slots source-files.errors strings strings.parser | 
					
						
							|  |  |  | summary system vocabs vocabs.loader vocabs.parser words ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | IN: debugger | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GENERIC: error-help ( error -- topic )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: object error-help drop f ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-24 07:47:42 -04:00
										 |  |  | M: tuple error-help class-of ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-23 05:32:17 -04:00
										 |  |  | M: source-file-error error-help error>> error-help ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GENERIC: error. ( error -- )
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-30 21:53:32 -04:00
										 |  |  | M: object error. short. ;
 | 
					
						
							| 
									
										
										
										
											2009-10-23 05:32:17 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | M: string error. print ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-09 01:17:24 -05:00
										 |  |  | : traceback-link. ( continuation -- )
 | 
					
						
							|  |  |  |     "[" write [ "Traceback" ] dip write-object "]" print ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | : :s ( -- )
 | 
					
						
							| 
									
										
										
										
											2008-08-29 17:48:43 -04:00
										 |  |  |     error-continuation get data>> stack. ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : :r ( -- )
 | 
					
						
							| 
									
										
										
										
											2008-08-29 17:48:43 -04:00
										 |  |  |     error-continuation get retain>> stack. ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : :c ( -- )
 | 
					
						
							| 
									
										
										
										
											2008-08-29 17:48:43 -04:00
										 |  |  |     error-continuation get call>> callstack. ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : :get ( variable -- value )
 | 
					
						
							| 
									
										
										
										
											2008-08-29 17:48:43 -04:00
										 |  |  |     error-continuation get name>> assoc-stack ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-08 16:32:55 -04:00
										 |  |  | : :res ( n -- * )
 | 
					
						
							| 
									
										
										
										
											2014-06-04 11:35:31 -04:00
										 |  |  |     1 - restarts [ nth f ] change-global continue-restart ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-08 16:32:55 -04:00
										 |  |  | : :1 ( -- * ) 1 :res ;
 | 
					
						
							|  |  |  | : :2 ( -- * ) 2 :res ;
 | 
					
						
							|  |  |  | : :3 ( -- * ) 3 :res ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : restart. ( restart n -- )
 | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2010-02-08 02:03:18 -05:00
										 |  |  |         1 + dup 3 <= [ ":" % # "      " % ] [ # " :res  " % ] if
 | 
					
						
							| 
									
										
										
										
											2008-08-29 17:55:28 -04:00
										 |  |  |         name>> % | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     ] "" make print ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : restarts. ( -- )
 | 
					
						
							| 
									
										
										
										
											2008-09-06 20:13:59 -04:00
										 |  |  |     restarts get [ | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |         nl
 | 
					
						
							|  |  |  |         "The following restarts are available:" print
 | 
					
						
							|  |  |  |         nl
 | 
					
						
							| 
									
										
										
										
											2008-07-07 20:36:33 -04:00
										 |  |  |         [ restart. ] each-index
 | 
					
						
							| 
									
										
										
										
											2008-09-06 20:13:59 -04:00
										 |  |  |     ] unless-empty ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : print-error ( error -- )
 | 
					
						
							|  |  |  |     [ error. flush ] curry
 | 
					
						
							| 
									
										
										
										
											2011-10-13 20:21:59 -04:00
										 |  |  |     [ [ "Error in print-error!" print drop ] with-global ] | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     recover ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 15:58:00 -05:00
										 |  |  | : :error ( -- )
 | 
					
						
							|  |  |  |     error get print-error ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-05-06 23:20:27 -04:00
										 |  |  | : print-error-and-restarts ( error -- )
 | 
					
						
							| 
									
										
										
										
											2008-02-27 20:23:22 -05:00
										 |  |  |     print-error | 
					
						
							|  |  |  |     restarts. | 
					
						
							|  |  |  |     nl
 | 
					
						
							| 
									
										
										
										
											2008-05-06 23:20:27 -04:00
										 |  |  |     "Type :help for debugging help." print flush ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : try ( quot -- )
 | 
					
						
							| 
									
										
										
										
											2009-02-16 20:00:09 -05:00
										 |  |  |     [ print-error-and-restarts ] recover ; inline
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : expired-error. ( obj -- )
 | 
					
						
							|  |  |  |     "Object did not survive image save/load: " write third . ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : io-error. ( error -- )
 | 
					
						
							| 
									
										
										
										
											2015-10-01 11:15:14 -04:00
										 |  |  |     "I/O error #" write third [ . ] [ strerror print ] bi ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : type-check-error. ( obj -- )
 | 
					
						
							|  |  |  |     "Type check error" print
 | 
					
						
							|  |  |  |     "Object: " write dup fourth short. | 
					
						
							| 
									
										
										
										
											2011-10-24 07:47:42 -04:00
										 |  |  |     "Object type: " write dup fourth class-of .
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     "Expected type: " write third type>class . ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : divide-by-zero-error. ( obj -- )
 | 
					
						
							|  |  |  |     "Division by zero" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-20 02:47:10 -04:00
										 |  |  | HOOK: signal-error. os ( obj -- )
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : array-size-error. ( obj -- )
 | 
					
						
							|  |  |  |     "Invalid array size: " write dup third .
 | 
					
						
							| 
									
										
										
										
											2009-08-13 20:21:44 -04:00
										 |  |  |     "Maximum: " write fourth 1 - . ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-03 12:52:38 -04:00
										 |  |  | : fixnum-range-error. ( obj -- )
 | 
					
						
							|  |  |  |     "Cannot convert to fixnum: " write third . ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | : ffi-error. ( obj -- )
 | 
					
						
							| 
									
										
										
										
											2009-05-02 14:45:38 -04:00
										 |  |  |     "FFI error" print drop ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-07 23:48:09 -04:00
										 |  |  | : find-ffi-error ( string -- error )
 | 
					
						
							|  |  |  |     [ linkage-errors get ] dip
 | 
					
						
							|  |  |  |     '[ nip asset>> name>> _ = ] assoc-find drop nip
 | 
					
						
							|  |  |  |     [ error>> message>> ] [ "none" ] if* ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | : undefined-symbol-error. ( obj -- )
 | 
					
						
							| 
									
										
										
										
											2011-09-12 03:56:24 -04:00
										 |  |  |     "Cannot resolve C library function" print
 | 
					
						
							| 
									
										
										
										
											2014-06-07 23:48:09 -04:00
										 |  |  |     "Library: " write dup fourth .
 | 
					
						
							|  |  |  |     third symbol>string | 
					
						
							|  |  |  |     [ "Symbol: " write print ] | 
					
						
							|  |  |  |     [ "DlError: " write find-ffi-error print ] bi
 | 
					
						
							| 
									
										
										
										
											2013-03-29 20:37:31 -04:00
										 |  |  |     "See http://concatenative.org/wiki/view/Factor/Requirements" print ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : stack-underflow. ( obj name -- )
 | 
					
						
							|  |  |  |     write " stack underflow" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | : stack-overflow. ( obj name -- )
 | 
					
						
							|  |  |  |     write " stack overflow" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-08 16:32:55 -04:00
										 |  |  | : datastack-underflow. ( obj -- ) "Data" stack-underflow. ;
 | 
					
						
							|  |  |  | : datastack-overflow. ( obj -- ) "Data" stack-overflow. ;
 | 
					
						
							|  |  |  | : retainstack-underflow. ( obj -- ) "Retain" stack-underflow. ;
 | 
					
						
							|  |  |  | : retainstack-overflow. ( obj -- ) "Retain" stack-overflow. ;
 | 
					
						
							| 
									
										
										
										
											2010-03-27 07:45:11 -04:00
										 |  |  | : callstack-underflow. ( obj -- ) "Call" stack-underflow. ;
 | 
					
						
							|  |  |  | : callstack-overflow. ( obj -- ) "Call" stack-overflow. ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-08 16:32:55 -04:00
										 |  |  | : memory-error. ( error -- )
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     "Memory protection fault at address " write third .h ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-06 09:44:25 -04:00
										 |  |  | : fp-trap-error. ( error -- )
 | 
					
						
							|  |  |  |     "Floating point trap" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-10-21 02:19:32 -04:00
										 |  |  | : interrupt-error. ( error -- )
 | 
					
						
							|  |  |  |     "Interrupt" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-09 06:44:01 -04:00
										 |  |  | : callback-space-overflow. ( error -- )
 | 
					
						
							|  |  |  |     "Callback space overflow" print drop ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-21 01:04:56 -04:00
										 |  |  | PREDICATE: vm-error < array | 
					
						
							| 
									
										
										
										
											2014-06-04 11:35:31 -04:00
										 |  |  |     dup length 2 < [ drop f ] [ | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2016-03-22 10:56:41 -04:00
										 |  |  |             [ first-unsafe KERNEL-ERROR = ] | 
					
						
							| 
									
										
										
										
											2014-06-04 10:51:26 -04:00
										 |  |  |             [ second-unsafe 0 kernel-error-count 1 - between? ] | 
					
						
							| 
									
										
										
										
											2014-06-04 11:35:31 -04:00
										 |  |  |         } 1&& | 
					
						
							|  |  |  |     ] if ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-21 01:04:56 -04:00
										 |  |  | : vm-errors ( error -- n errors )
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     second { | 
					
						
							| 
									
										
										
										
											2014-09-09 06:44:01 -04:00
										 |  |  |         [ expired-error.           ] | 
					
						
							|  |  |  |         [ io-error.                ] | 
					
						
							| 
									
										
										
										
											2016-11-23 04:20:09 -05:00
										 |  |  |         [ drop                     ] | 
					
						
							| 
									
										
										
										
											2014-09-09 06:44:01 -04:00
										 |  |  |         [ type-check-error.        ] | 
					
						
							|  |  |  |         [ divide-by-zero-error.    ] | 
					
						
							|  |  |  |         [ signal-error.            ] | 
					
						
							|  |  |  |         [ array-size-error.        ] | 
					
						
							|  |  |  |         [ fixnum-range-error.      ] | 
					
						
							|  |  |  |         [ ffi-error.               ] | 
					
						
							|  |  |  |         [ undefined-symbol-error.  ] | 
					
						
							|  |  |  |         [ datastack-underflow.     ] | 
					
						
							|  |  |  |         [ datastack-overflow.      ] | 
					
						
							|  |  |  |         [ retainstack-underflow.   ] | 
					
						
							|  |  |  |         [ retainstack-overflow.    ] | 
					
						
							|  |  |  |         [ callstack-underflow.     ] | 
					
						
							|  |  |  |         [ callstack-overflow.      ] | 
					
						
							|  |  |  |         [ memory-error.            ] | 
					
						
							|  |  |  |         [ fp-trap-error.           ] | 
					
						
							|  |  |  |         [ interrupt-error.         ] | 
					
						
							|  |  |  |         [ callback-space-overflow. ] | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     } ; inline
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-21 01:04:56 -04:00
										 |  |  | M: vm-error summary drop "VM error" ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-04 11:41:41 -04:00
										 |  |  | M: vm-error error. dup vm-errors dispatch ;
 | 
					
						
							| 
									
										
										
										
											2009-04-21 01:04:56 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-04 11:41:41 -04:00
										 |  |  | M: vm-error error-help vm-errors nth first ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-30 12:41:58 -04:00
										 |  |  | M: division-by-zero summary | 
					
						
							|  |  |  |     drop "Division by zero" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | M: no-method summary | 
					
						
							|  |  |  |     drop "No suitable method" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: no-method error. | 
					
						
							|  |  |  |     "Generic word " write
 | 
					
						
							| 
									
										
										
										
											2008-06-29 03:12:44 -04:00
										 |  |  |     dup generic>> pprint | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     " does not define a method for the " write
 | 
					
						
							| 
									
										
										
										
											2011-10-24 07:47:42 -04:00
										 |  |  |     dup object>> class-of pprint | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  |     " class." print
 | 
					
						
							| 
									
										
										
										
											2008-06-29 03:12:44 -04:00
										 |  |  |     "Dispatching on object: " write object>> short. ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-30 02:44:58 -04:00
										 |  |  | M: bad-slot-value summary drop "Bad store to specialized slot" ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 19:07:39 -04:00
										 |  |  | M: bad-slot-name summary drop "Bad slot name in object literal" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-09 14:00:03 -04:00
										 |  |  | M: bad-vocab-name summary drop "Vocab name cannot contain \":/\\ \"" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | M: no-math-method summary | 
					
						
							|  |  |  |     drop "No suitable arithmetic method" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-04 01:33:06 -04:00
										 |  |  | M: no-next-method summary | 
					
						
							|  |  |  |     drop "Executing call-next-method from least-specific method" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: inconsistent-next-method summary | 
					
						
							|  |  |  |     drop "Executing call-next-method with inconsistent parameters" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-21 11:56:57 -04:00
										 |  |  | M: check-method-error summary | 
					
						
							| 
									
										
										
										
											2008-03-16 03:43:00 -04:00
										 |  |  |     drop "Invalid parameters for create-method" ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-26 21:47:36 -04:00
										 |  |  | M: not-a-tuple summary | 
					
						
							|  |  |  |     drop "Not a tuple" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-14 04:54:02 -04:00
										 |  |  | M: bad-superclass summary | 
					
						
							| 
									
										
										
										
											2010-02-17 08:19:57 -05:00
										 |  |  |     drop "Tuple classes can only inherit from non-final tuple classes" ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-13 22:06:50 -04:00
										 |  |  | M: bad-initial-value summary | 
					
						
							|  |  |  |     drop "Incompatible initial value" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | M: no-cond summary | 
					
						
							|  |  |  |     drop "Fall-through in cond" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: no-case summary | 
					
						
							|  |  |  |     drop "Fall-through in case" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-21 22:00:30 -05:00
										 |  |  | M: slice-error summary | 
					
						
							| 
									
										
										
										
											2015-07-16 18:35:03 -04:00
										 |  |  |     "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 ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: bounds-error summary drop "Sequence index out of bounds" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-10-28 08:50:16 -04:00
										 |  |  | M: groups-error summary drop "Non positive group size" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-04 01:33:06 -04:00
										 |  |  | M: condition error. error>> error. ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: condition summary error>> summary ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-04 01:33:06 -04:00
										 |  |  | M: condition error-help error>> error-help ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: assert summary drop "Assertion failed" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-13 15:40:55 -04:00
										 |  |  | M: assert-sequence summary drop "Assertion failed" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: assert-sequence error. | 
					
						
							| 
									
										
										
										
											2008-05-05 01:13:06 -04:00
										 |  |  |     standard-table-style [ | 
					
						
							| 
									
										
										
										
											2009-04-13 15:40:55 -04:00
										 |  |  |         [ "=== Expected:" print expected>> stack. ] | 
					
						
							|  |  |  |         [ "=== Got:" print got>> stack. ] bi
 | 
					
						
							|  |  |  |     ] tabular-output ;
 | 
					
						
							| 
									
										
										
										
											2008-05-05 01:13:06 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | M: immutable summary drop "Sequence is immutable" ;
 | 
					
						
							| 
									
										
										
										
											2007-12-21 21:18:24 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: redefine-error error. | 
					
						
							|  |  |  |     "Re-definition of " write
 | 
					
						
							| 
									
										
										
										
											2008-08-31 08:45:33 -04:00
										 |  |  |     def>> . ;
 | 
					
						
							| 
									
										
										
										
											2007-12-21 21:18:24 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-03-24 00:44:37 -04:00
										 |  |  | M: undefined-word summary | 
					
						
							|  |  |  |     word>> undefined-word? | 
					
						
							| 
									
										
										
										
											2010-02-01 06:57:01 -05:00
										 |  |  |     "Cannot execute a deferred word before it has been defined" | 
					
						
							|  |  |  |     "Cannot execute a word before it has been compiled" | 
					
						
							| 
									
										
										
										
											2010-02-01 00:45:08 -05:00
										 |  |  |     ? ;
 | 
					
						
							| 
									
										
										
										
											2007-12-30 16:09:21 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-09 04:52:08 -05:00
										 |  |  | M: no-compilation-unit error. | 
					
						
							|  |  |  |     "Attempting to define " write
 | 
					
						
							| 
									
										
										
										
											2008-08-31 08:45:33 -04:00
										 |  |  |     definition>> pprint | 
					
						
							| 
									
										
										
										
											2008-01-09 04:52:08 -05:00
										 |  |  |     " outside of a compilation unit" print ;
 | 
					
						
							| 
									
										
										
										
											2008-02-17 19:38:29 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: no-vocab summary | 
					
						
							|  |  |  |     drop "Vocabulary does not exist" ;
 | 
					
						
							| 
									
										
										
										
											2008-02-27 20:23:22 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-20 15:25:08 -04:00
										 |  |  | M: encode-error summary drop "Character encoding error" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: decode-error summary drop "Character decoding error" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-25 04:23:56 -04:00
										 |  |  | M: bad-create summary drop "Bad parameters to create" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-27 03:00:10 -05:00
										 |  |  | M: cannot-be-inline summary drop "This type of word cannot be inlined" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-05-12 19:53:22 -04:00
										 |  |  | M: attempt-all-error summary drop "Nothing to attempt" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-05-16 02:44:52 -04:00
										 |  |  | M: already-disposed summary drop "Attempting to operate on disposed object" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-21 12:01:57 -04:00
										 |  |  | M: no-current-vocab-error summary | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  |     drop "Not in a vocabulary; IN: form required" ;
 | 
					
						
							| 
									
										
										
										
											2008-02-27 20:23:22 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-16 10:34:42 -04:00
										 |  |  | M: no-word-error summary | 
					
						
							| 
									
										
										
										
											2009-06-11 12:02:40 -04:00
										 |  |  |     name>> | 
					
						
							| 
									
										
										
										
											2010-04-06 16:56:35 -04:00
										 |  |  |     "No word named “" | 
					
						
							|  |  |  |     "” found in current vocabulary search path" surround ;
 | 
					
						
							| 
									
										
										
										
											2009-05-16 10:34:42 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: no-word-error error. summary print ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-18 07:51:29 -04:00
										 |  |  | M: no-word-in-vocab summary | 
					
						
							|  |  |  |     [ vocab>> ] [ word>> ] bi
 | 
					
						
							| 
									
										
										
										
											2010-04-06 16:56:35 -04:00
										 |  |  |     [ "No word named “" % % "” found in “" % % "” vocabulary" % ] "" make ;
 | 
					
						
							| 
									
										
										
										
											2009-07-18 07:51:29 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: no-word-in-vocab error. summary print ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-05-16 10:34:42 -04:00
										 |  |  | M: ambiguous-use-error summary | 
					
						
							| 
									
										
										
										
											2016-03-29 12:59:58 -04:00
										 |  |  |     name>> | 
					
						
							|  |  |  |     "The name “" "” resolves to more than one word." surround ;
 | 
					
						
							| 
									
										
										
										
											2009-05-16 10:34:42 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: ambiguous-use-error error. summary print ;
 | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: staging-violation summary | 
					
						
							|  |  |  |     drop
 | 
					
						
							|  |  |  |     "A parsing word cannot be used in the same file it is defined in." ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: bad-number summary | 
					
						
							|  |  |  |     drop "Bad number literal" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: duplicate-slot-names summary | 
					
						
							|  |  |  |     drop "Duplicate slot names" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: invalid-slot-name summary | 
					
						
							|  |  |  |     drop "Invalid slot name" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 06:08:18 -05:00
										 |  |  | M: bad-inheritance summary | 
					
						
							|  |  |  |     drop "Circularity in inheritance chain" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  | M: not-in-a-method-error summary | 
					
						
							|  |  |  |     drop "call-next-method can only be called in a method definition" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 16:34:26 -04:00
										 |  |  | M: version-control-merge-conflict summary | 
					
						
							|  |  |  |     drop "Version control merge conflict in source code" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  | GENERIC: expected>string ( obj -- str )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: f expected>string drop "end of input" ;
 | 
					
						
							|  |  |  | M: word expected>string name>> ;
 | 
					
						
							|  |  |  | M: string expected>string ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: unexpected error. | 
					
						
							|  |  |  |     "Expected " write
 | 
					
						
							| 
									
										
										
										
											2008-08-31 08:45:33 -04:00
										 |  |  |     dup want>> expected>string write
 | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  |     " but got " write
 | 
					
						
							| 
									
										
										
										
											2008-08-31 08:45:33 -04:00
										 |  |  |     got>> expected>string print ;
 | 
					
						
							| 
									
										
										
										
											2008-07-28 23:03:13 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: lexer-error error. | 
					
						
							|  |  |  |     [ lexer-dump ] [ error>> error. ] bi ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: lexer-error summary | 
					
						
							|  |  |  |     error>> summary ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: lexer-error compute-restarts | 
					
						
							|  |  |  |     error>> compute-restarts ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: lexer-error error-help | 
					
						
							|  |  |  |     error>> error-help ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: bad-effect summary | 
					
						
							|  |  |  |     drop "Bad stack effect declaration" ;
 | 
					
						
							| 
									
										
										
										
											2010-03-17 02:19:43 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-11 14:22:43 -05:00
										 |  |  | M: invalid-row-variable summary | 
					
						
							|  |  |  |     drop "Stack effect row variables can only occur as the first input or output" ;
 | 
					
						
							| 
									
										
										
										
											2010-03-17 02:19:43 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-11 14:22:43 -05:00
										 |  |  | M: row-variable-can't-have-type summary | 
					
						
							|  |  |  |     drop "Stack effect row variables cannot have a declared type" ;
 | 
					
						
							| 
									
										
										
										
											2008-02-27 20:23:22 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-23 18:55:54 -04:00
										 |  |  | M: bad-escape error. | 
					
						
							| 
									
										
										
										
											2014-06-04 11:41:41 -04:00
										 |  |  |     "Bad escape code: \\" write char>> write nl ;
 | 
					
						
							| 
									
										
										
										
											2008-09-24 22:23:26 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | M: bad-literal-tuple summary drop "Bad literal tuple" ;
 | 
					
						
							| 
									
										
										
										
											2008-12-03 10:33:32 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-30 10:02:55 -05:00
										 |  |  | M: not-a-mixin-class summary drop "Not a mixin class" ;
 | 
					
						
							| 
									
										
										
										
											2009-02-15 21:31:28 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-01 19:00:59 -04:00
										 |  |  | M: not-found-in-roots summary | 
					
						
							|  |  |  |     path>> "Cannot resolve vocab: " prepend ;
 | 
					
						
							| 
									
										
										
										
											2009-03-16 21:11:36 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-01 02:50:44 -05:00
										 |  |  | M: wrong-values summary drop "Quotation's stack effect does not match call site" ;
 | 
					
						
							| 
									
										
										
										
											2009-04-20 02:47:10 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-10 22:48:00 -05:00
										 |  |  | M: stack-effect-omits-dashes summary drop "Stack effect must contain “--”" ;
 | 
					
						
							| 
									
										
										
										
											2011-04-10 22:00:43 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-03 04:53:48 -04:00
										 |  |  | M: callsite-not-compiled summary | 
					
						
							|  |  |  |     drop "Caller not compiled with the optimizing compiler" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-10 22:00:43 -04:00
										 |  |  | { "threads" "debugger" } "debugger.threads" require-when |