Handle an exception from cx.evaluate_script more gracefully.

This commit is contained in:
Ms2ger 2014-04-07 17:05:59 +02:00
parent 86c83f7bfc
commit 9ada80e4c0

View file

@ -878,10 +878,10 @@ impl ScriptTask {
}; };
//FIXME: this should have some kind of error handling, or explicitly //FIXME: this should have some kind of error handling, or explicitly
// drop an exception on the floor. // drop an exception on the floor.
assert!(cx.evaluate_script(global_obj, match cx.evaluate_script(global_obj, file.data.clone(), file.url.to_str(), 1) {
file.data.clone(), Ok(_) => (),
file.url.to_str(), Err(_) => println!("evaluate_script failed")
1).is_ok()); }
}); });
} }