Standard Posted by 360AgileWeb Posted on April 27, 2010 Posted under Uncategorized Comments Leave a comment Creating custom .NET Exceptions in C# public class XyzlException : Exception { public XyzlException (string errorMessage, Exception inner) : base(errorMessage, inner) {} } You can pass in a custom error message to your new Exception type. Just try it out… Share this:TwitterFacebookLike this:Like Loading... Related C#Code Post navigation ← Using SQL Server CROSS APPLY to read XML segment Initialising log4net logging for Asp.Net web app → Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. ( Log Out / Change ) You are commenting using your Google account. ( Log Out / Change ) You are commenting using your Twitter account. ( Log Out / Change ) You are commenting using your Facebook account. ( Log Out / Change ) Cancel Connecting to %s Notify me of new comments via email. Notify me of new posts via email. This site uses Akismet to reduce spam. Learn how your comment data is processed.