Command line exit code needed
The command line implementation doesn't provide any feedback for whether the operation was successful or not. As an example, you can execute the export function without the input or output file and it will return without any output to stdout or stderr and with a return value of zero. At a minimum, it would be great if a non-zero return value was emitted if the selected command could not be completed.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company marked this problem solved.
-
Inappropriate?Hey Steve, sorry I couldn't get to this until now.
I just added some error codes to the latest version (1.1.86, already live). Exit code 0 means "everything went ok", others (1 through 4) mean other errors, which I can list here if you'd like.
-
Inappropriate?That's excellent ... if you list them, I'll pass them on to the Maven plugin users. Here are the things that I've done to break the command line mode (so far):
- Used export with no parameters
- Used export with one parameter
- Used export with two parameters, but pointed the input file to a non-bmml file
- Used unregister as regular user (after installing as root on a Linux system)
- Used register with no parameters
- Used register when already registered
- Used register as non-root user
Right now I'm using export with no parameters as a test of whether the system has found and can execute Mockups, so I'll need to change that if it starts sending a value other than zero.
It would be great to have a "version" command that output a string, so that I can programatically tell whether I'm able to use certain features (assuming there's more command-line functionality in the future).
I’m thankful
-
Inappropriate?Ok, here are the numbers for the cases you outline:
2 - Used export with no parameters
2 - Used export with one parameter
5 - Used export with two parameters, but pointed the input file to a non-bmml file
I don't trap this right now, something else is generating the error - Used unregister as regular user (after installing as root on a Linux system)
2 - Used register with no parameters
1 - Used register when already registered
again, I have nothing in the code about this. - Used register as non-root user
I also have
3 - bad license key
4 - trying to export before registering
I think that's it!
Re: "version", I'll add that ASAP, good idea. -
Inappropriate?Wow ... that was fast! I think that the unregister as non-root user behavior is caused by the inability to alter or delete the licensing file. I don't actually the unregister command in the Maven plugin, but did include it in my Java proxy for Mockups (just to be complete). I'll make sure that I properly forward the error states to the user!
I think I'll continue to use export with no commands as my test that the application is functional (assuming error code 4 would be thrown before 2) and check for an errant return value instead of zero.
I’m confident (or moreso)
Loading Profile...



