Convert quiksolv assertion into exception and handle appropriately.