1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openeuler-stratovirt

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
error.rs 2.3 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
Keqian Zhu Отправлено 2 лет назад 46e4d61
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved.
//
// StratoVirt is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan
// PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ConfigError {
#[error("UtilError")]
UtilError {
#[from]
source: util::error::UtilError,
},
#[error("JsonSerde")]
JsonSerde {
#[from]
source: serde_json::Error,
},
#[error("Invalid json field \'{0}\'")]
InvalidJsonField(String),
#[error("Invalid parameter \'{0}\' for \'{1}\'")]
InvalidParam(String, String),
#[error("Unable to parse \'{0}\' for \'{1}\'")]
ConvertValueFailed(String, String),
#[error("Input {0} string's length must be no more than {1}.")]
StringLengthTooLong(String, usize),
#[error("Input field \'{0}\' in {1} is offered more than once.")]
FieldRepeat(String, String),
#[error("Input id \'{0}\' for {1} repeat.")]
IdRepeat(String, String),
#[error("Integer overflow occurred during parse {0}!")]
IntegerOverflow(String),
#[error("Unknown device type: {0}!")]
UnknownDeviceType(String),
#[error("\'{0}\' is missing for \'{1}\' device.")]
FieldIsMissing(&'static str, &'static str),
#[error("{0} must >{1} {2} and <{3} {4}.")]
IllegalValue(String, u64, bool, u64, bool),
#[error("Mac address is illegal.")]
MacFormatError,
#[error("Unknown vhost type.")]
UnknownVhostType,
#[error("{0} is not a regular File.")]
UnRegularFile(String),
#[error("{0} is not a regular file or block device.")]
UnRegularFileOrBlk(String),
#[error("Failed to get metadata of file {0}: {1}.")]
NoMetadata(String, String),
#[error("Input value {0} is unaligned with {1} for {2}.")]
Unaligned(String, u64, u64),
#[error("PFlash unit id given {0} should not be more than {1}")]
UnitIdError(usize, usize),
#[error("Directory {0} does not exist")]
DirNotExist(String),
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/openeuler-stratovirt.git
git@gitlife.ru:oschina-mirror/openeuler-stratovirt.git
oschina-mirror
openeuler-stratovirt
openeuler-stratovirt
v2.2.0-rc6