V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
kuyuzhiqi
V2EX  ›  Node.js

不懂就问: nodejs readline 模块问题

  •  
  •   kuyuzhiqi · May 27, 2020 · 3540 views
    This topic created in 2164 days ago, the information mentioned may be changed or developed.

    官方推荐在读取文件的时候不要先判断而是直接读取,出错了再处理,但 readline 模块好像没法捕获异常,比如读取一个不存在的文件时候,在读取一个空白文件的时候,多执行几遍就卡在那了,求大佬们指点

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2221 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 00:39 · PVG 08:39 · LAX 17:39 · JFK 20:39
    ♥ Do have faith in what you're doing.