Fix re-throwing of exception that happened during export.