MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / take_error

Function take_error

packages/server/src/native/bridge.rs:1362–1370  ·  view source on GitHub ↗
(raw: *mut i8)

Source from the content-addressed store, hash-verified

1360}
1361
1362unsafe fn take_error(raw: *mut i8) -> Option<AppError> {
1363 if raw.is_null() {
1364 return None;
1365 }
1366 let message = CStr::from_ptr(raw).to_string_lossy().into_owned();
1367 ffi::xcw_native_free_string(raw);
1368 schedule_recoverable_restart_if_needed(&message);
1369 Some(AppError::native(message))
1370}
1371
1372fn schedule_recoverable_restart_if_needed(message: &str) {
1373 if std::env::var_os(RESTART_ON_CORE_SIMULATOR_MISMATCH_ENV).is_none()

Callers 10

chrome_button_pngMethod · 0.85
screen_mask_pngMethod · 0.85
screenshot_pngMethod · 0.85
screen_recording_mp4Method · 0.85
stop_screen_recordingMethod · 0.85
create_input_sessionMethod · 0.85
create_sessionMethod · 0.85
string_from_rawFunction · 0.85
bool_resultFunction · 0.85

Tested by

no test coverage detected