Skip to content

Commit

Permalink
Clearer error message for failed spaces (#3047)
Browse files Browse the repository at this point in the history
* Clearer error message for failed spaces

* Update ConvertSpace.cs
  • Loading branch information
JR-Morgan authored Nov 14, 2023
1 parent 217fecb commit 1846631
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public ApplicationObject SpaceToNative(Space speckleSpace)
return appObj;

// Determine Space Location
if (speckleSpace.basePoint is null)
{
appObj.Update(status: ApplicationObject.State.Failed, logItem: "Space Base Point was null");
return appObj;
}

var level = ConvertLevelToRevit(speckleSpace.level, out _);
var basePoint = PointToNative(speckleSpace.basePoint);
var upperLimit = ConvertLevelToRevit(speckleSpace.topLevel, out _);
Expand Down

0 comments on commit 1846631

Please sign in to comment.