fix output bug when minify throws an exception

problem: result would be undefine if uglify.minify throws an exception
resolve: add result check after uglify.minify