InternalServerException.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Net;
  3. namespace OSHttpServer.Exceptions
  4. {
  5. /// <summary>
  6. /// The server encountered an unexpected condition which prevented it from fulfilling the request.
  7. /// </summary>
  8. public class InternalServerException : HttpException
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="InternalServerException"/> class.
  12. /// </summary>
  13. public InternalServerException()
  14. : base(HttpStatusCode.InternalServerError, "The server encountered an unexpected condition which prevented it from fulfilling the request.")
  15. {
  16. }
  17. /// <summary>
  18. /// Initializes a new instance of the <see cref="InternalServerException"/> class.
  19. /// </summary>
  20. /// <param name="message">error message.</param>
  21. public InternalServerException(string message)
  22. : base(HttpStatusCode.InternalServerError, message)
  23. {
  24. }
  25. /// <summary>
  26. /// Initializes a new instance of the <see cref="InternalServerException"/> class.
  27. /// </summary>
  28. /// <param name="message">error message.</param>
  29. /// <param name="inner">inner exception.</param>
  30. public InternalServerException(string message, Exception inner)
  31. : base(HttpStatusCode.InternalServerError, message, inner)
  32. {
  33. }
  34. }
  35. }