Page MenuHomePhabricator

Choose a better class name for PhutilMethodNotImplementedException
ClosedPublic

Authored by epriestley on Jul 23 2014, 3:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 2:52 PM
Unknown Object (File)
Sun, Dec 15, 4:49 AM
Unknown Object (File)
Sun, Dec 15, 4:49 AM
Unknown Object (File)
Sun, Dec 15, 4:43 AM
Unknown Object (File)
Sun, Dec 15, 4:24 AM
Unknown Object (File)
Dec 2 2024, 8:01 PM
Unknown Object (File)
Nov 26 2024, 5:45 AM
Unknown Object (File)
Nov 23 2024, 6:54 AM
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
Lint
Lint Skipped
Unit
Tests Skipped

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).