return own error objects rather than RuntimeError