Skip to content

Adding comments + extend default error - #21

Merged
noha merged 4 commits into
noha:integrate-stefs-patchfrom
Ducasse:master
Feb 24, 2026
Merged

Adding comments + extend default error#21
noha merged 4 commits into
noha:integrate-stefs-patchfrom
Ducasse:master

Conversation

@Ducasse

@Ducasse Ducasse commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Make sure that when a path element is not defined the error is passed the element name so that we can build advanced error handing (similar to DNU)

noha and others added 4 commits December 18, 2025 10:51
Use special string method for mustache when it turns an object into a…
added pharo 13 and alpha builds
Make sure that when a path element is not defined the error is passed the element name so that we can build advanced error handing (similar to DNU)

{ #category : '*mustache-core' }
Object >> mustacheDefaultWhenLookupFails [
Object >> mustacheDefaultWhenLookupFails: failingPartString [

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need change the sender of this method as well. Now we get a DNU

^ [ self perform: aString asSymbol ]
on: MessageNotUnderstood
do: [ :err | self mustacheLookupComplex: aString ]
^ (self respondsTo: aString asSymbol)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to change that. Asking before performing is way slower and unnecessary. I think a piece of code should support the intended case first. Just execution method assumes that it goes well most of the time so no check needed, just a guard. Defensively asking before is rather the exception that it often does not respondTo: . A short check turns out this new version is more than 5 times slower

@noha
noha changed the base branch from master to integrate-stefs-patch February 24, 2026 07:54
@noha

noha commented Feb 24, 2026

Copy link
Copy Markdown
Owner

@Ducasse I integrate and fix it without the perform change

@noha
noha merged commit c0806a2 into noha:integrate-stefs-patch Feb 24, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants