unify exception and error handling.
correct templates
keep name as well
Merge pull request #2594 from dereuromark/2.5-error-handling

2.5 error handling