System.Exception
CS-R1109Inheriting System.Exception
class allows you to define your own custom exceptions. This is particularly useful for scenarios where you believe that the exceptions supplied in the standard library are not suitable for your use cases. The norm is that such user-defined exception's name end with the word Exception
such as EmployeeListNotFoundException
. However, in this case, such a class was found to not inherit System.Exception
. Either consider inheriting it, or, renaming your class to avoid confusion.
class EmployeeListNotFoundException
{
}
class EmployeeListNotFoundException: Exception
{
// ...
}