Page 1 of 1

returning exit code from .exe without throwing exception

PostPosted: April 11th, 2014, 5:18 am
by spencer hollon
I need to exit a Phalanger Win Forms application with an exit code returned to the operating system (or calling process).

I have tried to use Environment::Exit(int) but this is not allowed because exit is flagged as a PHP reserved word. When I try to use the native php Exit() I get a .NET exception not handled error. Can I suppress this exception and pass the exit code out?

Re: returning exit code from .exe without throwing exception

PostPosted: April 11th, 2014, 2:24 pm
by spencer hollon
You can set exit code property then use close on main form

Re: returning exit code from .exe without throwing exception

PostPosted: April 15th, 2014, 10:26 pm
by Jakub Misek
Currently PHP exit() function throws an exception.

Exit is e reserved work, so setting the property is the only way.

Re: returning exit code from .exe without throwing exception

PostPosted: October 11th, 2014, 1:00 pm
by syed20
I create a php web project and php class library. I compiled my project library and I try to call into my php web project, but an error occurs (class not found). I don't know what happens.