The Trunk: Monticello-ct.740.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-ct.740.mcz

commits-2
Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ct.740.mcz

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

Name: Monticello-ct.740
Author: ct
Time: 12 April 2021, 10:18:26.02269 pm
UUID: c0c2562b-e801-ef4c-8628-3d352c513e0a
Ancestors: Monticello-mt.736

Introduces MCPackageNotFound exception and usees it in MCRepository versions lookup. I would like to catch this error in [1, 2, 3].

[1] https://github.com/LinqLover/TelegramSmalltalkBot/blob/03be8437dfd9b9e98715d4fcc42fcea13cc90ae4/src/BaselineOfTelegramSmalltalkBot.package/BaselineOfTelegramSmalltalkBot.class/instance/depMergeVersion..st
[2] https://github.com/LinqLover/TelegramBot/blob/e2d248eff9e24ca9a0423585b18d04c1191a725b/src/BaselineOfTelegramBot.package/BaselineOfTelegramBot.class/instance/depInbox..st
[3] https://github.com/LinqLover/SimulationStudio/blob/743d48fdc10a70d572b1070b23c826f43c0dfb23/packages/BaselineOfSimulationStudio.package/BaselineOfSimulationStudio.class/instance/depInbox..st

=============== Diff against Monticello-mt.736 ===============

Item was added:
+ Error subclass: #MCPackageNotFound
+ instanceVariableNames: 'repository packageName'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Repositories'!

Item was added:
+ ----- Method: MCPackageNotFound class>>signalForRepository:packageName: (in category 'signaling') -----
+ signalForRepository: aRepository packageName: aString
+
+ ^ self new
+ repository: aRepository packageName: aString;
+ signal!

Item was added:
+ ----- Method: MCPackageNotFound>>messageText (in category 'printing') -----
+ messageText
+
+ ^ messageText ifNil: ['{1} not found in {2}' translated format: {self packageName. self repository}]!

Item was added:
+ ----- Method: MCPackageNotFound>>packageName (in category 'accessing') -----
+ packageName
+
+ ^ packageName!

Item was added:
+ ----- Method: MCPackageNotFound>>repository (in category 'accessing') -----
+ repository
+
+ ^ repository!

Item was added:
+ ----- Method: MCPackageNotFound>>repository:packageName: (in category 'accessing') -----
+ repository: aRepository packageName: aString
+
+ repository := aRepository.
+ packageName := aString.!

Item was changed:
  ----- Method: MCRepository>>highestNumberedVersionNameForPackageNamed: (in category 'versions') -----
  highestNumberedVersionNameForPackageNamed: aString
  ^ (self versionNamesForPackageNamed: aString)
+ ifEmpty: [MCPackageNotFound signalForRepository: self packageName: aString]
- ifEmpty: [ self error: aString , ' not found in ' , self asString ]
  ifNotEmptyDo:
  [ : versionNames | versionNames detectMax:
  [ : each | each versionNumber ] ]!