diff options
author | Teddy Wing | 2019-11-02 01:08:06 +0100 |
---|---|---|
committer | Teddy Wing | 2019-11-02 01:08:06 +0100 |
commit | 65305566946555ec78596e57e48c551a3dbf9dc8 (patch) | |
tree | 739cc1ce296f99db12526977987f500fbd459ad3 /src | |
parent | 4edf6b9525521d65edfc9faa4097ffb8b114799f (diff) | |
download | pdf-urls-65305566946555ec78596e57e48c551a3dbf9dc8.tar.bz2 |
main: Handle error from `get_urls_from_pdf`
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index d8bb0d5..9bd5c37 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,8 @@ use pdf_urls::get_urls_from_pdf; fn main() { - get_urls_from_pdf("example.pdf").unwrap(); + match get_urls_from_pdf("example.pdf") { + Ok(_) => (), + Err(err) => eprintln!("error: {}", err), + } } |