-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
我试了下wstock add 600127报下面的错误,而且报错报的也不是很友好
$ wstock add 600127
(node:36075) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'code' of undefined
at /Users/shiming/wstock/index.js:172:17
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:36075) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:36075) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我正想提issue,后来看了wstock list的输出,发现代码前有前缀。再试了下SH600127才添加成功。所以你是要依赖用户自己写SZ或SH的前缀在股票代码前面吗?
股票代码应该是有规律的,用户添加六位数的股票代码即可吧?我觉得这方面有优化空间。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels