BsonInternalException.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Copyright 2010-2014 MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using System;
  16. using System.Runtime.Serialization;
  17. namespace MongoDB.Bson
  18. {
  19. /// <summary>
  20. /// Represents a BSON internal exception (almost surely the result of a bug).
  21. /// </summary>
  22. [Serializable]
  23. public class BsonInternalException : BsonException
  24. {
  25. // constructors
  26. /// <summary>
  27. /// Initializes a new instance of the BsonInternalException class.
  28. /// </summary>
  29. public BsonInternalException()
  30. : base()
  31. {
  32. }
  33. /// <summary>
  34. /// Initializes a new instance of the BsonInternalException class.
  35. /// </summary>
  36. /// <param name="message">The error message.</param>
  37. public BsonInternalException(string message)
  38. : base(message)
  39. {
  40. }
  41. /// <summary>
  42. /// Initializes a new instance of the BsonInternalException class.
  43. /// </summary>
  44. /// <param name="message">The error message.</param>
  45. /// <param name="innerException">The inner exception.</param>
  46. public BsonInternalException(string message, Exception innerException)
  47. : base(message, innerException)
  48. {
  49. }
  50. /// <summary>
  51. /// Initializes a new instance of the BsonInternalException class (this overload used by deserialization).
  52. /// </summary>
  53. /// <param name="info">The SerializationInfo.</param>
  54. /// <param name="context">The StreamingContext.</param>
  55. public BsonInternalException(SerializationInfo info, StreamingContext context)
  56. : base(info, context)
  57. {
  58. }
  59. }
  60. }