0

I get this error code

thread 'main' panicked at 'error: 'sciter.dll' was not found neither in PATH nor near the current executable.
  Please verify that Sciter SDK is installed and its binaries (from SDK/bin/64) are available in PATH.', C:\Users\Ex0tic_Python\.cargo\registry\src\github.com-1ecc6299db9ec823\sciter-rs-0.5.58\src/lib.rs:215:21

I was wondering if it was possible to "catch" this error and display something. For example, if this error is raised then the application displays "Error Encountered." How would I go about this?

  • 1
    You can always catch the panic, but this is fragile. The library appears to have no way to try initialize without panicking. You can try loading the DLL yourself and see if it's there. – Chayim Friedman Jun 14 '23 at 09:33
  • Maybe the the author could be open to adding a non-panicing method to the API as well. – Masklinn Jun 14 '23 at 09:38
  • So would I just check if the file exists and if it doesn't then just show the text and never initialize anything? – Ex0tic_Python Jun 14 '23 at 09:38
  • Actually, I found a function which attempts to load the dll and allows you to check whether it failed or not so my problem is solved, thanks. – Ex0tic_Python Jun 14 '23 at 09:42
  • 2
    @Ex0tic_Python Maybe you should post that method as an answer so other people can refer to it later if they face the same problem. – isaactfa Jun 14 '23 at 12:42
  • sorry not very used to stack overflow will do – Ex0tic_Python Jun 15 '23 at 00:23

1 Answers1

0

set_library can check whether the file exists or not

General Grievance
  • 4,555
  • 31
  • 31
  • 45