Skip to content

src/storage/database_error.hpp

Namespaces

Name
sgns
sgns::storage

Types

Name
enum class uint8_t DatabaseError { OK, NOT_FOUND, CORRUPTION, NOT_SUPPORTED, INVALID_ARGUMENT, IO_ERROR, MERGE_IN_PROGRESS, INCOMPLETE, SHUTDOWN_IN_PROGRESS, TIMED_OUT, ABORTED, BUSY, EXPIRED, TRY_AGAIN_, COMPACTION_TOO_LARGE, COLUMN_FAMILY_DROPPED, UNITIALIZED, UNKNOWN}
universal database interface error

Functions

Name
DatabaseError error_from_rocksdb(rocksdb::Status::Code code)
OUTCOME_HPP_DECLARE_ERROR_2(sgns::storage , DatabaseError )

Types Documentation

enum DatabaseError

Enumerator Value Description
OK
NOT_FOUND
CORRUPTION
NOT_SUPPORTED
INVALID_ARGUMENT
IO_ERROR
MERGE_IN_PROGRESS
INCOMPLETE
SHUTDOWN_IN_PROGRESS
TIMED_OUT
ABORTED
BUSY
EXPIRED
TRY_AGAIN_
COMPACTION_TOO_LARGE
COLUMN_FAMILY_DROPPED
UNITIALIZED
UNKNOWN

universal database interface error

Functions Documentation

function error_from_rocksdb

DatabaseError error_from_rocksdb(
    rocksdb::Status::Code code
)

function OUTCOME_HPP_DECLARE_ERROR_2

OUTCOME_HPP_DECLARE_ERROR_2(
    sgns::storage ,
    DatabaseError 
)

Source code

#pragma once

#include "outcome/outcome.hpp"

#include <rocksdb/status.h>

namespace sgns::storage
{
    enum class DatabaseError : uint8_t
    {
        OK,
        NOT_FOUND,
        CORRUPTION,
        NOT_SUPPORTED,
        INVALID_ARGUMENT,
        IO_ERROR,
        MERGE_IN_PROGRESS,
        INCOMPLETE,
        SHUTDOWN_IN_PROGRESS,
        TIMED_OUT,
        ABORTED,
        BUSY,
        EXPIRED,
        TRY_AGAIN_,
        COMPACTION_TOO_LARGE,
        COLUMN_FAMILY_DROPPED,
        UNITIALIZED,
        UNKNOWN,
    };

    DatabaseError error_from_rocksdb( rocksdb::Status::Code code );
}

OUTCOME_HPP_DECLARE_ERROR_2( sgns::storage, DatabaseError );

Updated on 2026-03-04 at 13:10:45 -0800