Homec4science

Provide PhutilErrorTrap, for enriching errors generated by native PHP functions

Authored by epriestley <git@epriestley.com> on Aug 13 2013, 20:43.

Description

Provide PhutilErrorTrap, for enriching errors generated by native PHP functions

Summary:
Ref T3709. See that task for discussion, but basically a user had proc_open disabled in disable_functions. The error message we gave was not great:

[Exception] Failed to proc_open()

The new message can now capture the PHP message:

[Exception] Failed to proc_open(): proc_open() has been disabled for security reasons

This is dramatically more useful, and googleable.

I tried the simple version of this first (error_get_last()) but that was unable to retrieve the correct error on my system.

Test Plan: Set disable_functions to proc_open, received new, more useful message (as above).

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3709

Differential Revision: https://secure.phabricator.com/D6738

Details

Committed
epriestley <git@epriestley.com>Aug 13 2013, 20:43
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU6c0a63612feb: Fix construction of arguments passed to daemons
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU94cecd5c6fc2: Provide PhutilErrorTrap, for enriching errors generated by native PHP functions (authored by epriestley <git@epriestley.com>).Aug 13 2013, 20:43