convert errors on tests to exceptiont