Req #66855 [Opn->Csd]: There is no NotImplementedException

From: Date: Tue, 25 Mar 2014 13:47:35 +0000
Subject: Req #66855 [Opn->Csd]: There is no NotImplementedException
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184879@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66855&edit=1

 ID:                 66855
 Updated by:         levim@php.net
 Reported by:        eldmannen+php at gmail dot com
 Summary:            There is no NotImplementedException
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            SPL related
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        levim
 Block user comment: N
 Private report:     N

 New Comment:

Just make your own and throw it. I'm in favor of revamping the SPL structures and exceptions
but even then I wouldn't include NotImplementedException; it's a sign that your interface
or parent class isn't designed properly.


Previous Comments:
------------------------------------------------------------------------
[2014-03-09 17:09:45] eldmannen+php at gmail dot com

RuntimeException can be pretty much anything. It is very disambigous.

While NotImplementedException is very specific and explicitly conveys that this method is not
implemented.

If you get a RuntimeException you have no idea what is going on or why you're getting it.

If you get a NotImplementedException then you know exactly why you got it.

It is also available in many other languages;
Python - http://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError
Ruby - http://www.ruby-doc.org/core-1.9.3/NotImplementedError.html
.NET Framework - http://msdn.microsoft.com/en-us/library/system.notimplementedexception%28v=vs.110%29.aspx
Java - http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html

------------------------------------------------------------------------
[2014-03-09 16:43:55] phpmpan at mpan dot pl

What's the purpose of such exception? What's its advantage over pure
\RuntimeException?

------------------------------------------------------------------------
[2014-03-08 18:00:17] eldmannen+php at gmail dot com

Description:
------------
There is no NotImplementedException.
Please add a NotImplementedException.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66855&edit=1


Thread (8 messages)

« previous php.bugs (#184879) next »