First catch the error using the try / catch block: try { const content = await fs.readFile('foo.bar', 'utf-8'); } catch (error) { // ... }.
確定! 回上一頁