sfcgal/errors.rs
1use crate::utils::_string;
2use anyhow::Error;
3use sfcgal_sys::w_sfcgal_get_last_error;
4
5/// Type alias for [`Result`] with the error type set to [`Error`].
6pub type Result<T> = std::result::Result<T, Error>;
7
8pub fn get_last_error() -> String {
9 let message = unsafe { w_sfcgal_get_last_error() };
10 _string(message)
11}