diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
commit | 3c8d5c8f732239a8b50418be27464e30b9dddeae (patch) | |
tree | 8ffb46c18e48c8463c1fb16fcacf216f296b8a1f /src/base/Format.cpp | |
parent | 37943858b3b260589b5dc222bb5184d2846fb6dc (diff) | |
download | cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.gz cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.bz2 cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.zip |
Exception remove string.
Diffstat (limited to 'src/base/Format.cpp')
-rw-r--r-- | src/base/Format.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/Format.cpp b/src/base/Format.cpp index cba4137f..e442e572 100644 --- a/src/base/Format.cpp +++ b/src/base/Format.cpp @@ -9,7 +9,7 @@ FormatToken ParsePlaceHolder(String place_holder_string) { if (place_holder_string.StartWith(u":")) { if (place_holder_string.Find(u':', 1) != -1) { - throw Exception(u"Two ':' inside placeholder."); + throw Exception("Two ':' inside placeholder."); } return FormatToken::NonePlaceHolder(place_holder_string.substr(1)); @@ -27,7 +27,7 @@ FormatToken ParsePlaceHolder(String place_holder_string) { if (index != place_holder_string.size()) { if (place_holder_string[index] != ':') { - throw Exception(u"Invalid placeholder in format."); + throw Exception("Invalid placeholder in format."); } option = place_holder_string.substr(index + 1); @@ -68,7 +68,7 @@ std::vector<FormatToken> ParseToFormatTokenList(StringView str) { is_in_place_holder = false; } else { if (is_in_place_holder) { - throw Exception(u"Invalid format string: '{' inside placeholder."); + throw Exception("Invalid format string: '{' inside placeholder."); } try_to_escape = true; @@ -101,7 +101,7 @@ void FormatAppendFromFormatTokenList( for (Index i = index; i < static_cast<Index>(format_token_list.size()); i++) { const auto& token = format_token_list[i]; if (token.type == FormatTokenType::PlaceHolder) { - throw Exception(u"More placeholder than args."); + throw Exception("More placeholder than args."); } else { current += token.data; } |