summaryrefslogtreecommitdiff
path: root/lang/csharp/src/DatabaseException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lang/csharp/src/DatabaseException.cs')
-rw-r--r--lang/csharp/src/DatabaseException.cs29
1 files changed, 22 insertions, 7 deletions
diff --git a/lang/csharp/src/DatabaseException.cs b/lang/csharp/src/DatabaseException.cs
index 516a688e..48026bb1 100644
--- a/lang/csharp/src/DatabaseException.cs
+++ b/lang/csharp/src/DatabaseException.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -46,6 +46,8 @@ namespace BerkeleyDB {
throw new LockNotGrantedException();
case ErrorCodes.DB_LOG_BUFFER_FULL:
throw new FullLogBufferException();
+ case ErrorCodes.DB_META_CHKSUM_FAIL:
+ throw new MetaCheckSumFailException();
case ErrorCodes.DB_OLD_VERSION:
throw new OldVersionException();
case ErrorCodes.DB_PAGE_NOTFOUND:
@@ -133,12 +135,12 @@ namespace BerkeleyDB {
/// <summary>
/// The requested key/data pair logically exists but was never explicitly
/// created by the application, or that the requested key/data pair was
- /// deleted and never re-created. In addition, the Queue access method will
- /// throw a KeyEmptyException for records that were created as part of a
+ /// deleted and never re-created. In addition, the Queue access method
+ /// throws a KeyEmptyException for records that were created as part of a
/// transaction that was later aborted and never re-created.
/// </summary>
/// <remarks>
- /// The Recno and Queue access methods will automatically create key/data
+ /// The Recno and Queue access methods automatically create key/data
/// pairs under some circumstances.
/// </remarks>
public class KeyEmptyException : DatabaseException {
@@ -191,7 +193,7 @@ namespace BerkeleyDB {
/// <summary>
/// If <see cref="DatabaseEnvironmentConfig.TimeNotGranted"/> is true,
/// database calls timing out based on lock or transaction timeout values
- /// will throw a LockNotGrantedException, instead of a DeadlockException.
+ /// throw a LockNotGrantedException, instead of a DeadlockException.
/// </summary>
public class LockNotGrantedException : DatabaseException {
/// <summary>
@@ -209,6 +211,19 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// A checksum mismatch was detected on a database metadata page. Either
+ /// the database is corrupted or the file is not a Berkeley DB database
+ /// file.
+ /// </summary>
+ public class MetaCheckSumFailException : DatabaseException {
+ /// <summary
+ /// Initialize a new instance of the MetaCheckSumFailException
+ /// </summary>
+ public MetaCheckSumFailException()
+ : base(ErrorCodes.DB_META_CHKSUM_FAIL) { }
+ }
+
+ /// <summary>
/// The requested key/data pair did not exist in the database or that
/// start-of- or end-of-file has been reached by a cursor.
/// </summary>
@@ -242,7 +257,7 @@ namespace BerkeleyDB {
/// <summary>
/// Berkeley DB has encountered an error it considers fatal to an entire
/// environment. Once a RunRecoveryException has been thrown by any
- /// interface, it will be returned from all subsequent Berkeley DB calls
+ /// interface, it is returned from all subsequent Berkeley DB calls
/// made by any threads of control participating in the environment.
/// </summary>
/// <remarks>
@@ -274,7 +289,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// The version of the Berkeley DB library doesn't match the version that
+ /// The version of the Berkeley DB library does not match the version that
/// created the database environment.
/// </summary>
public class VersionMismatchException : DatabaseException {