While an exception is/should be a technical error, sometimes it is useful isn a script to throw an exception to abort it. This works, but like in this case, it's ugly because a full stack trace is printed.
In a case like this, aborting the script printing "instance not found" would be what you expect, not to go through a 37-line exception.
Describe the solution you'd like
We could find a way to flag some exceptions as "cli-matic's own", so it would only print a message and exit with status code you specify. Other exceptions are "technical" so the stack trace is OK. Maybe CLI-matic could offer an abort function to raise such exceptions.
Of course this should work both on CLJ and CLJS where exceptions differ significantly.
Is your feature request related to a problem?
While an exception is/should be a technical error, sometimes it is useful isn a script to throw an exception to abort it. This works, but like in this case, it's ugly because a full stack trace is printed.
In a case like this, aborting the script printing "instance not found" would be what you expect, not to go through a 37-line exception.
Describe the solution you'd like
We could find a way to flag some exceptions as "cli-matic's own", so it would only print a message and exit with status code you specify. Other exceptions are "technical" so the stack trace is OK. Maybe CLI-matic could offer an
abort
function to raise such exceptions.Of course this should work both on CLJ and CLJS where exceptions differ significantly.