Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 : using System.Configuration;
11 :
12 : namespace Cqrs.Exceptions
13 : {
14 : /// <summary>
15 : /// An app setting is missing from <see cref="ConfigurationManager.AppSettings"/> that points to a connection string.
16 : /// </summary>
17 : [Serializable]
18 : public class MissingApplicationSettingForConnectionStringException : MissingApplicationSettingException
19 1 : {
20 : /// <summary>
21 : /// Instantiate a new instance of <see cref="MissingApplicationSettingException"/>.
22 : /// </summary>
23 : /// <param name="appSettingKey">The key of the app setting that is missing.</param>
24 1 : public MissingApplicationSettingForConnectionStringException(string appSettingKey)
25 : : base(appSettingKey, true)
26 : {
27 : }
28 :
29 : /// <summary>
30 : /// Instantiate a new instance of <see cref="MissingApplicationSettingException"/> and a reference to the inner <paramref name="exception"/> that is the cause of this <see cref="Exception"/>.
31 : /// </summary>
32 : /// <param name="appSettingKey">The key of the app setting that is missing.</param>
33 : /// <param name="exception">The <see cref="Exception"/> that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner <see cref="Exception"/> is specified.</param>
34 1 : public MissingApplicationSettingForConnectionStringException(string appSettingKey, Exception exception)
35 : : base(appSettingKey, true, exception)
36 : {
37 : }
38 : }
39 : }
|