-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made code refactors and error handling simplification
- Loading branch information
1 parent
b42539a
commit 73bc8ea
Showing
4 changed files
with
84 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/target | ||
/local/postgresql/data | ||
*.DS_Store | ||
test_files/osopenusrn_202410.gpkg | ||
test_files/codepo_gb.gpkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
// Example usage | ||
use std::error::Error; | ||
|
||
mod duckdb_load; | ||
|
||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let file_path = "test_files/hotosm_twn_populated_places_points_geojson.geojson"; | ||
fn main() -> Result<(), Box<dyn Error>> { | ||
let file_path = "test_files/GLA_High_Street_boundaries.gpkg"; | ||
println!("Processing file: {}", file_path); | ||
|
||
match duckdb_load::launch_process_file(file_path) { | ||
Ok(_) => Ok(()), | ||
Err(e) => { | ||
eprintln!("Error processing file: {}", e); | ||
Err(Box::new(e)) | ||
} | ||
if let Err(e) = duckdb_load::launch_process_file(file_path) { | ||
eprintln!("Error processing file: {}", e); | ||
return Err(e.into()); | ||
} | ||
|
||
println!("File processed successfully"); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
test file | ||
test file test file test file |