mozilla/DeepSpeech

Change Alphabet::EncodeSingle and Alphabet::DecodeSingle to use an outparam and return an error code instead of calling `abort`

开放

#3,175 创建于 2020年7月22日

 (14 条评论) (0 个反应) (0 位负责人)C++ (4,093 个派生)batch import
buggood first bughelp wanted

仓库指标

星标
 (26,755 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

I run into the error "Invalid label 0". I assume it is from the function Alphabet::DecodeSingle() in the file native_client/alphabet.cc.

I don't know why I am running into this error and it is not important for now. What is important is the fact that the code calls abort() just after printing this error.

I don't know your guidelines. But I can tell that aborting the whole process, including the python interpreter which might be interactive, is a terrible way of handling errors, especially in such a trivial function, and I call it a bug.

贡献者指南