OpenError.st
branchjv
changeset 18011 deb0c3355881
parent 17993 956342c369a2
parent 14602 b99d699beb17
child 18075 bd252c0beac9
--- a/OpenError.st	Thu Dec 20 11:48:59 2012 +0000
+++ b/OpenError.st	Sat Jan 19 01:30:00 2013 +0000
@@ -56,30 +56,32 @@
 !OpenError methodsFor:'printing & storing'!
 
 description
-    |description p|
+    "lazy initialization - the text is not needed for cought exceptions"
 
-    description := super description.
+    messageText isNil ifTrue:[
+        self initializeMessageText
+    ].
+    ^ super description
+!
+
+initializeMessageText
+    "for lazy initialization - the text is not needed for cought exceptions"
 
-    p := self pathName.
-    p notEmptyOrNil ifTrue:[
-        description := description, ': ', p printString
+    messageText := (' : ' , (OperatingSystem errorTextForNumber:errorCode))
+!
+
+messageText
+    "lazy initialization - the text is not needed for cought exceptions"
+
+    messageText isNil ifTrue:[
+        self initializeMessageText
     ].
-    ^ description 
-
-    "
-        '/tmp/nIcHtExIsTeNt' asFilename readStream
-    "
+    ^ messageText
 ! !
 
 !OpenError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.10 2012/11/14 22:31:19 stefan Exp $'
-!
-
-version_SVN
-    ^ '$Id: OpenError.st 10876 2012-11-30 17:19:23Z vranyj1 $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.11 2012-12-17 19:37:12 cg Exp $'
 ! !
 
-
-