<div dir="auto">I have same issue. How this help you? Catching exception does not help. How do I catch exception and still print help message? </div><div class="gmail_extra"><br><div class="gmail_quote">Dne 1. 9. 2017 8:10 odpoledne napsal uživatel "Vino.B via Digitalmars-d-learn" <<a href="mailto:digitalmars-d-learn@puremagic.com">digitalmars-d-learn@puremagic.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On Friday, 1 September 2017 at 17:23:01 UTC, Jon Degenhardt wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, 1 September 2017 at 13:13:39 UTC, Vino.B wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
When i run the below program without any arguments "D1.d -r" it is throwing error, but i need it to show the help menu<br>
<br>
[snip...]<br>
</blockquote>
<br>
Hi Vino,<br>
<br>
To get good error message behavior you need to put the construct in a try-catch block. Then you can choose how to respond. An example here: <a href="https://github.com/eBay/tsv-utils-dlang/blob/master/tsv-append/src/tsv-append.d#L138-L194" rel="noreferrer" target="_blank">https://github.com/eBay/tsv-ut<wbr>ils-dlang/blob/master/tsv-appe<wbr>nd/src/tsv-append.d#L138-L194</a>. This code prints outs the error message from the exception. In your case: "Missing value for argument -r.". But, you could also print out the help text as well. There is an example of that as well in the above code block, look for the 'if (r.helpWanted)' test.<br>
<br>
--Jon<br>
</blockquote>
<br></div>
Hi,<br>
<br>
Thank you very much, that helped me to resolve the issue.<br>
</blockquote></div><br></div>