error.rs 1 KB
Newer Older
1
// Copyright 2018-2021 Parity Technologies (UK) Ltd.
Hero Bird's avatar
Hero Bird committed
2
//
3
4
5
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Hero Bird's avatar
Hero Bird committed
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
Hero Bird's avatar
Hero Bird committed
8
//
9
10
11
12
13
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Hero Bird's avatar
Hero Bird committed
14

15
/// A dispatch result.
Hero Bird's avatar
Hero Bird committed
16
#[doc(hidden)]
17
18
19
pub type DispatchResult = core::result::Result<(), DispatchError>;

/// A dispatch error.
20
#[derive(Debug, Copy, Clone)]
Hero Bird's avatar
Hero Bird committed
21
#[doc(hidden)]
22
23
24
25
26
27
28
29
30
31
pub enum DispatchError {
    UnknownSelector,
    UnknownInstantiateSelector,
    UnknownCallSelector,

    InvalidParameters,
    InvalidInstantiateParameters,
    InvalidCallParameters,

    CouldNotReadInput,
32
    PaidUnpayableMessage,
33
}