replace some exit by raising an error See merge request !133 (cherry picked from commit d91ee751) 743bd45f replace some exit by raising an error