suborbital / javy

JS to WebAssembly toolchain
Apache License 2.0
10 stars 2 forks source link

Don't panic when a global is missing #9

Open cohix opened 2 years ago

cohix commented 2 years ago

Right now Javy will panic if something is missing from global because of line 212 in core/lib.rs:

        let _ = context.eval_global(SCRIPT_NAME, &contents).unwrap();

We should match on that instead of unwrapping and provide a sane error instead of panicking.