fix undefined 'exception' bug