kursatkobya / libfrizz

libfrizz is a computer software project providing a lightweight library and command-line tool for transferring data
GNU General Public License v3.0
0 stars 1 forks source link

main paniced in case wrong url is entered #32

Closed kursatkobya closed 2 years ago

kursatkobya commented 2 years ago

Describe the bug When the given url is wrong parser throws an exception (main panicked)

» ./target/debug/frizz -D -t https/example.net
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: RelativeUrlWithoutBase', /home/kursat/devel/libfrizz/src/lib.rs:27:64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior There should be a clear message given instead.

Desktop (please complete the following information):

ozkanpakdil commented 2 years ago

if url is not parsable, frizz will inform user and exit. PS D:\Projects\libfrizz> .\target\debug\frizz.exe -D -t https/example.net Exiting because wrong url(https/example.net) and the reason is "relative URL without a base".