本文整理汇总了C++中ThreadState::throw_dest方法的典型用法代码示例。如果您正苦于以下问题:C++ ThreadState::throw_dest方法的具体用法?C++ ThreadState::throw_dest怎么用?C++ ThreadState::throw_dest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThreadState
的用法示例。
在下文中一共展示了ThreadState::throw_dest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vm_thread_state
Tuple* System::vm_thread_state(STATE) {
ThreadState* ts = state->thread_state();
Tuple* tuple = Tuple::create(state, 5);
Symbol* reason = 0;
switch(ts->raise_reason()) {
case cNone:
reason = state->symbol("none");
break;
case cException:
reason = state->symbol("exception");
break;
case cReturn:
reason = state->symbol("return");
break;
case cBreak:
reason = state->symbol("break");
break;
case cExit:
reason = state->symbol("exit");
break;
case cCatchThrow:
reason = state->symbol("catch_throw");
break;
default:
reason = state->symbol("unknown");
}
tuple->put(state, 0, reason);
tuple->put(state, 1, ts->raise_value());
tuple->put(state, 2, ts->destination_scope());
tuple->put(state, 3, ts->current_exception());
tuple->put(state, 4, ts->throw_dest());
return tuple;
}