Skip to content

Commit ea90759

Browse files
committed
Address comment
1 parent 305381f commit ea90759

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

extension/asr/runner/runner.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Error AsrRunner::load_tokenizer() {
5454

5555
auto tokenizer =
5656
::executorch::extension::llm::load_tokenizer(tokenizer_path_);
57-
if (!tokenizer) {
58-
ET_LOG(
59-
Error, "Failed to create tokenizer from %s", tokenizer_path_.c_str());
60-
return Error::Internal;
61-
}
57+
ET_CHECK_OR_RETURN_ERROR(
58+
tokenizer,
59+
Error::Internal,
60+
"Failed to create tokenizer from %s",
61+
tokenizer_path_.c_str());
6262

6363
tokenizer_ = std::move(tokenizer);
6464
if (!tokenizer_->is_loaded()) {

0 commit comments

Comments
 (0)