elastic-db-tools/src/main/java/com/microsoft/azure/elasticdb/shard/storeops/map/AddShardOperation.java [270:307]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public void handleUndoGlobalPostLocalExecuteError(StoreResults result) {
        if (result.getResult() == StoreResult.ShardMapDoesNotExist) {
            // Remove shard map from cache.
            this.getShardMapManager().getCache().deleteShardMap(shardMap);
        }

        // Possible errors are:
        // StoreResult.ShardMapDoesNotExist
        // StoreResult.StoreVersionMismatch
        // StoreResult.MissingParametersForStoredProcedure
        throw StoreOperationErrorHandler.onShardMapErrorGlobal(result, shardMap, shard, ShardManagementErrorCategory.ShardMap,
                StoreOperationErrorHandler.operationNameFromStoreOperationCode(this.getOperationCode()),
                StoreOperationRequestBuilder.SP_BULK_OPERATION_SHARDS_GLOBAL_END);
    }

    /**
     * Source location of error.
     */
    @Override
    protected ShardLocation getErrorSourceLocation() {
        return shard.getLocation();
    }

    /**
     * Target location of error.
     */
    @Override
    protected ShardLocation getErrorTargetLocation() {
        return shard.getLocation();
    }

    /**
     * Error category for error.
     */
    @Override
    protected ShardManagementErrorCategory getErrorCategory() {
        return ShardManagementErrorCategory.ShardMap;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elastic-db-tools/src/main/java/com/microsoft/azure/elasticdb/shard/storeops/map/RemoveShardOperation.java [250:287]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public void handleUndoGlobalPostLocalExecuteError(StoreResults result) {
        if (result.getResult() == StoreResult.ShardMapDoesNotExist) {
            // Remove shard map from cache.
            this.getShardMapManager().getCache().deleteShardMap(shardMap);
        }

        // Possible errors are:
        // StoreResult.ShardMapDoesNotExist
        // StoreResult.StoreVersionMismatch
        // StoreResult.MissingParametersForStoredProcedure
        throw StoreOperationErrorHandler.onShardMapErrorGlobal(result, shardMap, shard, ShardManagementErrorCategory.ShardMap,
                StoreOperationErrorHandler.operationNameFromStoreOperationCode(this.getOperationCode()),
                StoreOperationRequestBuilder.SP_BULK_OPERATION_SHARDS_GLOBAL_END);
    }

    /**
     * Source location of error.
     */
    @Override
    protected ShardLocation getErrorSourceLocation() {
        return shard.getLocation();
    }

    /**
     * Target location of error.
     */
    @Override
    protected ShardLocation getErrorTargetLocation() {
        return shard.getLocation();
    }

    /**
     * Error category for error.
     */
    @Override
    protected ShardManagementErrorCategory getErrorCategory() {
        return ShardManagementErrorCategory.ShardMap;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



