better error description
authorClaus Gittinger <cg@exept.de>
Thu, 03 Feb 2005 15:22:39 +0100
changeset 8734 8f38a9cf32d6
parent 8733 953001c5c40e
child 8735 531252ebbbe3
better error description
OpenError.st
--- a/OpenError.st	Thu Feb 03 10:04:03 2005 +0100
+++ b/OpenError.st	Thu Feb 03 15:22:39 2005 +0100
@@ -52,8 +52,15 @@
 !OpenError methodsFor:'printing & storing'!
 
 description
+    |description p|
 
-    ^ super description , ': ', self pathName
+    description := super description.
+
+    p := self pathName.
+    p isEmptyOrNil ifTrue:[
+        ^ description , ': (empty path)'
+    ].
+    ^ description , ': ', self pathName
 
     "
         '/tmp/nIcHtExIsTeNt' asFilename readStream
@@ -63,5 +70,5 @@
 !OpenError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.5 2005-02-02 11:01:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/OpenError.st,v 1.6 2005-02-03 14:22:39 cg Exp $'
 ! !