better error message if source access is not possible (in compare)
authorClaus Gittinger <cg@exept.de>
Thu, 07 Dec 2000 14:49:44 +0100
changeset 2885 7f4a298ca5ae
parent 2884 587baa691c68
child 2886 f95c04333771
better error message if source access is not possible (in compare)
BrowserView.st
--- a/BrowserView.st	Thu Dec 07 14:17:55 2000 +0100
+++ b/BrowserView.st	Thu Dec 07 14:49:44 2000 +0100
@@ -4132,6 +4132,8 @@
     "open a diff-textView comparing the current (in-image) version
      with the some version found in the repository."
 
+    |info mod|
+
     currentClass isLoaded ifFalse:[
         self warn:'cannot compare unloaded classes.'.
         ^ self.
@@ -4220,11 +4222,15 @@
             self busyLabel:msg with:nm.
 
             aStream isNil ifTrue:[
-                self warn:'could not extract source from repository'.
+                info := mgr sourceInfoOfClass:currentClass.
+                info notNil ifTrue:[
+                    mod := info at:#module ifAbsent:'??'.
+                ].
+                self warn:(resources string:'Could not extract source from repository (source module: ''%1'')' with:(mod ? '??')).
                 ^ self
             ].
             aStream class readErrorSignal handle:[:ex |
-                self warn:('read error while reading extracted source\\' , ex errorString) withCRs.
+                self warn:('Read error while reading extracted source\\' , ex errorString) withCRs.
                 aStream close.
                 ^ self
             ] do:[
@@ -13826,6 +13832,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.653 2000-12-06 18:40:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.654 2000-12-07 13:49:44 cg Exp $'
 ! !
 BrowserView initialize!