/// <summary> /// If an error has occurred, throw it. /// </summary> void Throw() { IntPtr error; LevelDBInterop.leveldb_iter_get_error(Handle, out error); LevelDBException.Check(error); GC.KeepAlive(this); }
/// <summary> /// If an error has occurred, throw it. /// </summary> void Throw(Func <string, Exception> exception) { IntPtr error; LevelDBInterop.leveldb_iter_get_error(this.Handle, out error); if (error != IntPtr.Zero) { throw exception(Marshal.PtrToStringAnsi(error)); } }