returning exit code from .exe without throwing exception

Discussion about the open-source Phalanger [?] project.

returning exit code from .exe without throwing exception

Postby spencer hollon » April 11th, 2014, 5:18 am

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?
spencer hollon
 
Posts: 5
Joined: April 8th, 2014, 5:40 pm

Re: returning exit code from .exe without throwing exception

Postby spencer hollon » April 11th, 2014, 2:24 pm

You can set exit code property then use close on main form
spencer hollon
 
Posts: 5
Joined: April 8th, 2014, 5:40 pm

Re: returning exit code from .exe without throwing exception

Postby Jakub Misek » April 15th, 2014, 10:26 pm

Currently PHP exit() function throws an exception.

Exit is e reserved work, so setting the property is the only way.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: returning exit code from .exe without throwing exception

Postby syed20 » October 11th, 2014, 1:00 pm

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.
syed20
 
Posts: 1
Joined: October 11th, 2014, 12:45 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 15 guests

cron

User Control Panel

Login

Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 15 guests