DDG: better exception handling