示例#1
0
文件: app.c 项目: gensym/shoes
static VALUE
shoes_app_exception(VALUE rb_exec, VALUE e)
{
  shoes_exec *exec = (shoes_exec *)rb_exec;
  rb_ary_clear(exec->app->nesting);
  shoes_canvas_error(exec->canvas, e);
  return Qnil;
}
示例#2
0
shoes_code
shoes_load(char *path)
{
    char bootup[SHOES_BUFSIZE];

    if (path)
    {
        sprintf(bootup, "Shoes.visit(%%q<%s>);", path);

        VALUE v = rb_rescue2(CASTHOOK(shoes_load_begin), (VALUE)bootup, CASTHOOK(shoes_load_exception), Qnil, rb_cObject, 0);
        if (rb_obj_is_kind_of(v, rb_eException))
        {
            shoes_canvas_error(Qnil, v);
            rb_eval_string("Shoes.show_log");
        }
    }

    return SHOES_OK;
}
示例#3
0
文件: ruby.c 项目: Shoes3/shoes3
static VALUE shoes_safe_block_exception(VALUE rb_sb, VALUE e) {
    safe_block *sb = (safe_block *)rb_sb;
    shoes_canvas_error(sb->canvas, e);
    return Qnil;
}