eWert-Online / OSnap

OSnap is a snapshot testing tool, which mainly focuses on speed and ease of use.
https://ewert-online.github.io/OSnap/
152 stars 2 forks source link

Exception thrown when a selector isn't found #12

Closed lessp closed 2 years ago

lessp commented 2 years ago

Perhaps the error shown could be more light weight when a selector isn't found?

osnap: internal error, uncaught exception:
       Ppx_yojson_conv_lib__Yojson_conv.Of_yojson_error(_, _)
       Raised at Ppx_yojson_conv_lib__Yojson_conv.of_yojson_error in file "yojson_conv.ml", line 57, characters 34-80
       Called from Lwt.Sequential_composition.map.create_result_promise_and_callback_if_deferred.callback in file "src/core/lwt.ml", line 1981, characters 41-46
       Re-raised at OSnap_Browser__OSnap_Browser_Actions.get_quads.(fun) in file "lib/OSnap_Browser/OSnap_Browser_Actions.re", line 183, characters 2-409
       Re-raised at OSnap_Browser__OSnap_Browser_Actions.click.(fun) in file "lib/OSnap_Browser/OSnap_Browser_Actions.re", line 202, characters 2-1023
       Re-raised at Lwt.Miscellaneous.poll in file "src/core/lwt.ml", line 3072, characters 20-29
       Called from Lwt_main.run.run_loop in file "src/unix/lwt_main.ml", line 31, characters 10-20
       Called from Lwt_main.run in file "src/unix/lwt_main.ml", line 118, characters 8-13
       Re-raised at Lwt_main.run in file "src/unix/lwt_main.ml", line 124, characters 4-13
       Called from Dune__exe__Main.default_cmd.exec in file "bin/Main.re", line 106, characters 11-30
       Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 25, characters 19-24
       Called from Cmdliner.Term.run in file "cmdliner.ml", line 117, characters 32-39
error Command failed with exit code 125.
eWert-Online commented 2 years ago

Jep, I also noticed and wanted to improve this. I will probably look into this this weekend.