Revert "change assert to throw with proper error message"

This reverts commit 60d38e5c0960014f07174dad40911e11a9190a5c.