OpenError.st
changeset 14602 b99d699beb17
parent 14515 d67e2c9e2acb
child 15499 8793d02e2da4
child 18011 deb0c3355881
--- a/OpenError.st	Mon Dec 17 19:28:33 2012 +0100
+++ b/OpenError.st	Mon Dec 17 20:37:12 2012 +0100
@@ -56,23 +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 $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.11 2012-12-17 19:37:12 cg Exp $'
 ! !
+