You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So lets say I run a command in shell(). Lets say the code is shell(@command).
I run it, something's wrong so it errors. I see "ShellException" in console, but not much else.
I want to see what the problem is so I do @output = shell(@command); sys_out(@output) to check to see what's going on. The problem is, because shell threw ShellException, sys_out(@output) will never run.
So lets say I'm a super smart cookie and I do try(@output = shell(@command), sys_out(@output)) so that sys_out() runs when shell() fails. @output is still empy.
This should work because @exception "... is set to an array containing the following information about the exception: ... 1 - The message generated by the exception..."
and shell() "... throws a ShellException with the exception message set to the syserr output if the process exits with an exit code that isn't the expectedExitCode..."
Upon running this code we find that @exception[1] is empty.
The text was updated successfully, but these errors were encountered:
CMDHELPER-3020 - Reported by VergilPrime
So lets say I run a command in shell(). Lets say the code is shell(@command).
I run it, something's wrong so it errors. I see "ShellException" in console, but not much else.
I want to see what the problem is so I do @output = shell(@command); sys_out(@output) to check to see what's going on. The problem is, because shell threw ShellException, sys_out(@output) will never run.
So lets say I'm a super smart cookie and I do try(@output = shell(@command), sys_out(@output)) so that sys_out() runs when shell() fails. @output is still empy.
One last thing we can try, try(shell(@command),@exception,sys_out(@exception[1])).
This should work because @exception "... is set to an array containing the following information about the exception: ... 1 - The message generated by the exception..."
and shell() "... throws a ShellException with the exception message set to the syserr output if the process exits with an exit code that isn't the expectedExitCode..."
Upon running this code we find that @exception[1] is empty.
The text was updated successfully, but these errors were encountered: