rspec/rules/S3717/rule.adoc

24 lines
684 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2021-01-27 13:42:22 +01:00
``++NotImplementedException++`` is often used to mark methods which must be implemented for the overall functionality to be complete, but which the developer wants to implement later. That's as opposed to the ``++NotSupportedException++`` which is thrown by methods which are required by base classes or interfaces, but which are not appropriate to the current class.
2020-06-30 12:48:39 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
This rule raises an exception when ``++NotImplementedException++`` is thrown.
2020-06-30 12:48:39 +02:00
=== Noncompliant code example
2020-06-30 12:48:39 +02:00
2022-02-04 17:28:24 +01:00
[source,text]
2020-06-30 12:48:39 +02:00
----
void doTheThing()
{
throw new NotImplementedException();
}
----
=== Exceptions
2020-06-30 12:48:39 +02:00
2021-01-27 13:42:22 +01:00
Exceptions derived from ``++NotImplementedException++`` are ignored.
2020-06-30 12:48:39 +02:00