From 33bda342d5da75ec060ca74585cdf55cec7311b4 Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Wed, 22 Nov 2023 11:54:24 +0100 Subject: [PATCH] make index not found an extension point --- src/Soil-Core/SoilBackupVisitor.class.st | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Soil-Core/SoilBackupVisitor.class.st b/src/Soil-Core/SoilBackupVisitor.class.st index c87191db..6d66f660 100644 --- a/src/Soil-Core/SoilBackupVisitor.class.st +++ b/src/Soil-Core/SoilBackupVisitor.class.st @@ -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. @@ -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.