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 Cqrs.Events;
11 :
12 : namespace Cqrs.Exceptions
13 : {
14 : /// <summary>
15 : /// The <see cref="Exception"/> that is thrown when no <see cref="IEventHandler"/> if found for a given <see cref="IEvent{TAuthenticationToken}"/>.
16 : /// </summary>
17 : [Serializable]
18 : public class NoEventHandlerRegisteredException : NoHandlerRegisteredException
19 1 : {
20 : /// <summary>
21 : /// Instantiates a new instance of <see cref="NoEventHandlerRegisteredException"/>.
22 : /// </summary>
23 : /// <param name="type">The <see cref="Type"/> of <see cref="IEvent{TAuthenticationToken}"/> that expected an <see cref="IEventHandler"/>.</param>
24 1 : public NoEventHandlerRegisteredException(Type type)
25 : : base(string.Format("No event handler registered for type '{0}'", type.FullName))
26 : {
27 : }
28 :
29 : /// <summary>
30 : /// Instantiates a new instance of <see cref="NoEventHandlerRegisteredException"/> with a specified error message.
31 : /// </summary>
32 : /// <param name="message">The message that describes the error.</param>
33 1 : protected NoEventHandlerRegisteredException(string message)
34 : : base(message)
35 : {
36 : }
37 : }
38 : }
|