2019-12-22 10:22:44 -05:00
|
|
|
extern crate rusty_v8 as v8;
|
|
|
|
|
|
|
|
pub fn main() {
|
2020-01-17 23:55:09 -05:00
|
|
|
let mut scope: v8::Scope<v8::HandleScope<v8::Locker>> = mock();
|
|
|
|
let scope = scope.enter();
|
2019-12-22 10:22:44 -05:00
|
|
|
let context: v8::Local<v8::Context> = mock();
|
|
|
|
|
|
|
|
let _leaked = {
|
|
|
|
let mut try_catch = v8::TryCatch::new(scope);
|
|
|
|
let tc = try_catch.enter();
|
|
|
|
let exception = tc.exception().unwrap();
|
|
|
|
let stack_trace = tc.stack_trace(scope, context).unwrap();
|
|
|
|
let message = tc.message().unwrap();
|
|
|
|
(exception, stack_trace, message)
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn mock<T>() -> T {
|
|
|
|
unimplemented!()
|
|
|
|
}
|