Skip to main content

soil_runtime_utilities/
error.rs

1// This file is part of Soil.
2
3// Copyright (C) Soil contributors.
4// Copyright (C) Parity Technologies (UK) Ltd.
5// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
6
7//! Errors types of runtime utilities.
8
9/// Generic result for the runtime utilities.
10pub type Result<T> = std::result::Result<T, Error>;
11
12/// Error type for the runtime utilities.
13#[derive(Debug, thiserror::Error)]
14#[allow(missing_docs)]
15pub enum Error {
16	#[error("Scale codec error: {0}")]
17	ScaleCodec(#[from] codec::Error),
18	#[error("Opaque metadata not found")]
19	OpaqueMetadataNotFound,
20	#[error("Stable metadata version not found")]
21	StableMetadataVersionNotFound,
22	#[error("WASM executor error: {0}")]
23	Executor(#[from] soil_client::executor::common::error::Error),
24}