示例#1
0
        /// <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);
        }
示例#2
0
        /// <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));
            }
        }