JsonWriterException.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #region License
  2. // Copyright 2006 James Newton-King
  3. // http://www.newtonsoft.com
  4. //
  5. // This work is licensed under the Creative Commons Attribution 2.5 License
  6. // http://creativecommons.org/licenses/by/2.5/
  7. //
  8. // You are free:
  9. // * to copy, distribute, display, and perform the work
  10. // * to make derivative works
  11. // * to make commercial use of the work
  12. //
  13. // Under the following conditions:
  14. // * For any reuse or distribution, you must make clear to others the license terms of this work.
  15. // * Any of these conditions can be waived if you get permission from the copyright holder.
  16. #endregion
  17. using System;
  18. using System.Collections.Generic;
  19. using System.Text;
  20. namespace Newtonsoft.Json
  21. {
  22. /// <summary>
  23. /// The exception thrown when an error occurs while reading Json text.
  24. /// </summary>
  25. sealed class JsonWriterException : ArgumentException
  26. {
  27. /// <summary>
  28. /// Initializes a new instance of the <see cref="JsonWriterException"/> class.
  29. /// </summary>
  30. public JsonWriterException()
  31. {
  32. }
  33. /// <summary>
  34. /// Initializes a new instance of the <see cref="JsonWriterException"/> class
  35. /// with a specified error message.
  36. /// </summary>
  37. /// <param name="message">The error message that explains the reason for the exception.</param>
  38. public JsonWriterException(string message)
  39. : base(message)
  40. {
  41. }
  42. /// <summary>
  43. /// Initializes a new instance of the <see cref="JsonWriterException"/> class
  44. /// with a specified error message and a reference to the inner exception that is the cause of this exception.
  45. /// </summary>
  46. /// <param name="message">The error message that explains the reason for the exception.</param>
  47. /// <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>
  48. public JsonWriterException(string message, Exception innerException)
  49. : base(message, innerException)
  50. {
  51. }
  52. }
  53. }