Browse Source

using context in error handling

tags/v0.3.11-rc1
Shar-jeel-Sajid 10 months ago
parent
commit
4647ee23c8
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libraries/arrow-convert/src/lib.rs

+ 1
- 2
libraries/arrow-convert/src/lib.rs View File

@@ -46,8 +46,7 @@ macro_rules! register_array_handlers {

let mut result = Vec::with_capacity(buffer.len());
for &v in buffer.values() {
let converted = NumCast::from(v).ok_or_else(||
eyre!("Failed to cast value from {} to target type", $type_name))?;
let converted = NumCast::from(v).context(format!("Failed to cast value from {} to target type",$type_name))?;
result.push(converted);
}
Ok(result)


Loading…
Cancel
Save