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