replace all asserts with 'error_assert's