reactive_graph_plugin_api/error/
loading.rs1use thiserror::Error;
2
3use crate::springtime_di::component_registry::ComponentDefinitionRegistryError;
4use crate::springtime_di::instance_provider::ComponentInstanceProviderError;
5
6#[derive(Debug, Error)]
7pub enum PluginLoadingError {
8 #[error("Loading the dynamic library (dll/so) failed!")]
9 LoadingDynamicLibraryFailed,
11 #[error("The plugin must be compiled with the same version as the runtime!")]
12 CompilerVersionMismatch,
14 #[error("The version of the plugin API used by the plugin must match with the version of the plugin API used by the runtime")]
15 PluginApiVersionMismatch,
17 #[error("Failed to initialize the plugin container!")]
18 PluginContainerInitializationError,
19 #[error("Failed to globalize the plugin context in the plugin")]
20 GlobalizePluginContextError,
21 #[error("The component definition registry failed with an error: {0}")]
22 ComponentDefinitionRegistryError(ComponentDefinitionRegistryError),
23 #[error("The component instance provider failed with an error: {0}")]
24 ComponentInstanceProviderError(ComponentInstanceProviderError),
25 #[error("The plugin declaration is wrong: {message}")]
26 PluginDeclarationError { message: String },
27}
28
29#[derive(Debug, Error)]
30pub enum PluginUnloadingError {
31 #[error("Failed to unload the plugin!")]
32 UnloadingFailed,
33}