Menu

#63 Wrap run.php with try/catch block and ...

Fixed
nobody
None
Medium
Defect
2013-12-02
2013-11-11
Anonymous
No

Originally created by: kbcm...@gmail.com

While running run.php against code that had an unterminated comment, run.php had a stack trace but exited with a 0 return code. This made detecting the problem more difficult but I believe all programs should handle uncaught exceptions more gracefully.

Related

Wiki: History

Discussion

  • Anonymous

    Anonymous - 2013-11-11

    Originally posted by: tch...@hotmail.com

    (No comment was entered for this change.)

    Status: Accepted

     
  • Anonymous

    Anonymous - 2013-11-25

    Originally posted by: tch...@hotmail.com

    Yes, should catch the exception, report a problem (with the exception message) and continue to the next file.

     
  • Anonymous

    Anonymous - 2013-12-02

    Originally posted by: tch...@hotmail.com

    OK, Error management in PHP is a mess.
    Parsing errors are not catchable and are not calling error handlers.
    Used a trick with error_get_last to test for parsing errors : http://php.net/manual/en/function.error-get-last.php

    Status: Fixed

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.