'From Cuis 1.0 of 28 November 2009 [latest update: #337] on 9 December 2009 at 11:24:05 pm'!
!classDefinition: #MessageNotUnderstood category: #'System-Exceptions Kernel'!
Error subclass: #MessageNotUnderstood
	instanceVariableNames: 'message receiver reachedDefaultHandler '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Kernel'!
!classDefinition: #NotYetImplemented category: #'System-Exceptions Kernel'!
Error subclass: #NotYetImplemented
	instanceVariableNames: 'receiverClass selector context'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Kernel'!

!NotYetImplemented commentStamp: 'jcg 10/21/2009 01:20' prior: 0!
Sent by #notYetImplemented.  Better than the age-old behavior of opening a notifier window, because this can be caught and handled.
!

!classDefinition: #OutOfMemory category: #'System-Exceptions Kernel'!
Error subclass: #OutOfMemory
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Kernel'!

!OutOfMemory commentStamp: '<historical>' prior: 0!
OutOfMemory is signaled when an allocation fails due to not having enough memory. Its default action signals the low-space semaphore.!

!classDefinition: #ProvideAnswerNotification category: #'System-Exceptions Kernel'!
Notification subclass: #ProvideAnswerNotification
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Kernel'!
!classDefinition: #SyntaxErrorNotification category: #'System-Exceptions Extensions'!
Error subclass: #SyntaxErrorNotification
	instanceVariableNames: 'inClass code category doitFlag errorMessage location debugger '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Extensions'!

!Object methodsFor: 'user interface' stamp: 'jmv 12/9/2009 23:16'!
notYetImplemented
	NotYetImplemented signal! !


!Behavior methodsFor: 'instance creation' stamp: 'jmv 12/9/2009 23:17'!
basicNew
	"Primitive. Answer an instance of the receiver (which is a class) with no 
	indexable variables. Fail if the class is indexable. Essential. See Object 
	documentation whatIsAPrimitive."

	<primitive: 70>
	self isVariable ifTrue: [ ^ self basicNew: 0 ].
	"space must be low"
	OutOfMemory signal.
	^ self basicNew  "retry if user proceeds"
! !

!Behavior methodsFor: 'instance creation' stamp: 'jmv 12/9/2009 23:17'!
basicNew: anInteger 
	"Primitive. Answer an instance of the receiver (which is a class) with the 
	number of indexable variables specified by the argument, anInteger. Fail 
	if the class is not indexable or if the argument is not a positive Integer. 
	Essential. See Object documentation whatIsAPrimitive."

	<primitive: 71>
	self isVariable ifFalse: [
		self error: self printString, ' cannot have variable sized instances'].
	(anInteger isInteger and: [anInteger >= 0]) ifTrue: [
		"arg okay; space must be low"
		OutOfMemory signal.
		^ self basicNew: anInteger  "retry if user proceeds"
	].
	self primitiveFailed! !


!CompiledMethod class methodsFor: 'instance creation' stamp: 'jmv 12/9/2009 23:17'!
newMethod: numberOfBytes header: headerWord 
	"Primitive. Answer an instance of me. The number of literals (and other 
	information) is specified the headerWord. The first argument specifies 
	the number of fields for bytecodes in the method. Fail if either 
	argument is not a SmallInteger, or if numberOfBytes is negative. Once 
	the header of a method is set by this primitive, it cannot be changed in 
	any way. Essential. See Object documentation whatIsAPrimitive."

	<primitive: 79>
	(numberOfBytes isInteger and:
	 [headerWord isInteger and:
	 [numberOfBytes >= 0]]) ifTrue: [
		"args okay; space must be low"
		OutOfMemory signal.
		"retry if user proceeds"
		^ self newMethod: numberOfBytes header: headerWord
	].
	^self primitiveFailed! !


!Interval class methodsFor: 'instance creation' stamp: 'jmv 12/9/2009 23:18'!
new
	"Primitive. Create and answer with a new instance of the receiver
	(a class) with no indexable fields. Fail if the class is indexable. Override
	SequenceableCollection new. Essential. See Object documentation
	whatIsAPrimitive."

	<primitive: 70>
	self isVariable ifTrue: [ ^ self new: 0 ].
	"space must be low"
	OutOfMemory signal.
	^ self new  "retry if user proceeds"
! !


!MessageNotUnderstood methodsFor: 'exceptionBuilder' stamp: 'ab 8/22/2003 11:56'!
messageText
	"Return an exception's message text."

	^messageText == nil
		ifTrue:
			[message == nil
				ifTrue: [super messageText]
				ifFalse: [message lookupClass printString, '>>', message selector asString]]
		ifFalse: [messageText]! !

!MessageNotUnderstood methodsFor: 'exceptionDescription' stamp: 'eem 12/19/2008 10:42'!
defaultAction
	reachedDefaultHandler := true.
	super defaultAction! !

!MessageNotUnderstood methodsFor: 'initialize-release' stamp: 'eem 12/19/2008 10:41'!
initialize
	super initialize.
	reachedDefaultHandler := false! !

!MessageNotUnderstood methodsFor: 'accessing' stamp: 'eem 12/19/2008 10:42'!
reachedDefaultHandler
	^reachedDefaultHandler! !


!NotYetImplemented methodsFor: 'accessing' stamp: 'jcg 10/21/2009 00:45'!
receiverClass
	^receiverClass! !

!NotYetImplemented methodsFor: 'accessing' stamp: 'jcg 10/21/2009 00:45'!
selector
	^selector! !

!NotYetImplemented methodsFor: 'initialize' stamp: 'jcg 10/21/2009 00:41'!
receiverClass: cls selector: sel
	receiverClass := cls.
	selector := sel.! !

!NotYetImplemented methodsFor: 'handling' stamp: 'jcg 10/21/2009 01:19'!
defaultAction
	self inform: 'Not yet implemented (', self messageText, ')'! !


!NotYetImplemented class methodsFor: 'signaling' stamp: 'jcg 10/21/2009 00:55'!
signal
	"Call only from #notYetImplemented.  Find the context that sent #nYI... this is the method that needs to be implemented."
	| ctxt ex |
	ctxt := thisContext sender sender.
	ex := self new.
	ex receiverClass: ctxt receiver class selector: ctxt selector.
	ex messageText: ctxt printString.
	ex signal.
		! !


!OutOfMemory methodsFor: 'as yet unclassified' stamp: 'ar 2/10/2007 10:43'!
defaultAction
	Smalltalk signalLowSpace.! !

!OutOfMemory methodsFor: 'as yet unclassified' stamp: 'ar 2/10/2007 10:42'!
isResumable
	^true! !


!ZeroDivide class methodsFor: 'signaling' stamp: 'GabrielOmarCotelli 6/6/2009 17:12'!
signalWithDividend: aDividend

	^(self dividend: aDividend) signal! !

!classDefinition: #SyntaxErrorNotification category: #'System-Exceptions Extensions'!
Error subclass: #SyntaxErrorNotification
	instanceVariableNames: 'inClass code category doitFlag errorMessage location'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Extensions'!
!classDefinition: #MessageNotUnderstood category: #'System-Exceptions Kernel'!
Error subclass: #MessageNotUnderstood
	instanceVariableNames: 'message receiver reachedDefaultHandler'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'System-Exceptions Kernel'!
