(error_code: AfError)
| 87 | #[allow(non_snake_case)] |
| 88 | #[allow(clippy::match_wild_err_arm)] |
| 89 | pub fn HANDLE_ERROR(error_code: AfError) { |
| 90 | let gaurd = match ERROR_HANDLER_LOCK.read() { |
| 91 | Ok(g) => g, |
| 92 | Err(_) => panic!("Failed to acquire lock while handling FFI return value"), |
| 93 | }; |
| 94 | |
| 95 | (*gaurd.deref()).call(error_code); |
| 96 | } |
| 97 | |
| 98 | /// Fetch last error description as String |
| 99 | pub fn get_last_error() -> String { |
no test coverage detected