use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error(transparent)]
Hosting(#[from] crate::error::HostingError),
#[error(transparent)]
#[cfg(feature = "netcore3_0")]
#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "netcore3_0")))]
GetFunctionPointer(#[from] crate::hostfxr::GetManagedFunctionError),
#[error(transparent)]
LoadHostfxr(#[from] crate::nethost::LoadHostfxrError),
}
impl From<crate::dlopen2::Error> for Error {
fn from(err: crate::dlopen2::Error) -> Self {
Self::LoadHostfxr(crate::nethost::LoadHostfxrError::DlOpen(err))
}
}