refactor: improve accelerator check failed message (#36476)

This commit is contained in:
Black-Hole 2022-12-01 03:31:16 +08:00 committed by GitHub
parent e3b7c3024f
commit f527b8aa2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,10 @@ namespace accelerator_util {
bool StringToAccelerator(const std::string& shortcut,
ui::Accelerator* accelerator) {
if (!base::IsStringASCII(shortcut)) {
LOG(ERROR) << "The accelerator string can only contain ASCII characters";
LOG(ERROR) << "The accelerator string can only contain ASCII characters, "
"invalid string: "
<< "\"" << shortcut << "\"";
return false;
}