pynbody / genetIC

The GM initial conditions generator
GNU General Public License v3.0
21 stars 8 forks source link

Adding errors #52

Closed Martin-Rey closed 5 years ago

Martin-Rey commented 5 years ago

Hi all,

This is a very minor PR adding more explicit error messages for uses cases I encountered recently.

Namely, linear modifications are defined from flags on the finest grid. If none are defined, it could lead to unhelpful segmentation faults or undefined behaviour when calling "calculate" or "modify".

Since the code does not handle "no flags on finest grid + linear modifications", I think it is better to throw an explicit error.

(Sry for the name of the branch, it is not, I hope, adding errors, just error messages :) ) Martin