diff options
author | amatanhead <amatanhead@yandex-team.ru> | 2022-02-10 16:50:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:04 +0300 |
commit | 8879605a63ac17539be5b3bd41b529791f4d4b02 (patch) | |
tree | 5739c7303cbe09d02b881e25bb294a4a173422a0 /library/cpp/getopt/small/last_getopt.h | |
parent | 830fe7ae4073c2707f3f3138303ccc56052c0327 (diff) | |
download | ydb-8879605a63ac17539be5b3bd41b529791f4d4b02.tar.gz |
Restoring authorship annotation for <amatanhead@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt/small/last_getopt.h')
-rw-r--r-- | library/cpp/getopt/small/last_getopt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/getopt/small/last_getopt.h b/library/cpp/getopt/small/last_getopt.h index 07687bc914..0540f69313 100644 --- a/library/cpp/getopt/small/last_getopt.h +++ b/library/cpp/getopt/small/last_getopt.h @@ -40,7 +40,7 @@ namespace NLastGetopt { TValue last = mutableValue ? NPrivate::OptFromString<TValue>(mutableValue, parser->CurOpt()) : first; if (last < first) { - throw TUsageException() << "failed to parse opt " << NPrivate::OptToString(parser->CurOpt()) << " value " << TString(val).Quote() << ": the second argument is less than the first one"; + throw TUsageException() << "failed to parse opt " << NPrivate::OptToString(parser->CurOpt()) << " value " << TString(val).Quote() << ": the second argument is less than the first one"; } for (++last; first < last; ++first) { @@ -100,7 +100,7 @@ namespace NLastGetopt { if (curval.IsInited()) { TStringBuf key, value; if (!curval.TrySplit(KVDelim, key, value)) { - throw TUsageException() << "failed to parse opt " << NPrivate::OptToString(curOpt) + throw TUsageException() << "failed to parse opt " << NPrivate::OptToString(curOpt) << " value " << TString(curval).Quote() << ": expected key" << KVDelim << "value format"; } Func(NPrivate::OptFromString<TKey>(key, curOpt), NPrivate::OptFromString<TValue>(value, curOpt)); @@ -119,10 +119,10 @@ namespace NLastGetopt { const TpArg& arg = curval.IsInited() ? OptFromString<TpArg>(curval, parser->CurOpt()) : Def_; try { Func_(arg); - } catch (const TUsageException&) { - throw; + } catch (const TUsageException&) { + throw; } catch (...) { - throw TUsageException() << "failed to handle opt " << OptToString(parser->CurOpt()) + throw TUsageException() << "failed to handle opt " << OptToString(parser->CurOpt()) << " value " << TString(curval).Quote() << ": " << CurrentExceptionMessage(); } } |