errorStrings when raising exceptions.
--- a/Class.st Wed Jul 24 17:04:14 2002 +0200
+++ b/Class.st Wed Jul 24 17:05:59 2002 +0200
@@ -2294,7 +2294,7 @@
self isLoaded ifFalse:[
^ FileOutErrorSignal
raiseRequestWith:self
- errorString:'will not fileOut unloaded classes'
+ errorString:' - will not fileOut unloaded class: ', self name
].
fileName := fileNameString asFilename.
@@ -2346,7 +2346,7 @@
sameFile ifTrue:[
^ FileOutErrorSignal
raiseRequestWith:fileNameString
- errorString:('may not overwrite sourcefile:', fileNameString)
+ errorString:(' - may not overwrite sourcefile:', fileNameString)
].
savFilename := Filename newTemporary.
@@ -2385,7 +2385,7 @@
].
^ FileOutErrorSignal
raiseRequestWith:newFileName
- errorString:('cannot create file:', newFileName name)
+ errorString:(' - cannot create file:', newFileName name)
].
self fileOutOn:aStream.
aStream close.
@@ -2510,13 +2510,14 @@
aStream isNil ifTrue:[
^ FileOutErrorSignal
raiseRequestWith:fileName
- errorString:('cannot create file:', fileName)
+ errorString:(' - cannot create file:', fileName)
].
self fileOutOn:aStream.
aStream close
"
self fileOutIn:'/tmp'
+ self fileOutIn:'/tmp/doesNotExistBla'
self fileOutIn:'/tmp' asFilename
"
@@ -2573,7 +2574,7 @@
self isLoaded ifFalse:[
^ FileOutErrorSignal
raiseRequestWith:self
- errorString:'will not fileOut unloaded classes'
+ errorString:' - will not fileOut unloaded class: ', self name
].
meta := self theMetaclass.
@@ -2869,7 +2870,7 @@
aStream isNil ifTrue:[
^ FileOutErrorSignal
raiseRequestWith:fileName
- errorString:('cannot create file:', fileName)
+ errorString:(' - cannot create file:', fileName)
].
aStream binary.
@@ -2965,7 +2966,7 @@
self isLoaded ifFalse:[
^ FileOutErrorSignal
raiseRequestWith:self
- errorString:'will not fileOut unloaded classes'
+ errorString:' - will not fileOut unloaded class: ', self name
].
fileName := fileNameOrString asFilename.
@@ -2974,7 +2975,7 @@
aStream isNil ifTrue:[
^ FileOutErrorSignal
raiseRequestWith:fileName
- errorString:('cannot create file:', fileName name)
+ errorString:(' - cannot create file: ', fileName name)
].
self fileOutXMLOn:aStream.
aStream close.
@@ -2982,8 +2983,6 @@
"
Class fileOutXMLAs:'test.xml'
"
-
-
!
fileOutXMLDefinitionOn:aStream
@@ -3092,7 +3091,7 @@
self isLoaded ifFalse:[
^ FileOutErrorSignal
raiseRequestWith:self
- errorString:'will not fileOut unloaded classes'
+ errorString:' - will not fileOut unloaded class: ', self name
].
meta := self class.
@@ -3120,7 +3119,7 @@
no source available - trigger an error
"
FileOutErrorSignal
- raiseRequestWith:'no source for class ' , self name , ' available. Cannot fileOut'.
+ raiseRequestWith:' - no source for class: '.
^ self
].
"
@@ -4705,5 +4704,5 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.412 2002-07-24 08:32:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.413 2002-07-24 15:05:59 stefan Exp $'
! !
--- a/ClassDescription.st Wed Jul 24 17:04:14 2002 +0200
+++ b/ClassDescription.st Wed Jul 24 17:05:59 2002 +0200
@@ -1929,7 +1929,7 @@
aStream isNil ifTrue:[
^ FileOutErrorSignal
raiseRequestWith:fileName
- errorString:('cannot create file:', fileName pathName)
+ errorString:(' - cannot create file: ', fileName pathName)
].
self fileOutCategory:aCategory on:aStream.
@@ -2011,7 +2011,7 @@
source isNil ifTrue:[
FileOutErrorSignal
raiseRequestWith:self
- errorString:'no source for method: ', (aMethod displayString)
+ errorString:' - no source for method: ', (aMethod displayString)
] ifFalse:[
aStream nextChunkPut:source.
].
@@ -2078,33 +2078,33 @@
selector := self selectorAtMethod:aMethod.
selector notNil ifTrue:[
- fileName := (self name , '-' , selector, '.st') asFilename.
- fileName makeLegalFilename.
-
- "
- this test allows a smalltalk to be built without Projects/ChangeSets
- "
- Project notNil ifTrue:[
- fileName := Project currentProjectDirectory asFilename construct:fileName name.
- ].
-
- "
- if file exists, save original in a .sav file
- "
- fileName exists ifTrue:[
- fileName copyTo:(fileName withSuffix: 'sav')
- ].
-
- fileName := fileName name.
-
- aStream := FileStream newFileNamed:fileName.
- aStream isNil ifTrue:[
- ^ FileOutErrorSignal
- raiseRequestWith:fileName
- errorString:('cannot create file:', fileName)
- ].
- self fileOutMethod:aMethod on:aStream.
- aStream close
+ fileName := (self name , '-' , selector, '.st') asFilename.
+ fileName makeLegalFilename.
+
+ "
+ this test allows a smalltalk to be built without Projects/ChangeSets
+ "
+ Project notNil ifTrue:[
+ fileName := Project currentProjectDirectory asFilename construct:fileName name.
+ ].
+
+ "
+ if file exists, save original in a .sav file
+ "
+ fileName exists ifTrue:[
+ fileName copyTo:(fileName withSuffix: 'sav')
+ ].
+
+ fileName := fileName name.
+
+ aStream := FileStream newFileNamed:fileName.
+ aStream isNil ifTrue:[
+ ^ FileOutErrorSignal
+ raiseRequestWith:fileName
+ errorString:(' - cannot create file: ', fileName)
+ ].
+ self fileOutMethod:aMethod on:aStream.
+ aStream close
]
"Modified: / 1.4.1997 / 16:00:57 / stefan"
@@ -2138,7 +2138,7 @@
source isNil ifTrue:[
FileOutErrorSignal
raiseRequestWith:self
- errorString:('no source for method: ' ,
+ errorString:(' - no source for method: ' ,
self name , '>>' ,
(self selectorAtMethod:aMethod))
] ifFalse:[
@@ -2225,7 +2225,7 @@
source isNil ifTrue:[
FileOutErrorSignal
raiseRequestWith:self
- errorString:'no source for method: ', (aMethod displayString)
+ errorString:' - no source for method: ', (aMethod displayString)
] ifFalse:[
aStream nextPutAll:' <body>'.
self fileOutXMLString:source on:aStream.
@@ -2235,8 +2235,6 @@
aStream nextPutLine:'</methods>'.
]
]
-
-
!
fileOutXMLMethod:aMethod on:aStream
@@ -2264,15 +2262,13 @@
source isNil ifTrue:[
FileOutErrorSignal
raiseRequestWith:self
- errorString:'no source for method: ', (aMethod displayString)
+ errorString:' - no source for method: ', (aMethod displayString)
] ifFalse:[
aStream nextPutAll:' <body>'.
self fileOutXMLString:source on:aStream.
aStream nextPutLine:' </body>'.
].
aStream nextPutLine:'</methods>'.
-
-
!
fileOutXMLString:someString on:aStream
@@ -3971,6 +3967,6 @@
!ClassDescription class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.140 2002-07-24 09:16:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.141 2002-07-24 15:05:25 stefan Exp $'
! !
ClassDescription initialize!