﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9605	form.save() exceptions should be more informative	to.roma.from.djbug@…	nobody	"Currently form.save() raises a ValueError if !form.is_valid(). I suggest it should throw some exception from which form.errors could be extracted.

I have this workaround:
{{{
def enforce_valid(form):
    if not form.is_valid():
        raise invalid_form(form.errors)
    return form

...
enforce_valid(some_form(...)).save()
...
}}}
and also there’s code that catches the custom exception and puts the errors into a session variable and redirects back to the originating page and shows the errors there.

Why does form.save() only provide a message that something went wrong and not the actual errors? It could raise an exception derived from ValueError that would contain the list of errors."		closed	Uncategorized	1.0		wontfix			Unreviewed	0	0	0	0	0	0
