[Error: ENOENT: no such file or directory, open '..../test.txt'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '..../test.txt'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '..../test.txt'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '..../test.txt'
}
3 种实现都会显示错误处理代码(仅将错误输出到控制台),说明它们都按预期执行了。