tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
47 stars 11 forks source link

fz: handle invalid arguments given on command line #4156

Closed maxteufel closed 2 days ago

maxteufel commented 5 days ago

I think this should not happen:

$ fz -XmaxErrors=

error 1: java.lang.NumberFormatException: For input string: ""
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
    at java.base/java.lang.Integer.parseInt(Integer.java:672)
    at java.base/java.lang.Integer.parseInt(Integer.java:778)
    at dev.flang.tools.Tool.parseGenericArg(Tool.java:256)
    at dev.flang.tools.Fuzion.parseArgsForBackend(Fuzion.java:926)
    at dev.flang.tools.Fuzion.parseArgs(Fuzion.java:703)
    at dev.flang.tools.Tool.lambda$run$0(Tool.java:142)
    at dev.flang.util.Errors.runAndExit(Errors.java:897)
    at dev.flang.tools.Tool.run(Tool.java:142)
    at dev.flang.tools.Fuzion.main(Fuzion.java:600)

*** fatal errors encountered, stopping.
one error.
maxteufel commented 5 days ago

Might be a task for @simonvonhackewitz.