ExceptionHandler.cs 616 B

12345678910111213141516
  1. using System;
  2. namespace OSHttpServer
  3. {
  4. /// <summary>
  5. /// We dont want to let the server to die due to exceptions thrown in worker threads.
  6. /// therefore we use this delegate to give you a change to handle uncaught exceptions.
  7. /// </summary>
  8. /// <param name="source">Class that the exception was thrown in.</param>
  9. /// <param name="exception">Exception</param>
  10. /// <remarks>
  11. /// Server will throw a InternalServerException in release version if you dont
  12. /// handle this delegate.
  13. /// </remarks>
  14. public delegate void ExceptionHandler(object source, Exception exception);
  15. }