I want to make a custom Exception in C#, but in theory I do need to do a little parsing first before I can make a human readable ExceptionMessage.
The problem is that th
What's wrong with something like this.
public class FolderNotEmptyException : Exception
{
public FolderNotEmptyException(string Path) : base($"Directory is not empty. '{Path}'.")
{ }
public FolderNotEmptyException(string Path, Exception InnerException) : base($"Directory is not empty. '{Path}'.", InnerException)
{ }
}
I just use a string and include parameters. Simple solution.