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

Marcel Taeumel marcel.taeumel at hpi.de
Sun Dec 8 15:23:29 UTC 2019


> What are your goals to make changes like this?

So close to a release, my goals are to not add new dependencies between packages.

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

The very meaning of #valueSupplyingAnswers: is to suppress interactive stuff. Maybe we could add a Transcript output to log those errors. Also, this mechanism deserves to be re-designed. There is a lot of things going on in this method. We need better extension points for this and tests and ... :-)

Best,
Marcel
Am 07.12.2019 00:06:37 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
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 [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/20191208/1ddd7097/attachment.html>


More information about the Squeak-dev mailing list