Page MenuHomePhabricator

Choose a better class name for PhutilMethodNotImplementedException
ClosedPublic

Authored by epriestley on Jul 23 2014, 3:17 PM.
Tags
None
Referenced Files
F15310109: D10030.id24138.diff
Thu, Mar 6, 8:05 AM
Unknown Object (File)
Thu, Feb 20, 1:39 PM
Unknown Object (File)
Feb 7 2025, 9:16 AM
Unknown Object (File)
Jan 29 2025, 10:06 PM
Unknown Object (File)
Jan 23 2025, 12:31 AM
Unknown Object (File)
Jan 22 2025, 4:08 PM
Unknown Object (File)
Jan 21 2025, 4:54 PM
Unknown Object (File)
Jan 17 2025, 8:32 PM
Subscribers

Details

Summary

If you call $subclass->method() and the base class provides a default implementation which throws, you get BaseClass in the exception message.

Instead, produce Subclass in this case.

Test Plan

With Application subclasses missing getName() implementations, got more useful exceptions (e.g., "PhabricatorPasteApplication" is missing a method, not "PhabricatorApplication").

Diff Detail

Repository
rPHU libphutil
Branch
objname
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1863
Build 1864: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Choose a better class name for PhutilMethodNotImplementedException.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: joshuaspence.
This revision is now accepted and ready to land.Jul 23 2014, 10:12 PM
epriestley updated this revision to Diff 24138.

Closed by commit rPHU4298b0da1573 (authored by @epriestley).