[Cuis-dev] [FIX] Handle package scanning errors in PackageInstaller

Mariano Montone marianomontone at gmail.com
Mon Sep 19 13:59:45 PDT 2022


Juan, Hernan,


this changeset makes the PackageInstaller handle errors when scanning 
package files.

This fixes the problem with "Missing parserClass preference" mentioned 
in the mailing list.

Also, I think this is the right thing to do.


        Mariano
-------------- next part --------------
'From Cuis 6.0 [latest update: #5488] on 19 September 2022 at 5:52:07 pm'!

!PackageInstaller methodsFor: 'actions' stamp: 'MM 9/19/2022 16:16:07'!
collectPackagesFromDirectory: aDirectory

	"Create a collection of PackageSpec with package files found in aDirectory."
	
	|packageFiles|
	
	packageFiles _ aDirectory fileNamesMatching: '*.pck.st'.
		
	packageFiles do: [:packageFile | | codePackage |
		[codePackage _ CodePackageFile onFileEntry: (aDirectory // packageFile).
			self addPackage: codePackage] 
		on: Error
		do: [:e | Transcript nextPutAll: 'Warning: Error scanning the package ', packageFile, '. Ignoring ...'; newLine]]! !



More information about the Cuis-dev mailing list