ant_logging/error.rs
1// Copyright 2024 MaidSafe.net limited.
2//
3// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3.
4// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed
5// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
6// KIND, either express or implied. Please review the Licences for the specific language governing
7// permissions and limitations relating to use of the SAFE Network Software.
8
9use thiserror::Error;
10
11pub(super) type Result<T, E = Error> = std::result::Result<T, E>;
12/// Internal error.
13#[derive(Debug, Error)]
14pub enum Error {
15 #[error(transparent)]
16 Io(#[from] std::io::Error),
17
18 #[error(transparent)]
19 ReloadError(#[from] tracing_subscriber::reload::Error),
20
21 #[cfg(feature = "otlp")]
22 #[error("OpenTelemetry Tracing error: {0}")]
23 OpenTelemetryTracing(#[from] opentelemetry::trace::TraceError),
24
25 #[error("Could not configure logging: {0}")]
26 LoggingConfiguration(String),
27}