PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/v3.0/PubSubMgr/Exceptions.cs

#
C# | 275 lines | 128 code | 24 blank | 123 comment | 0 complexity | 53895f4fd9447190d62d9728d4682b2a MD5 | raw file
  1. using System;
  2. using System.Runtime.Serialization;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Runtime.InteropServices;
  6. namespace Microsoft.WebSolutionsPlatform.PubSubManager
  7. {
  8. /// <summary>
  9. /// The exception that is thrown when an error occurs during publish/subscribe. See
  10. /// the inner exception.
  11. /// </summary>
  12. [Serializable()]
  13. public class PubSubException : SystemException
  14. {
  15. /// <summary>
  16. /// Base constructor to create a new PubSubException
  17. /// </summary>
  18. public PubSubException()
  19. : base()
  20. {
  21. }
  22. /// <summary>
  23. /// Base constructor to create a new PubSubException
  24. /// </summary>
  25. /// <param name="message">The message that describes the error.</param>
  26. public PubSubException(string message)
  27. : base(message)
  28. {
  29. }
  30. /// <summary>
  31. /// Base constructor to create a new PubSubException
  32. /// </summary>
  33. /// <param name="message">The error message that explains the reason for the exception.</param>
  34. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  35. public PubSubException(string message, Exception innerException)
  36. : base(message, innerException)
  37. {
  38. }
  39. /// <summary>
  40. /// Base constructor to create a new PubSubException
  41. /// </summary>
  42. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  43. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  44. protected PubSubException(SerializationInfo info, StreamingContext context)
  45. : base(info, context)
  46. {
  47. }
  48. }
  49. /// <summary>
  50. /// The exception that is thrown when an error occurs during publish/subscribe initialization.
  51. /// See the inner exception.
  52. /// </summary>
  53. [Serializable()]
  54. public class PubSubInitializationException : SystemException
  55. {
  56. /// <summary>
  57. /// Base constructor to create a new PubSubInitializationException
  58. /// </summary>
  59. public PubSubInitializationException()
  60. : base()
  61. {
  62. }
  63. /// <summary>
  64. /// Base constructor to create a new PubSubInitializationException
  65. /// </summary>
  66. /// <param name="message">The message that describes the error.</param>
  67. public PubSubInitializationException(string message)
  68. : base(message)
  69. {
  70. }
  71. /// <summary>
  72. /// Base constructor to create a new PubSubInitializationException
  73. /// </summary>
  74. /// <param name="message">The error message that explains the reason for the exception.</param>
  75. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  76. public PubSubInitializationException(string message, Exception innerException)
  77. : base(message, innerException)
  78. {
  79. }
  80. /// <summary>
  81. /// Base constructor to create a new PubSubInitializationException
  82. /// </summary>
  83. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  84. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  85. protected PubSubInitializationException(SerializationInfo info, StreamingContext context)
  86. : base(info, context)
  87. {
  88. }
  89. }
  90. /// <summary>
  91. /// The exception is thrown when an error occurs when compiling the method for a filtered subscription.
  92. /// See message.
  93. /// </summary>
  94. [Serializable()]
  95. public class PubSubCompileException : SystemException
  96. {
  97. /// <summary>
  98. /// Base constructor to create a new PubSubCompileException
  99. /// </summary>
  100. public PubSubCompileException()
  101. : base()
  102. {
  103. }
  104. /// <summary>
  105. /// Base constructor to create a new PubSubCompileException
  106. /// </summary>
  107. /// <param name="message">The message that describes the error.</param>
  108. public PubSubCompileException(string message)
  109. : base(message)
  110. {
  111. }
  112. /// <summary>
  113. /// Base constructor to create a new PubSubCompileException
  114. /// </summary>
  115. /// <param name="message">The error message that explains the reason for the exception.</param>
  116. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  117. public PubSubCompileException(string message, Exception innerException)
  118. : base(message, innerException)
  119. {
  120. }
  121. /// <summary>
  122. /// Base constructor to create a new PubSubCompileException
  123. /// </summary>
  124. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  125. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  126. protected PubSubCompileException(SerializationInfo info, StreamingContext context)
  127. : base(info, context)
  128. {
  129. }
  130. }
  131. /// <summary>
  132. /// The exception that is thrown when there is insufficient memory to instantiate the object.
  133. /// </summary>
  134. [Serializable()]
  135. public class PubSubInsufficientMemoryException : SystemException
  136. {
  137. /// <summary>
  138. /// Base constructor to create a new PubSubInsufficientMemoryException
  139. /// </summary>
  140. public PubSubInsufficientMemoryException()
  141. : base()
  142. {
  143. }
  144. /// <summary>
  145. /// Base constructor to create a new PubSubInsufficientMemoryException
  146. /// </summary>
  147. /// <param name="message">The message that describes the error.</param>
  148. public PubSubInsufficientMemoryException(string message)
  149. : base(message)
  150. {
  151. }
  152. /// <summary>
  153. /// Base constructor to create a new PubSubInsufficientMemoryException
  154. /// </summary>
  155. /// <param name="message">The error message that explains the reason for the exception.</param>
  156. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  157. public PubSubInsufficientMemoryException(string message, Exception innerException)
  158. : base(message, innerException)
  159. {
  160. }
  161. /// <summary>
  162. /// Base constructor to create a new PubSubInsufficientMemoryException
  163. /// </summary>
  164. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  165. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  166. protected PubSubInsufficientMemoryException(SerializationInfo info, StreamingContext context)
  167. : base(info, context)
  168. {
  169. }
  170. }
  171. /// <summary>
  172. /// The exception that is thrown when the event system service is not running.
  173. /// </summary>
  174. [Serializable()]
  175. public class PubSubQueueDoesNotExistException : SystemException
  176. {
  177. /// <summary>
  178. /// Base constructor to create a new PubSubQueueDoesNotExistException
  179. /// </summary>
  180. public PubSubQueueDoesNotExistException()
  181. : base()
  182. {
  183. }
  184. /// <summary>
  185. /// Base constructor to create a new PubSubQueueDoesNotExistException
  186. /// </summary>
  187. /// <param name="message">The message that describes the error.</param>
  188. public PubSubQueueDoesNotExistException(string message)
  189. : base(message)
  190. {
  191. }
  192. /// <summary>
  193. /// Base constructor to create a new PubSubQueueDoesNotExistException
  194. /// </summary>
  195. /// <param name="message">The error message that explains the reason for the exception.</param>
  196. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  197. public PubSubQueueDoesNotExistException(string message, Exception innerException)
  198. : base(message, innerException)
  199. {
  200. }
  201. /// <summary>
  202. /// Base constructor to create a new PubSubQueueDoesNotExistException
  203. /// </summary>
  204. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  205. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  206. protected PubSubQueueDoesNotExistException(SerializationInfo info, StreamingContext context)
  207. : base(info, context)
  208. {
  209. }
  210. }
  211. /// <summary>
  212. /// The exception that is thrown when the event system queue is full.
  213. /// </summary>
  214. [Serializable()]
  215. public class PubSubQueueFullException : SystemException
  216. {
  217. /// <summary>
  218. /// Base constructor to create a new PubSubQueueFullException
  219. /// </summary>
  220. public PubSubQueueFullException()
  221. : base()
  222. {
  223. }
  224. /// <summary>
  225. /// Base constructor to create a new PubSubQueueFullException
  226. /// </summary>
  227. /// <param name="message">The message that describes the error.</param>
  228. public PubSubQueueFullException(string message)
  229. : base(message)
  230. {
  231. }
  232. /// <summary>
  233. /// Base constructor to create a new PubSubQueueFullException
  234. /// </summary>
  235. /// <param name="message">The error message that explains the reason for the exception.</param>
  236. /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
  237. public PubSubQueueFullException(string message, Exception innerException)
  238. : base(message, innerException)
  239. {
  240. }
  241. /// <summary>
  242. /// Base constructor to create a new PubSubQueueFullException
  243. /// </summary>
  244. /// <param name="info">The SerializationInfo that holds the serialized object buffer about the exception being thrown.</param>
  245. /// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
  246. protected PubSubQueueFullException(SerializationInfo info, StreamingContext context)
  247. : base(info, context)
  248. {
  249. }
  250. }
  251. }