mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
wasmer-c-api:
* error.rs - changing `update_last_error` visibility to `pub`. * error.rs - changing `CApiError` `msg` field visibility to `pub`.
This commit is contained in:
parent
015616b541
commit
f04d552361
@ -11,7 +11,7 @@ thread_local! {
|
|||||||
static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
|
static LAST_ERROR: RefCell<Option<Box<Error>>> = RefCell::new(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn update_last_error<E: Error + 'static>(err: E) {
|
pub fn update_last_error<E: Error + 'static>(err: E) {
|
||||||
LAST_ERROR.with(|prev| {
|
LAST_ERROR.with(|prev| {
|
||||||
*prev.borrow_mut() = Some(Box::new(err));
|
*prev.borrow_mut() = Some(Box::new(err));
|
||||||
});
|
});
|
||||||
@ -89,8 +89,8 @@ pub unsafe extern "C" fn wasmer_last_error_message(buffer: *mut c_char, length:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct CApiError {
|
pub struct CApiError {
|
||||||
pub(crate) msg: String,
|
pub msg: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for CApiError {
|
impl Display for CApiError {
|
||||||
|
Loading…
Reference in New Issue
Block a user