% bin/AimsTemplate -m 3 -n 3
bin/AimsTemplate: -m is no a valid integer
What's more, I get the error only if the faulty parameter appears before all expected input arguments are parsed -- in the example above, no error is given if -m is set after -n. I did not fully investigate the problem, but it seems to me that the error stems from using plain type arguments -- in any case, the error message is different when Reader's are involved.
Well, this behaviour is "normal" since commandline args are ambiguous: switches names are optional in Aims: for instance "AimsFileConvert -i toto.ima -o tutu.ima" is equivalent to "AimsFileConvert toto.ima tutu.ima"
For this reason, the unknown switch "-m" has been understood as the value of the first (omitted) -n switch, of expected type int, hence the error message. The parser understood it as if you had typed "AimsTemplate -n -m 3 -n 3"
Of course it could be even more clever and see that the -n switch is actually present after this argument, but parsing is done as a forward process only, so this cannot be detected at the moment.