Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Exceptions

Tolik Pylypchuk edited this page Jun 3, 2018 · 4 revisions

UnacceptableNullException

In the .NET base class library there are 2 main null exceptions: NullReferenceException and ArgumentNullException. The first one is designed to be thrown when there is an attempt to dereference a null object. The second one is designed to be thrown when a method parameter which must not be null is in fact null.

So, I've decided to add a general "null is not welcome" exception. In CSX, it is used by higher-order functions, which use a result of the function provided to them and this result must not be null.

Examples of usage are available here.

Clone this wiki locally