[squeak-dev] The Trunk: Kernel-mt.1283.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Dec 6 23:06:27 UTC 2019


Just curious: #matchesRegex: is defined in Regex-Core as well as RegexSyntaxError.

What are your goals to make changes like this?

In general, wouldn't generic error handling like this increase the risk of suppressing unexpected errors? :-)


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Mittwoch, 27. November 2019 10:25:56
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Kernel-mt.1283.mcz

Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1283.mcz

==================== Summary ====================

Name: Kernel-mt.1283
Author: mt
Time: 27 November 2019, 10:25:51.203363 am
UUID: 04694a24-76a1-a941-b664-645ffc7f27e6
Ancestors: Kernel-nice.1282

Removes Kernel -> Regex dependency.

=============== Diff against Kernel-nice.1282 ===============

Item was changed:
  ----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') -----
  valueSupplyingAnswers: aListOfPairs
         "evaluate the block using a list of questions / answers that might be called upon to
         automatically respond to Object>>confirm: or FillInTheBlank requests"

         ^self
                 on: ProvideAnswerNotification
                 do: [ :notification |
                         | caption |
                         caption := notification messageText withSeparatorsCompacted. "to remove new lines"
                         aListOfPairs
                                 detect:  [ :each |
                                         caption = each first
                                                 or: [ (caption includesSubstring: each first caseSensitive: false)
                                                 or: [ (each first match: caption)
                                                 or: [ (caption respondsTo: #matchesRegex:)
+                                                        and: [ [caption matchesRegex: each first] on: Error do: [false] ] ] ] ] ]
-                                                        and: [ [caption matchesRegex: each first] on: RegexSyntaxError do: [false] ] ] ] ] ]
                                 ifFound: [ :answer | notification resume: answer second ]
                                 ifNone: [
                                         (ProvideAnswerNotification signal: notification messageText)
                                                 ifNil: [ notification resume ]
                                                 ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191206/233af86b/attachment.html>


More information about the Squeak-dev mailing list