exception - exit failed script run (python) -


After successfully completing a task, I have seen many questions about coming out of a script, but for doing so Is there a way to have a script that has failed? I am writing a test script which only checks that a camera is working correctly if the first test fails, it is possible that the following tests will fail; That's why I have the first time trying to get an exit and to provide the output to the screen, I know there was an error.

I hope this is enough information; Let me know that I need more information to help.

Are you looking for a function?

  Import if 1 & lt; 0: Print & gt; & Gt; Sys.stderr, "Something is seriously wrong." Sys.exit (1)  

exit () is the return code (optional), the script will return to the shell. Usually indicates an error compared to 0.


Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -