The error function (“whatever code” above) is never executed.
If I use the frappe.msgprint(“message”, raise_exception=True) it is executed.
On the other hand, if I provide a frappe.exceptions.* exception instead of True when calling frappe.msgprint the error function is not executed.
Any idea, what I should do, if I want to use a specific exception class? frappe.msgpring always uses the ValidationError.
I upgraded erpnext instance from version-14 to version-15.
And I found that Doctype " Job Requisition" on duplicate entry not showing error msg but only error sound is coming.