rspec/rules/S1034/comments-and-links.adoc

16 lines
945 B
Plaintext
Raw Normal View History

=== On 2014-10-14T13:54:23Z Samuel Mercier Wrote:
This rule cannot be implemented, as it relies on interpretation of the programmer's intent.
We could however make an approximation by forbidding exceptions to be caught within the same function they are thrown from.
=== On 2014-10-14T18:49:03Z Ann Campbell Wrote:
\[~samuel.mercier] I suspect this Microsoft rule is a variant on the MISRA intent: http://msdn.microsoft.com/en-us/library/dd264997.aspx[DA0007: Avoid using exceptions for control flow]
I've also just seen an example of an http://www.gamedev.net/topic/445918-using-exceptions-to-control-the-flow-of-a-program-a-good-idea/[exception used in indirect recursion] _shudder_
=== On 2014-10-14T20:12:11Z Freddy Mallet Wrote:
Indeed [~samuel.mercier], for sure if some exceptions are thrown and caught in the same function body, that means that exceptions are used for control flow. That's a good way to partially cover this rule.