api06: simplify exception handling and add exception handling to the diff