--- a/SystemBrowser.st Wed Oct 01 18:00:01 2003 +0200
+++ b/SystemBrowser.st Wed Oct 01 18:02:36 2003 +0200
@@ -3606,6 +3606,7 @@
|searchBlock|
searchBlock := self searchBlockForCode:aCodeString isMethod:isMethod.
+ searchBlock isNil ifTrue:[ ^ nil].
^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
!
@@ -4138,16 +4139,21 @@
searchBlockForCode:aCodeString isMethod:isMethod
"return a block to search for a pice of code (intelligent search)."
- |searchTree searcher messages searchBlock foundMatch|
+ |errAction searchTree searcher messages searchBlock foundMatch|
+
+ errAction := [:str :pos |
+ Dialog warn:'Error during parse: ' , str , ' (position ' , pos printString , ')'.
+ ^ nil
+ ].
isMethod ifTrue:[
searchTree := RBParser
parseRewriteMethod:aCodeString
- onError: [:str :pos | Transcript showCR:str. Transcript showCR:pos. nil].
+ onError: errAction.
] ifFalse:[
searchTree := RBParser
parseRewriteExpression:aCodeString
- onError: [:str :pos | Transcript showCR:str. Transcript showCR:pos. nil].
+ onError: errAction.
].
searchTree isMessage ifTrue:[
@@ -5109,7 +5115,7 @@
!SystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.196 2003-08-29 15:50:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.197 2003-10-01 16:02:36 cg Exp $'
! !
SystemBrowser initialize!