Skip to content

Commit 8df2de7

Browse files
committed
Switch invariant violation to logger error instead of C assert.
Signed-off-by: Christopher D. Leary <[email protected]>
1 parent e6dec20 commit 8df2de7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rcx/src/extmeasure.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ ext2dBox* extMeasure::addNew2dBox(dbNet* net,
260260
bb_ur = {ur[0], ur[1]};
261261
}
262262

263-
assert(d == 0 || d == 1);
263+
if (d != 0 && d != 1)
264+
logger_->error(RCX, 498, "Direction value is out of range.");
265+
264266
new (bb) ext2dBox(bb_ll, bb_ur, /*met=*/m, id, /*map=*/0, /*dir=*/d);
265267

266268
if (cntx) // context net

0 commit comments

Comments
 (0)