impl Error { /// Get an internal error. pub(crate) fn internal() -> Self { Self::from(sec::SEC_ERROR_LIBRARY_FAILURE)
}
/// Get the last error, as returned by `PR_GetError()`. pub(crate) fn last() -> crate::Error { crate::Error::from(Self::from(unsafe { PR_GetError() }))
}
}
impl From<PRErrorCode> for Error { fn from(code: PRErrorCode) -> Self { let name = wrap_str_fn(|| unsafe { PR_ErrorToName(code) }, "UNKNOWN_ERROR"); let desc = wrap_str_fn(
|| unsafe { PR_ErrorToString(code, PR_LANGUAGE_I_DEFAULT) }, "...",
);
Error { name, code, desc }
}
}
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.