Skip to content

Commit

Permalink
make index not found an extension point
Browse files Browse the repository at this point in the history
  • Loading branch information
noha committed Nov 22, 2023
1 parent fb1530c commit 33bda34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Soil-Core/SoilBackupVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SoilBackupVisitor >> copyIndexAt: indexId segment: segmentId [
sourceSegment := source objectRepository segmentAt: segmentId.
sourceIndex := sourceSegment indexManager
loadIndexWithId: indexId
ifNone: [ Error signal: 'cannot find index with id ', indexId printString ].
ifNone: [ ^ self indexNotFound: indexId ].

"create an index of same kind and configuration in the target database"
targetSegment := target objectRepository segmentAt: segmentId.
Expand All @@ -51,6 +51,11 @@ SoilBackupVisitor >> copyIndexAt: indexId segment: segmentId [
close.
]

{ #category : #visiting }
SoilBackupVisitor >> indexNotFound: indexId [
Error signal: 'cannot find index with id ', indexId printString
]

{ #category : #initialization }
SoilBackupVisitor >> initialize [
super initialize.
Expand Down

0 comments on commit 33bda34

Please sign in to comment.