|
using System;
namespace Framework.Exceptions
{
/// <summary>
/// An exception that 'cannot' happen and is just included to allow compilation.
/// Hopefully, a future version of dotCover will allow marking of exceptions
/// such as this and not show them as uncovered allowing 100% code coverage.
/// e.g.
/// A method with a switch containing cases for all possible items in an enum
/// and which returns from each case. Something outside the switch is required
/// to make it compile so use this exception.
/// (unless one of the items is chosen to be default which I am not keen on)
/// </summary>
public class CodeShouldBeUnreachableException: Exception
{
public CodeShouldBeUnreachableException()
{
}
public CodeShouldBeUnreachableException(string message): base(message)
{
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Simon Hewitt is a freelance IT consultant and is MD of Hunton Information Systems Ltd.
He is currently looking for contract work in London.
He is happily married to Karen (originally from Florida, US), has a lovely daughter Bailey, and they live in Kings Langley, Hertfordshire, UK.