filetree
filetree copied to clipboard
FileTree loading fails if README.md is missing
https://github.com/dalehenrich/filetree/blob/pharo6.0_dev/repository/MonticelloFileTree-Core.package/MCFileTreeStCypressReader.class/instance/addClassAndMethodDefinitionsFromEntry..st#L8
When README.md
is missing in the folder, then classComment
will stay uninitialized and then will fail when specifying comment
self addClassDefinitionFrom: classPropertiesDict comment: classComment withSqueakLineEndings.
maybe a fix would be to just add to the beginning of the method classComment := ''
, or changing the retrieval to soemthing like
classComment := entries
detect: [ :entry | entry name = 'README.md' ]
ifFound: [ :commentEntry | commentEntry contents ]
ifNone: [ '' ].
... the README.md
is required ... the creator of the filetree directory structure is supposed to create it correctly ...
well one can run into this issue very easily when e.g. a bad code subdirectory is specified in baseline. And considering the error message is withSqueakLineEndings
was sent to nil
it is not the most obvious thing to fix. I've ran into this maybe five times this year and every time I see it I am confused for a bit.
So alternative to fixing the code could be providing meaningful error message.
yeah meaningful error message is the ticket ... THX!