[Gambas-user] Unknown CLI options 3.16, trapping of

Bruce Steers bsteers4 at gmail.com
Sat Aug 28 11:47:25 CEST 2021


On Fri, 27 Aug 2021 at 12:09, Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 27/08/2021 à 12:54, Benoît Minisini a écrit :
> > Le 27/08/2021 à 12:35, bb a écrit :
> >> On Fri, 2021-08-27 at 12:28 +0200, Benoît Minisini wrote:
> >>> Le 27/08/2021 à 12:21, bb a écrit :
> >>>> With the new(ish) 3.16 gb.args component is there any way to trap
> >>>> "unknown" CLI options rather than the project just exiting with
> >>>> status
> >>>> 1?
> >>>>
> >>>> tia
> >>>> bruce
> >>>>
> >>>>
> >>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> >>>>
> >>>
> >>> What for?
> >>>
> >> We are having a lot of trouble with desktop files. I just want to be
> >> able to tell the user that something is awry.
> >>
> >> If an application is installed and present in a menu (and the menu
> >> desktop file is not right) then all the user sees when they click on
> >> the menu is
> >>
> >> (that was an Australian joke meaning "nothing".)
> >>
> >> b
> >>
> >
> > Command-line options are normally for programs running from... the
> > command-line.
> >
> > I will add an option to not abort.
> >
> > Regards,
> >
>
> Done in last commit.
>

Nice one :)
That's handy.

The forced Quit if an unknown arg was given was annoying, especially when
developing.
Much nicer to be able to print a warning and manually exit the program
properly. (Quit is such an ugly exit)

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210828/511b791c/attachment-0001.htm>


More information about the User mailing list