bachlab / PsPM

A matlab suite for Psycho-Physiological Modelling
GNU General Public License v3.0
43 stars 11 forks source link

Use indicative error IDs when giving warnings #93

Open eozd opened 4 years ago

eozd commented 4 years ago

Feature Description

Most of the current warnings emitted by PsPM do not have an indicative error ID (not the messages). The most commonly used ID is ID:invalid_input, i.e. warning('ID:invalid_input', message). We can start using indicative error IDs to make error checking and debugging easier (and maybe note all of the possible error IDs used somewhere).

fmelinscak commented 4 years ago

A related problem (that perhaps merits a separate issue) is that often times warnings are used instead of errors. Very often the warning condition clearly indicates a state where the code will produce an error somewhere down the line. When this is true, it is better to fail immediately with an error.

dominikbach commented 4 years ago

Relating to Eshref's comment on noting the error IDs, this can be integrated into chapter 1.5 of the developer's manual.