# HG changeset patch # User Stefan Vogel # Date 933796034 -7200 # Node ID a436888f8514be61f5f13a95811331b1cdaa42fe # Parent 2cd0c20d897090c4e2ebad37a25a49ab70967992 Add #description, #creator diff -r 2cd0c20d8970 -r a436888f8514 Signal.st --- a/Signal.st Wed Aug 04 21:46:09 1999 +0200 +++ b/Signal.st Wed Aug 04 21:47:14 1999 +0200 @@ -11,10 +11,10 @@ " Object subclass:#Signal - instanceVariableNames:'mayProceed notifierString nameClass message handlerBlock parent' - classVariableNames:'' - poolDictionaries:'' - category:'Kernel-Exceptions' + instanceVariableNames:'mayProceed notifierString nameClass message handlerBlock parent' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Exceptions' ! !Signal class methodsFor:'documentation'! @@ -179,70 +179,9 @@ !Signal methodsFor:'accessing'! errorString - "return the notifier string. - If the notifier string starts with space, prepend - the parents notifier string" - - notifierString isNil ifTrue:[ - ^ parent errorString - ] ifFalse:[ - (notifierString size > 0 - and:[notifierString first == (Character space)]) ifTrue:[ - ^ parent errorString, notifierString - ] ifFalse:[ - ^ notifierString - ]. - ] - - " - Object errorSignal errorString - " - - "Modified: / 12.3.1998 / 15:04:41 / stefan" -! - -errorStringExtra:extraString with:aParameter - "used when raising with a given error string and/or parameter; - if the errorString starts with a space, it is appended to the receivers - notifier string; if it ends with a space, it is prepended. - Otherwise, the extraString is returned. - If no extraString is given, use the signals default errorString." - - |t| + "#errorString is deprecated, use description instead" - (self inheritsFrom:Object userNotificationSignal) ifTrue:[ - "/ all userNotifications pass the extraString unchanged. - ^ extraString - ]. - - extraString isNil ifTrue:[ - t := self errorString - ] ifFalse:[ - t := extraString. - (extraString endsWith:Character space) ifTrue:[ - t := extraString, self errorString - ] ifFalse:[ - (extraString startsWith:Character space) ifTrue:[ - t := self errorString, extraString - ] - ]. - ]. - ^ t. - -"/ aParameter isNil ifTrue:[ -"/ ^ t -"/ ]. -"/ -"/ (t startsWith:' ') ifTrue:[ -"/ ^ aParameter printString , t -"/ ]. -"/ (t endsWith:' ') ifTrue:[ -"/ ^ t , aParameter printString -"/ ]. -"/ ^ t - - "Modified: / 25.3.1997 / 12:12:37 / cg" - "Created: / 12.3.1998 / 15:11:31 / stefan" + ^ self description ! handlerBlock @@ -352,6 +291,28 @@ !Signal methodsFor:'printing'! +description + "return the notifier string. + If the notifier string starts with space, prepend + the parents notifier string" + + notifierString isNil ifTrue:[ + ^ parent errorString + ] ifFalse:[ + (notifierString startsWith:Character space) ifTrue:[ + ^ parent description, notifierString + ] ifFalse:[ + ^ notifierString + ]. + ] + + " + Object errorSignal description + " + + "Modified: / 12.3.1998 / 15:04:41 / stefan" +! + printOn:aStream "append a printed representation of the receiver on aStream" @@ -792,5 +753,5 @@ !Signal class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.70 1999-08-04 19:06:02 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.71 1999-08-04 19:47:14 stefan Exp $' ! !