当前位置: 首页>>代码示例>>C++>>正文


C++ ThreadState::throw_dest方法代码示例

本文整理汇总了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;
  }
开发者ID:angelim,项目名称:rubinius,代码行数:36,代码来源:system.cpp


注:本文中的ThreadState::throw_dest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。