We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e74ccfb commit 4248536Copy full SHA for 4248536
src/proj.rs
@@ -125,6 +125,8 @@ pub enum ProjError {
125
DownloadError(String, String, u8),
126
#[error("The current definition could not be retrieved")]
127
Definition,
128
+ #[error("The definition could not be represented in the requested JSON format")]
129
+ ExportToJson,
130
}
131
132
#[cfg(feature = "network")]
@@ -1107,8 +1109,7 @@ impl Proj {
1107
1109
unsafe {
1108
1110
let out_ptr = proj_as_projjson(self.ctx, self.c_proj, opts_ptrs.as_ptr());
1111
if out_ptr.is_null() {
- // Not sure the best way to retrieve and return the error
- todo!()
1112
+ Err(ProjError::ExportToJson)
1113
} else {
1114
Ok(_string(out_ptr)?)
1115
0 commit comments