fix: tolerate missing Ortho DataLinks rows in DryRun
This commit is contained in:
@@ -164,6 +164,8 @@ internal sealed class PlantObjectReader : IPlantObjectReader
|
|||||||
if (dataLinks is null) return Array.Empty<PlantObjectSnapshot>();
|
if (dataLinks is null) return Array.Empty<PlantObjectSnapshot>();
|
||||||
|
|
||||||
var snapshots = new List<PlantObjectSnapshot>();
|
var snapshots = new List<PlantObjectSnapshot>();
|
||||||
|
try
|
||||||
|
{
|
||||||
foreach (var rowId in dataLinks.SelectAcPpRowIds(document.Database))
|
foreach (var rowId in dataLinks.SelectAcPpRowIds(document.Database))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -192,6 +194,12 @@ internal sealed class PlantObjectReader : IPlantObjectReader
|
|||||||
// Keep the read path best-effort; no write operation is attempted.
|
// Keep the read path best-effort; no write operation is attempted.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (DLException)
|
||||||
|
{
|
||||||
|
// An Ortho sheet can have no direct Piping DataLinks rows. The caller
|
||||||
|
// receives an empty read-only result rather than a command failure.
|
||||||
|
}
|
||||||
return snapshots.OrderBy(x => x.SnapshotId, StringComparer.Ordinal).ToArray();
|
return snapshots.OrderBy(x => x.SnapshotId, StringComparer.Ordinal).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user