Hi I am getting a runtime exception exception message which reads the following:
An exception of class RuntimeException Was not handled The application must shutdown
Exception Error Number: 2.
I then press okay and the error goes away, but the program does not crash, it continues to run the way it is supposed to.
I believe the error is occurring at this point of my code.
It is in the ‘Complete’ Event Handler of my Shell object.
The shell is in mode 1 (Asynchronous) and runs a Shell script which downloads a file.
In the “complete” event my code looks as follows:
try
try
mainPogram.Execute("/home/pi/Machine\\ Controller/Machine\\ Controller")
catch e As RuntimeException
MsgBox("Run exception")
end try
catch e As NilObjectException
MsgBox("NILObjet exception")
end try
The ‘mainProgram’ is another Shell object which is also in Asynchronous mode.
^^None of the message boxes in the catch blocks ever appear.
Any ideas why this error is occurring but not killing my program, can I just suppress the error?
No clue what’s going wrong, but I want to point out that you can have multiple Catch statements in a single Try.
try
mainPogram.Execute("/home/pi/Machine\\ Controller/Machine\\ Controller")
catch e As RuntimeException
MsgBox("Run exception")
catch e As NilObjectException
MsgBox("NILObjet exception")
end try
Thanks for your help, I changed the try catch statement
Still getting the error,
UPDATE: I solved it!
In my shell script within the Asyc shell, I was running an executable, I think this is why the error was generated because the shell would never reach the ‘Completed’ event (until the exe was closed).