Browse Source

modify the throw information exception

tags/v1.1.0
shenwei41 5 years ago
parent
commit
76651a578c
2 changed files with 1 additions and 2 deletions
  1. +0
    -1
      mindspore/ccsrc/minddata/dataset/api/datasets.cc
  2. +1
    -1
      mindspore/ccsrc/minddata/dataset/api/text.cc

+ 0
- 1
mindspore/ccsrc/minddata/dataset/api/datasets.cc View File

@@ -638,7 +638,6 @@ Status SchemaObj::Init() {
"\"columns\" node is required in the schema json file.");
} catch (const std::exception &err) {
std::string err_msg = "Schema file failed to load: ";
err_msg += err.what();
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}
return from_json(js);


+ 1
- 1
mindspore/ccsrc/minddata/dataset/api/text.cc View File

@@ -315,7 +315,7 @@ Status LookupOperation::ValidateParams() {

default_id_ = vocab_->Lookup(unknown_token_);
if (default_id_ == Vocab::kNoTokenExists) {
std::string err_msg = "Lookup: " + unknown_token_ + " doesn't exist in vocab.";
std::string err_msg = "Lookup: \"" + unknown_token_ + "\" doesn't exist in vocab.";
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}


Loading…
Cancel
Save