这篇教程C++ ERR_PRINTS函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ERR_PRINTS函数的典型用法代码示例。如果您正苦于以下问题:C++ ERR_PRINTS函数的具体用法?C++ ERR_PRINTS怎么用?C++ ERR_PRINTS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ERR_PRINTS函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CFStringCreateWithCStringError MIDIDriverCoreMidi::open() { CFStringRef name = CFStringCreateWithCString(NULL, "Godot", kCFStringEncodingASCII); OSStatus result = MIDIClientCreate(name, NULL, NULL, &client); CFRelease(name); if (result != noErr) { ERR_PRINTS("MIDIClientCreate failed, code: " + itos(result)); return ERR_CANT_OPEN; } result = MIDIInputPortCreate(client, CFSTR("Godot Input"), MIDIDriverCoreMidi::read, (void *)this, &port_in); if (result != noErr) { ERR_PRINTS("MIDIInputPortCreate failed, code: " + itos(result)); return ERR_CANT_OPEN; } int sources = MIDIGetNumberOfSources(); for (int i = 0; i < sources; i++) { MIDIEndpointRef source = MIDIGetSource(i); if (source) { MIDIPortConnectSource(port_in, source, (void *)this); connected_sources.insert(i, source); } } return OK;}
开发者ID:ISylvox,项目名称:godot,代码行数:28,
示例2: ERR_FAIL_CONDvoid MultiplayerAPI::rsetp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_property, const Variant &p_value) { ERR_FAIL_COND(!p_node->is_inside_tree()); ERR_FAIL_COND(!network_peer.is_valid()); int node_id = network_peer->get_unique_id(); bool is_master = p_node->is_network_master(); bool skip_rset = false; if (p_peer_id == 0 || p_peer_id == node_id || (p_peer_id < 0 && p_peer_id != -node_id)) { //check that send mode can use local call bool set_local = false; const Map<StringName, RPCMode>::Element *E = p_node->get_node_rset_mode(p_property); if (E) { set_local = _should_call_local(E->get(), is_master, skip_rset); } if (set_local) { bool valid; p_node->set(p_property, p_value, &valid); if (!valid) { String error = "rset() aborted in local set, property not found: - " + String(p_property); ERR_PRINTS(error); return; } } else if (p_node->get_script_instance()) { //attempt with script RPCMode rpc_mode = p_node->get_script_instance()->get_rset_mode(p_property); set_local = _should_call_local(rpc_mode, is_master, skip_rset); if (set_local) { bool valid = p_node->get_script_instance()->set(p_property, p_value); if (!valid) { String error = "rset() aborted in local script set, property not found: - " + String(p_property); ERR_PRINTS(error); return; } } } } if (skip_rset) return; const Variant *vptr = &p_value; _send_rpc(p_node, p_peer_id, p_unreliable, true, p_property, &vptr, 1);}
开发者ID:laverneth,项目名称:godot,代码行数:55,
示例3: ERR_PRINTSError DirAccess::copy(String p_from, String p_to, int p_chmod_flags) { //printf("copy %s -> %s/n",p_from.ascii().get_data(),p_to.ascii().get_data()); Error err; FileAccess *fsrc = FileAccess::open(p_from, FileAccess::READ, &err); if (err) { ERR_PRINTS("Failed to open " + p_from); return err; } FileAccess *fdst = FileAccess::open(p_to, FileAccess::WRITE, &err); if (err) { fsrc->close(); memdelete(fsrc); ERR_PRINTS("Failed to open " + p_to); return err; } fsrc->seek_end(0); int size = fsrc->get_position(); fsrc->seek(0); err = OK; while (size--) { if (fsrc->get_error() != OK) { err = fsrc->get_error(); break; } if (fdst->get_error() != OK) { err = fdst->get_error(); break; } fdst->store_8(fsrc->get_8()); } if (err == OK && p_chmod_flags != -1) { fdst->close(); err = FileAccess::set_unix_permissions(p_to, p_chmod_flags); // If running on a platform with no chmod support (i.e., Windows), don't fail if (err == ERR_UNAVAILABLE) err = OK; } memdelete(fsrc); memdelete(fdst); return err;}
开发者ID:Paulloz,项目名称:godot,代码行数:51,
示例4: CRASH_CONDError GDMono::finalize_and_unload_domain(MonoDomain *p_domain) { CRASH_COND(p_domain == NULL); String domain_name = mono_domain_get_friendly_name(p_domain); print_verbose("Mono: Unloading domain `" + domain_name + "`..."); if (mono_domain_get() != root_domain) mono_domain_set(root_domain, true); mono_gc_collect(mono_gc_max_generation()); mono_domain_finalize(p_domain, 2000); mono_gc_collect(mono_gc_max_generation()); _domain_assemblies_cleanup(mono_domain_get_id(p_domain)); MonoException *exc = NULL; mono_domain_try_unload(p_domain, (MonoObject **)&exc); if (exc) { ERR_PRINTS("Exception thrown when unloading domain `" + domain_name + "`"); GDMonoUtils::debug_unhandled_exception(exc); return FAILED; } return OK;}
开发者ID:johnyc90,项目名称:godot,代码行数:28,
示例5: ERR_FAIL_CONDvoid MultiplayerAPI::_process_rpc(Node *p_node, const StringName &p_name, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) { if (!p_node->can_call_rpc(p_name, p_from)) return; ERR_FAIL_COND(p_offset >= p_packet_len); int argc = p_packet[p_offset]; Vector<Variant> args; Vector<const Variant *> argp; args.resize(argc); argp.resize(argc); p_offset++; for (int i = 0; i < argc; i++) { ERR_FAIL_COND(p_offset >= p_packet_len); int vlen; Error err = decode_variant(args[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen); ERR_FAIL_COND(err != OK); //args[i]=p_packet[3+i]; argp[i] = &args[i]; p_offset += vlen; } Variant::CallError ce; p_node->call(p_name, (const Variant **)argp.ptr(), argc, ce); if (ce.error != Variant::CallError::CALL_OK) { String error = Variant::get_call_error_text(p_node, p_name, (const Variant **)argp.ptr(), argc, ce); error = "RPC - " + error; ERR_PRINTS(error); }}
开发者ID:marcelofg55,项目名称:godot,代码行数:34,
示例6: ERR_FAIL_COND_VError ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom) { ERR_FAIL_COND_V(p_image.is_null(), ERR_INVALID_PARAMETER); FileAccess *f = p_custom; if (!f) { Error err; f = FileAccess::open(p_file, FileAccess::READ, &err); if (!f) { ERR_PRINTS("Error opening file: " + p_file); return err; } } String extension = p_file.get_extension(); for (int i = 0; i < loader_count; i++) { if (!loader[i]->recognize(extension)) continue; Error err = loader[i]->load_image(p_image, f); if (err != ERR_FILE_UNRECOGNIZED) { if (!p_custom) memdelete(f); return err; } } if (!p_custom) memdelete(f); return ERR_FILE_UNRECOGNIZED;}
开发者ID:suptoasty,项目名称:godot,代码行数:35,
示例7: point_global_transformvoid SoftBody::_update_cache_pin_points_datas() { if (pinned_points_cache_dirty) { pinned_points_cache_dirty = false; PoolVector<PinnedPoint>::Write w = pinned_points_indices.write(); for (int i = pinned_points_indices.size() - 1; 0 <= i; --i) { if (!w[i].spatial_attachment_path.is_empty()) { w[i].spatial_attachment = Object::cast_to<Spatial>(get_node(w[i].spatial_attachment_path)); if (w[i].spatial_attachment) { Transform point_global_transform(get_global_transform()); point_global_transform.translate(PhysicsServer::get_singleton()->soft_body_get_point_offset(physics_rid, w[i].point_index)); // Local transform relative to spatial attachment node w[i].vertex_offset_transform = w[i].spatial_attachment->get_global_transform().affine_inverse() * point_global_transform; continue; } else { ERR_PRINTS("The node with path: " + String(w[i].spatial_attachment_path) + " was not found or is not a spatial node."); } } // Local transform relative to Soft body w[i].vertex_offset_transform.origin = PhysicsServer::get_singleton()->soft_body_get_point_offset(physics_rid, w[i].point_index); w[i].vertex_offset_transform.basis = Basis(); } }}
开发者ID:dataxerik,项目名称:godot,代码行数:27,
示例8: ERR_EXPLAINvoid MultiplayerAPI::_process_rset(Node *p_node, const StringName &p_name, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) { ERR_EXPLAIN("Invalid packet received. Size too small."); ERR_FAIL_COND(p_offset >= p_packet_len); // Check that remote can call the RSET on this node. RPCMode rset_mode = RPC_MODE_DISABLED; const Map<StringName, RPCMode>::Element *E = p_node->get_node_rset_mode(p_name); if (E) { rset_mode = E->get(); } else if (p_node->get_script_instance()) { rset_mode = p_node->get_script_instance()->get_rset_mode(p_name); } bool can_call = _can_call_mode(p_node, rset_mode, p_from); ERR_EXPLAIN("RSET '" + String(p_name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)rset_mode) + ", master is " + itos(p_node->get_network_master()) + "."); ERR_FAIL_COND(!can_call); Variant value; Error err = decode_variant(value, &p_packet[p_offset], p_packet_len - p_offset, NULL, allow_object_decoding || network_peer->is_object_decoding_allowed()); ERR_EXPLAIN("Invalid packet received. Unable to decode RSET value."); ERR_FAIL_COND(err != OK); bool valid; p_node->set(p_name, value, &valid); if (!valid) { String error = "Error setting remote property '" + String(p_name) + "', not found in object of type " + p_node->get_class(); ERR_PRINTS(error); }}
开发者ID:Paulloz,项目名称:godot,代码行数:32,
示例9: _draw_marginsvoid VisualServerRaster::draw(bool p_swap_buffers, double frame_step) { //needs to be done before changes is reset to 0, to not force the editor to redraw VS::get_singleton()->emit_signal("frame_pre_draw"); changes = 0; VSG::rasterizer->begin_frame(frame_step); VSG::scene->update_dirty_instances(); //update scene stuff VSG::viewport->draw_viewports(); VSG::scene->render_probes(); _draw_margins(); VSG::rasterizer->end_frame(p_swap_buffers); while (frame_drawn_callbacks.front()) { Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object); if (obj) { Variant::CallError ce; const Variant *v = &frame_drawn_callbacks.front()->get().param; obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce); if (ce.error != Variant::CallError::CALL_OK) { String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce); ERR_PRINTS("Error calling frame drawn function: " + err); } } frame_drawn_callbacks.pop_front(); } VS::get_singleton()->emit_signal("frame_post_draw");}
开发者ID:Paulloz,项目名称:godot,代码行数:33,
示例10: _draw_marginsvoid VisualServerRaster::draw(bool p_swap_buffers) { changes = 0; VSG::rasterizer->begin_frame(); VSG::scene->update_dirty_instances(); //update scene stuff VSG::viewport->draw_viewports(); VSG::scene->render_probes(); _draw_margins(); VSG::rasterizer->end_frame(p_swap_buffers); while (frame_drawn_callbacks.front()) { Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object); if (obj) { Variant::CallError ce; const Variant *v = &frame_drawn_callbacks.front()->get().param; obj->call(frame_drawn_callbacks.front()->get().method, &v, 1, ce); if (ce.error != Variant::CallError::CALL_OK) { String err = Variant::get_call_error_text(obj, frame_drawn_callbacks.front()->get().method, &v, 1, ce); ERR_PRINTS("Error calling frame drawn function: " + err); } } frame_drawn_callbacks.pop_front(); } emit_signal("frame_drawn_in_thread");}
开发者ID:Warlaan,项目名称:godot,代码行数:31,
示例11: mono_log_callbackstatic void mono_log_callback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data) { FileAccess *f = GDMonoLog::get_singleton()->get_log_file(); if (GDMonoLog::get_singleton()->get_log_level_id() >= log_level_get_id(log_level)) { String text(message); text += " (in domain "; text += log_domain; if (log_level) { text += ", "; text += log_level; } text += ")/n"; f->seek_end(); f->store_string(text); } if (fatal) { ERR_PRINTS("Mono: FATAL ERROR, ABORTING! Logfile: " + GDMonoLog::get_singleton()->get_log_file_path() + "/n"); // If we were to abort without flushing, the log wouldn't get written. f->flush(); abort(); }}
开发者ID:UgisBrekis,项目名称:godot,代码行数:25,
示例12: mbedtls_ssl_initError StreamPeerMbedTLS::connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs, const String &p_for_hostname) { base = p_base; int ret = 0; int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE; mbedtls_ssl_init(&ssl); mbedtls_ssl_config_init(&conf); mbedtls_ctr_drbg_init(&ctr_drbg); mbedtls_entropy_init(&entropy); ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0); if (ret != 0) { ERR_PRINTS(" failed/n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret)); return FAILED; } mbedtls_ssl_config_defaults(&conf, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT); mbedtls_ssl_conf_authmode(&conf, authmode); mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); mbedtls_ssl_setup(&ssl, &conf); mbedtls_ssl_set_hostname(&ssl, p_for_hostname.utf8().get_data()); mbedtls_ssl_set_bio(&ssl, this, bio_send, bio_recv, NULL); while ((ret = mbedtls_ssl_handshake(&ssl)) != 0) { if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { ERR_PRINTS("TLS handshake error: " + itos(ret)); _print_error(ret); status = STATUS_ERROR_HOSTNAME_MISMATCH; return FAILED; } } connected = true; status = STATUS_CONNECTED; return OK;}
开发者ID:Ranakhamis,项目名称:godot,代码行数:45,
示例13: AudioOutputUnitStartError AudioDriverCoreAudio::capture_start() { OSStatus result = AudioOutputUnitStart(input_unit); if (result != noErr) { ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result)); } return OK;}
开发者ID:Calinou,项目名称:godot,代码行数:9,
示例14: decode_uint32Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, int p_packet_len) { uint32_t target = decode_uint32(&p_packet[1]); Node *node = NULL; if (target & 0x80000000) { // Use full path (not cached yet). int ofs = target & 0x7FFFFFFF; ERR_EXPLAIN("Invalid packet received. Size smaller than declared."); ERR_FAIL_COND_V(ofs >= p_packet_len, NULL); String paths; paths.parse_utf8((const char *)&p_packet[ofs], p_packet_len - ofs); NodePath np = paths; node = root_node->get_node(np); if (!node) ERR_PRINTS("Failed to get path from RPC: " + String(np)); } else { // Use cached path. int id = target; Map<int, PathGetCache>::Element *E = path_get_cache.find(p_from); ERR_EXPLAIN("Invalid packet received. Requests invalid peer cache."); ERR_FAIL_COND_V(!E, NULL); Map<int, PathGetCache::NodeInfo>::Element *F = E->get().nodes.find(id); ERR_EXPLAIN("Invalid packet received. Unabled to find requested cached node."); ERR_FAIL_COND_V(!F, NULL); PathGetCache::NodeInfo *ni = &F->get(); // Do proper caching later. node = root_node->get_node(ni->path); if (!node) ERR_PRINTS("Failed to get cached path from RPC: " + String(ni->path)); } return node;}
开发者ID:Paulloz,项目名称:godot,代码行数:43,
示例15: AudioOutputUnitStopvoid AudioDriverCoreAudio::stop() { if (active) { OSStatus result = AudioOutputUnitStop(audio_unit); if (result != noErr) { ERR_PRINTS("AudioOutputUnitStop failed, code: " + itos(result)); } else { active = false; } }}
开发者ID:93i,项目名称:godot,代码行数:10,
示例16: whilevoid ResourceLoader::finalize() {#ifndef NO_THREADS const LoadingMapKey *K = NULL; while ((K = loading_map.next(K))) { ERR_PRINTS("Exited while resource is being loaded: " + K->path); } loading_map.clear(); memdelete(loading_map_mutex); loading_map_mutex = NULL;#endif}
开发者ID:Paulloz,项目名称:godot,代码行数:11,
示例17: ERR_PRINTSvoid Skeleton::_update_process_order() { if (!process_order_dirty) return; Bone *bonesptr = bones.ptrw(); int len = bones.size(); process_order.resize(len); int *order = process_order.ptrw(); for (int i = 0; i < len; i++) { if (bonesptr[i].parent >= len) { //validate this just in case ERR_PRINTS("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent)); bonesptr[i].parent = -1; } order[i] = i; bonesptr[i].sort_index = i; } //now check process order int pass_count = 0; while (pass_count < len * len) { //using bubblesort because of simplicity, it wont run every frame though. //bublesort worst case is O(n^2), and this may be an infinite loop if cyclic bool swapped = false; for (int i = 0; i < len; i++) { int parent_idx = bonesptr[order[i]].parent; if (parent_idx < 0) continue; //do nothing because it has no parent //swap indices int parent_order = bonesptr[parent_idx].sort_index; if (parent_order > i) { bonesptr[order[i]].sort_index = parent_order; bonesptr[parent_idx].sort_index = i; //swap order SWAP(order[i], order[parent_order]); swapped = true; } } if (!swapped) break; pass_count++; } if (pass_count == len * len) { ERR_PRINT("Skeleton parenthood graph is cyclic"); } process_order_dirty = false;}
开发者ID:Valentactive,项目名称:godot,代码行数:52,
示例18: ERR_PRINTSvoid NativeScriptInstance::notification(int p_notification) {#ifdef DEBUG_ENABLED if (p_notification == MainLoop::NOTIFICATION_CRASH) { if (current_method_call != StringName("")) { ERR_PRINTS("NativeScriptInstance detected crash on method: " + current_method_call); current_method_call = ""; } }#endif Variant value = p_notification; const Variant *args[1] = { &value }; call_multilevel("_notification", args, 1);}
开发者ID:93i,项目名称:godot,代码行数:14,
示例19: definedNetSocketPosix::NetError NetSocketPosix::_get_socket_error() {#if defined(WINDOWS_ENABLED) int err = WSAGetLastError(); if (err == WSAEISCONN) return ERR_NET_IS_CONNECTED; if (err == WSAEINPROGRESS || err == WSAEALREADY) return ERR_NET_IN_PROGRESS; if (err == WSAEWOULDBLOCK) return ERR_NET_WOULD_BLOCK; ERR_PRINTS("Socket error: " + itos(err)); return ERR_NET_OTHER;#else if (errno == EISCONN) return ERR_NET_IS_CONNECTED; if (errno == EINPROGRESS || errno == EALREADY) return ERR_NET_IN_PROGRESS; if (errno == EAGAIN || errno == EWOULDBLOCK) return ERR_NET_WOULD_BLOCK; ERR_PRINTS("Socket error: " + itos(errno)); return ERR_NET_OTHER;#endif}
开发者ID:bigscorpions,项目名称:godot,代码行数:23,
示例20: whileError ConfigFile::load(const String& p_path) { Error err; FileAccess *f= FileAccess::open(p_path,FileAccess::READ,&err); if (!f) return ERR_CANT_OPEN; VariantParser::StreamFile stream; stream.f=f; String assign; Variant value; VariantParser::Tag next_tag; int lines=0; String error_text; String section; while(true) { assign=Variant(); next_tag.fields.clear(); next_tag.name=String(); err = VariantParser::parse_tag_assign_eof(&stream,lines,error_text,next_tag,assign,value,NULL,true); if (err==ERR_FILE_EOF) { memdelete(f); return OK; } else if (err!=OK) { ERR_PRINTS("ConfgFile::load - "+p_path+":"+itos(lines)+" error: "+error_text); memdelete(f); return err; } if (assign!=String()) { set_value(section,assign,value); } else if (next_tag.name!=String()) { section=next_tag.name; } } memdelete(f); return OK;}
开发者ID:03050903,项目名称:godot,代码行数:48,
示例21: set_pending_exceptionvoid set_pending_exception(MonoException *p_exc) {#ifdef HAS_PENDING_EXCEPTIONS if (get_runtime_invoke_count() == 0) { debug_unhandled_exception(p_exc); _UNREACHABLE_(); } if (!mono_runtime_set_pending_exception(p_exc, false)) { ERR_PRINTS("Exception thrown from managed code, but it could not be set as pending:"); GDMonoUtils::debug_print_unhandled_exception(p_exc); }#else debug_unhandled_exception(p_exc); _UNREACHABLE_();#endif}
开发者ID:93i,项目名称:godot,代码行数:16,
示例22: ERR_FAIL_INDEX_VIP_Address IP::get_resolve_item_address(ResolverID p_id) const { ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP_Address()); resolver->mutex->lock(); if (resolver->queue[p_id].status != IP::RESOLVER_STATUS_DONE) { ERR_PRINTS("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet."); resolver->mutex->unlock(); return IP_Address(); } IP_Address res = resolver->queue[p_id].response; resolver->mutex->unlock(); return res;}
开发者ID:Bonfi96,项目名称:godot,代码行数:17,
示例23: _gl_debug_printstatic void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) { if (type == _EXT_DEBUG_TYPE_OTHER_ARB) return; if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) return; //these are ultimately annoying, so removing for now char debSource[256], debType[256], debSev[256]; if (source == _EXT_DEBUG_SOURCE_API_ARB) strcpy(debSource, "OpenGL"); else if (source == _EXT_DEBUG_SOURCE_WINDOW_SYSTEM_ARB) strcpy(debSource, "Windows"); else if (source == _EXT_DEBUG_SOURCE_SHADER_COMPILER_ARB) strcpy(debSource, "Shader Compiler"); else if (source == _EXT_DEBUG_SOURCE_THIRD_PARTY_ARB) strcpy(debSource, "Third Party"); else if (source == _EXT_DEBUG_SOURCE_APPLICATION_ARB) strcpy(debSource, "Application"); else if (source == _EXT_DEBUG_SOURCE_OTHER_ARB) strcpy(debSource, "Other"); if (type == _EXT_DEBUG_TYPE_ERROR_ARB) strcpy(debType, "Error"); else if (type == _EXT_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB) strcpy(debType, "Deprecated behavior"); else if (type == _EXT_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB) strcpy(debType, "Undefined behavior"); else if (type == _EXT_DEBUG_TYPE_PORTABILITY_ARB) strcpy(debType, "Portability"); else if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) strcpy(debType, "Performance"); else if (type == _EXT_DEBUG_TYPE_OTHER_ARB) strcpy(debType, "Other"); if (severity == _EXT_DEBUG_SEVERITY_HIGH_ARB) strcpy(debSev, "High"); else if (severity == _EXT_DEBUG_SEVERITY_MEDIUM_ARB) strcpy(debSev, "Medium"); else if (severity == _EXT_DEBUG_SEVERITY_LOW_ARB) strcpy(debSev, "Low"); String output = String() + "GL ERROR: Source: " + debSource + "/tType: " + debType + "/tID: " + itos(id) + "/tSeverity: " + debSev + "/tMessage: " + message; ERR_PRINTS(output);}
开发者ID:RandomShaper,项目名称:godot,代码行数:46,
示例24: ERR_PRINTSvoid MessageQueue::_call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error) { const Variant **argptrs = NULL; if (p_argcount) { argptrs = (const Variant **)alloca(sizeof(Variant *) * p_argcount); for (int i = 0; i < p_argcount; i++) { argptrs[i] = &p_args[i]; } } Variant::CallError ce; p_target->call(p_func, argptrs, p_argcount, ce); if (p_show_error && ce.error != Variant::CallError::CALL_OK) { ERR_PRINTS("Error calling deferred method: " + Variant::get_call_error_text(p_target, p_func, argptrs, p_argcount, ce)); }}
开发者ID:Bonfi96,项目名称:godot,代码行数:17,
示例25: whilevoid ResourceFormatImporter::get_internal_resource_path_list(const String &p_path, List<String> *r_paths) { Error err; FileAccess *f = FileAccess::open(p_path + ".import", FileAccess::READ, &err); if (!f) return; VariantParser::StreamFile stream; stream.f = f; String assign; Variant value; VariantParser::Tag next_tag; int lines = 0; String error_text; while (true) { assign = Variant(); next_tag.fields.clear(); next_tag.name = String(); err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, NULL, true); if (err == ERR_FILE_EOF) { memdelete(f); return; } else if (err != OK) { ERR_PRINTS("ResourceFormatImporter::get_internal_resource_path_list - " + p_path + ".import:" + itos(lines) + " error: " + error_text); memdelete(f); return; } if (assign != String()) { if (assign.begins_with("path.")) { r_paths->push_back(value); } else if (assign == "path") { r_paths->push_back(value); } } else if (next_tag.name != "remap") { break; } } memdelete(f);}
开发者ID:louisVottero,项目名称:godot,代码行数:45,
示例26: _display_error_with_codestatic void _display_error_with_code(const String &p_error, const Vector<const char *> &p_code) { int line = 1; String total_code; for (int i = 0; i < p_code.size(); i++) { total_code += String(p_code[i]); } Vector<String> lines = String(total_code).split("/n"); for (int j = 0; j < lines.size(); j++) { print_line(itos(line) + ": " + lines[j]); line++; } ERR_PRINTS(p_error);}
开发者ID:louisVottero,项目名称:godot,代码行数:19,
注:本文中的ERR_PRINTS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ERR_PTR函数代码示例 C++ ERR_PRINTF3函数代码示例 |