commandlineparser / commandlineparser/commandline

usability request: improve error message when missing requirement (when no verbs/arguments match)

未關閉
#782 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
4.8k
分支
478
PR 合併指標
30 天內沒有已合併 PR

描述

We've used your library a long time, it's very helpful thanks.

I wanted to request that you consider checking for linq errors and not throwing an exception but providing an error.

The best example is this one which I am seeing a lot ( nuget version: 2.8.0 )

System.InvalidOperationException : Sequence contains no elements

This has happened both for coding errors (copying an option class and forgetting to rename verb) but also for user/usage errors, when some arguments don't match.

This is coming from Linq, it would be more helpful to diagnose them if you could check for requirements prior to parsing a verb or argument and return relevant error.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先追蹤在 verb 或 argument 解析期間引發「Sequence contains no elements」的 LINQ 路徑。檢視目前如何處理缺少的需求和不相符的引數,然後針對這兩種情況定義並測試適當的診斷錯誤,以取代該例外。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp
領域
cli
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。