Esempio n. 1
0
void invalid_type::throw_(const char* file, std::size_t line, std::string const& descr)
{
    boost::throw_exception(boost::enable_error_info(invalid_type(descr))
        << boost::throw_file(file)
        << boost::throw_line(line)
    );
}
Esempio n. 2
0
void invalid_type::throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name, typeindex::type_index const& type)
{
    boost::throw_exception(boost::enable_error_info(invalid_type(descr))
        << boost::throw_file(file)
        << boost::throw_line(line)
        << attribute_name_info(name)
        << type_info_info(type)
    );
}
Esempio n. 3
0
int new_mj_new_object(ast *class_id, ast **node)
{
    mj_new_object *no;
   
    if(!is_of_type(MJ_IDENTIFIER, class_id)) {
        return invalid_type(node);
    }

    no = jrv_malloc(sizeof(mj_new_object));
    no->type = MJ_NEW_OBJECT;
    no->class_id = (mj_identifier *) class_id;
    *node = (ast *) no;
    return JRV_SUCCESS;
}