Quantcast
Channel: FeedBunch:34cac4333624170fed210ff2d113469c380d7398 commits
Viewing all articles
Browse latest Browse all 39

Change log message and level

$
0
0
When the validation that checks that an entry is not already deleted fails, the right thing to do is to add the error to the entry.errors list and write a log message with low priority. The class that triggers the validation has the responsability of handling the validation failure and logging with a higher priority if necessary. For example this validation may be triggered because some other class invokes entry.valid?. In this case the entry is not actually being saved, so the old log message was incorrect. Also this is not an error by itself, the class invoking entry.valid? will receive a false response and do whatever is necessary, without it necessarily being an error.

Viewing all articles
Browse latest Browse all 39

Trending Articles