dotnet / dotnet/vblang

[Proposal] Include more specific exceptions. Or Exception Interfaces

Open
#551 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

### 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`
* after the end of the range?
* as the indices range of an `ICollection`
* eg an `AfterRange_ArgumentOutOfRangeException`
* not a valid step within the range / sequence?
* as in the sequence `Enumerable.Range(0, 100).Where( Function(index) (index Mod 3) = 0 )`

---------

### 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`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.