[Proposal] Include more specific exceptions. Or Exception Interfaces
Specific Exception for improved contextual information
For example ArgumentOutOfRangeException doesn't indicate how the argument is out the range in context to this specific range.
It could be
- before the start of the range?
- as the indices range of an
ICollection - eg a
BeforeRange_ArgumentOutOfRangeException
- as the indices range of an
- after the end of the range?
- as the indices range of an
ICollection - eg an
AfterRange_ArgumentOutOfRangeException
- as the indices range of an
- not a valid step within the range / sequence?
- as in the sequence
Enumerable.Range(0, 100).Where( Function(index) (index Mod 3) = 0 )
- as in the sequence
Exception Interfaces
Allow an Interface to only to explicitly be implemented inheritors of the Exception base class, or it also inherits the IException base-class interface.
Exception Interface IOutOfRange_ArgumentException
Inherit IArgument_Exception
' ...
End Interface
Interface is now become more abstract in it definition., which allow to progress towards developing a Concept-like implementation, for some future version (or fork) of Visual Basic.net.
This issue belongs to .NET runtime repository, right?
@hartmair Not necessarily so, vb.net can provide additional exception via a library.
Where are these exceptions coming from? Are you proposing adding extra exception classes for user code to utilize, rewriting the framework libraries to use these extra exceptions, or suggesting some sort of intercept mechanism to transform the framework library exceptions into these more detailed ones?