I did ask before but I guess it got lost. Can the PythonSystemExitException please have the parameter passed to exit in it So if I do exit(12) Then I can do Catch(PythonSystemExitException ex) { if((int)ex.ExitCode == 12) ....... }