--- a/GenericException.st Mon Feb 05 00:40:49 2018 +0100
+++ b/GenericException.st Tue Feb 06 17:41:35 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -1295,9 +1297,9 @@
errorString
"return the errorString passsed with the signal raise
(or nil, if there was none).
- #errorString is deprecated, use description instead"
-
- <resource:#obsolete>
+ #errorString is the same as description,
+ which returns the messageText plain or appended or prepended to the
+ classes description string."
^ self description
@@ -1308,9 +1310,10 @@
"set the messageText.
If it starts with a space, the signals messageText is prepended,
if it ends with a space, it is appended.
- #errorString: is deprecated, use messageText: instead"
-
- <resource:#obsolete>
+
+ #errorString: does the same as messageText:,
+ but should be used for errors and exceptions,
+ whereas messageText: should be used for notifications and queries"
messageText := aString
@@ -1966,20 +1969,22 @@
!GenericException methodsFor:'printing & storing'!
description
- "return the description string of the signal"
+ "return the description string of the signal/exception.
+ If a messageText has been set, that is returned plain, appended or prepended to the
+ classes description string."
|sigDescr|
sigDescr := self creator description.
(messageText isNil or:[messageText isString not])
ifTrue:[
- ^ sigDescr
+ ^ sigDescr
].
(messageText startsWith:Character space) ifTrue:[
- ^ sigDescr, messageText.
+ ^ sigDescr, messageText.
].
(messageText endsWith:Character space) ifTrue:[
- ^ messageText, sigDescr.
+ ^ messageText, sigDescr.
].
^ messageText