I want my exceptions to be bound to my business classes.
So you need your own exception class, and are expected to override the 4 constructors of the Exception class.
But I got a bit tired of writing code like this again and again:
using System;
using System.Runtime.Serialization;
namespace bo.Sandbox
{
public class MyException : Exception
{
public MyException()
: base()
{
}
public MyException(string message)
: base(message)
{
}
public MyException(string message, MyException inner)
: base(message, inner)
{
}
public MyException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
Searching for Generic Exception Class did not reveal any generic exception classes.
So I wrote this instead: Read the rest of this entry »





