exception.d 701 B

123456789101112131415161718192021222324252627282930
  1. module vibe.http.internal.http2.hpack.exception;
  2. import std.exception;
  3. T enforceHPACK(T)(T condition, string message = null, string file = __FILE__,
  4. typeof(__LINE__) line = __LINE__) @safe
  5. {
  6. return enforce(condition, new HPACKException(message, file, line));
  7. }
  8. class HPACKException : Exception
  9. {
  10. this(string msg, string file = __FILE__, size_t line = __LINE__) @safe {
  11. super(msg, file, line);
  12. }
  13. }
  14. class HPACKDecoderException : HPACKException
  15. {
  16. this(string msg, string file = __FILE__, size_t line = __LINE__) {
  17. super(msg, file, line);
  18. }
  19. }
  20. class HPACKEncoderException : HPACKException
  21. {
  22. this(string msg, string file = __FILE__, size_t line = __LINE__) {
  23. super(msg, file, line);
  24. }
  25. }