/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis *file,Youcanobtainoneathttp://mozilla.org/MPL/2.0/.
*/
use error_support::{ErrorHandling, GetErrorHandling};
/// Errors we return via the public interface. #[derive(Debug, thiserror::Error, uniffi::Error)] pubenum RelevancyApiError { #[error("Unexpected Error: {reason}")]
Unexpected { reason: String },
}
/// Errors we use internally #[derive(Debug, thiserror::Error)] pubenum Error { #[error("Error opening database: {0}")]
OpenDatabase(#[from] sql_support::open_database::Error),
#[error("Error retrieving bandit data for bandit {bandit} and arm {arm}")]
BanditNotFound { bandit: String, arm: String },
}
/// Result enum for the public API pubtype ApiResult<T> = std::result::Result<T, RelevancyApiError>;
/// Result enum for internal functions pubtype Result<T> = std::result::Result<T, Error>;
// Define how our internal errors are handled and converted to external errors // See `support/error/README.md` for how this works, especially the warning about PII. impl GetErrorHandling for Error { type ExternalError = RelevancyApiError;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.