这篇教程C++ FatalErrorException函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FatalErrorException函数的典型用法代码示例。如果您正苦于以下问题:C++ FatalErrorException函数的具体用法?C++ FatalErrorException怎么用?C++ FatalErrorException使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FatalErrorException函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: FatalErrorExceptionVariant ThisExpression::set(VariableEnvironment &env, CVarRef val) const { throw FatalErrorException("Cannot re-assign $this");}
开发者ID:Neomeng,项目名称:hiphop-php,代码行数:3,
示例2: getValueRefCVarRef ArrayData::endRef() { if (size_t(m_pos) < size_t(size())) { return getValueRef(size() - 1); } throw FatalErrorException("invalid ArrayData::m_pos");}
开发者ID:CyaLiven,项目名称:hiphop-php,代码行数:6,
示例3: FatalErrorExceptionvoid ArrayData::uasort(CVarRef cmp_function) { throw FatalErrorException("Unimplemented ArrayData::uasort");}
开发者ID:CyaLiven,项目名称:hiphop-php,代码行数:3,
示例4: FileOutputFile::OutputFile(const String& filename): File(true, s_php, s_output) { if (filename != s_php_output) { throw FatalErrorException("not a php://output file "); } m_isLocal = true;}
开发者ID:AmineCherrai,项目名称:hhvm,代码行数:6,
示例5: getValueRefCVarRef ArrayData::endRef() { if (m_pos != invalid_index) { return getValueRef(iter_end()); } throw FatalErrorException("invalid ArrayData::m_pos");}
开发者ID:jbinfo,项目名称:hiphop-php,代码行数:6,
示例6: FatalErrorExceptionvoid ArrayData::ZSetStr(ArrayData* ad, StringData* k, RefData* v) { throw FatalErrorException("Unimplemented ArrayData::ZSetStr");}
开发者ID:jbinfo,项目名称:hiphop-php,代码行数:3,
示例7: FatalErrorExceptionObjectData *FrameInjectionFunction::getThisForArrow() { if (ObjectData *obj = getThis()) { return obj; } throw FatalErrorException("Using $this when not in object context");}
开发者ID:HyeongKyu,项目名称:hiphop-php,代码行数:6,
示例8: FatalErrorExceptionint64 MemFile::writeImpl(const char *buffer, int64 length) { throw FatalErrorException((string("cannot write a mem stream: ") + m_name).c_str());}
开发者ID:beride,项目名称:hiphop-php,代码行数:4,
示例9: assertvoid AsioContext::runUntil(c_WaitableWaitHandle* wait_handle) { assert(wait_handle); assert(wait_handle->getContext() == this); auto session = AsioSession::Get(); auto ete_queue = session->getExternalThreadEventQueue(); if (!session->hasAbruptInterruptException()) { session->initAbruptInterruptException(); } while (!wait_handle->isFinished()) { // Run queue of ready async functions once. if (!m_runnableQueue.empty()) { auto current = m_runnableQueue.back(); m_runnableQueue.pop_back(); current->resume(); continue; } // Process all sleep handles that have completed their sleep. if (session->processSleepEvents()) { continue; } // Process all external thread events that have completed their operation. // Queue may contain received unprocessed events from failed runUntil(). if (UNLIKELY(ete_queue->hasReceived()) || ete_queue->tryReceiveSome()) { ete_queue->processAllReceived(); continue; } // Run default priority queue once. if (runSingle(m_priorityQueueDefault)) { continue; } // Wait for pending external thread events... if (!m_externalThreadEvents.empty()) { // ...but only until the next sleeper (from any context) finishes. auto waketime = session->sleepWakeTime(); // Wait if necessary. if (LIKELY(!ete_queue->hasReceived())) { onIOWaitEnter(session); ete_queue->receiveSomeUntil(waketime); onIOWaitExit(session); } if (ete_queue->hasReceived()) { // Either we didn't have to wait, or we waited but no sleeper timed us // out, so just handle the ETEs. ete_queue->processAllReceived(); } else { // No received events means the next-to-wake sleeper timed us out. session->processSleepEvents(); } continue; } // If we're here, then the only things left are sleepers. Wait for one to // be ready (in any context). if (!m_sleepEvents.empty()) { onIOWaitEnter(session); std::this_thread::sleep_until(session->sleepWakeTime()); onIOWaitExit(session); session->processSleepEvents(); continue; } // Run no-pending-io priority queue once. if (runSingle(m_priorityQueueNoPendingIO)) { continue; } // What? The wait handle did not finish? We know it is part of the current // context and since there is nothing else to run, it cannot be in RUNNING // or SCHEDULED state. So it must be BLOCKED on something. Apparently, the // same logic can be used recursively on the something, so there is an // infinite chain of blocked wait handles. But our memory is not infinite. // What could it possibly mean? I think we are in a deep sh^H^Hcycle. // But we can't, the cycles are detected and avoided at blockOn() time. // So, looks like it's not cycle, but the word I started typing first. assert(false); throw FatalErrorException( "Invariant violation: queues are empty, but wait handle did not finish"); }}
开发者ID:RavenB,项目名称:hhvm,代码行数:90,
示例10: assertvoid AsioContext::runUntil(c_WaitableWaitHandle* wait_handle) { assert(!m_current); assert(wait_handle); assert(wait_handle->getContext() == this); auto session = AsioSession::Get(); uint8_t check_ete_counter = 0; while (!wait_handle->isFinished()) { // process ready external thread events once per 256 other events // (when 8-bit check_ete_counter overflows) if (!++check_ete_counter) { auto ete_wh = session->getReadyExternalThreadEvents(); while (ete_wh) { auto next_wh = ete_wh->getNextToProcess(); ete_wh->process(); ete_wh = next_wh; } } // run queue of ready continuations once if (!m_runnableQueue.empty()) { auto current = m_runnableQueue.front(); m_runnableQueue.pop(); m_current = current; m_current->run(); m_current = nullptr; decRefObj(current); continue; } // run default priority queue once if (runSingle(m_priorityQueueDefault)) { continue; } // pending external thread events? wait for at least one to become ready if (!m_externalThreadEvents.empty()) { // all your wait time are belong to us auto ete_wh = session->waitForExternalThreadEvents(); while (ete_wh) { auto next_wh = ete_wh->getNextToProcess(); ete_wh->process(); ete_wh = next_wh; } continue; } // run no-pending-io priority queue once if (runSingle(m_priorityQueueNoPendingIO)) { continue; } // What? The wait handle did not finish? We know it is part of the current // context and since there is nothing else to run, it cannot be in RUNNING // or SCHEDULED state. So it must be BLOCKED on something. Apparently, the // same logic can be used recursively on the something, so there is an // infinite chain of blocked wait handles. But our memory is not infinite. // What could it possibly mean? I think we are in a deep sh^H^Hcycle. // But we can't, the cycles are detected and avoided at blockOn() time. // So, looks like it's not cycle, but the word I started typing first. assert(false); throw FatalErrorException( "Invariant violation: queues are empty, but wait handle did not finish"); }}
开发者ID:Parent5446,项目名称:hiphop-php,代码行数:66,
示例11: FatalErrorExceptionbool FunctionCallExpression::exist(VariableEnvironment &env, int op) const { throw FatalErrorException(0, "Cannot call %s on a function return value", op == T_ISSET ? "isset" : "empty");}
开发者ID:HyeongKyu,项目名称:hiphop-php,代码行数:4,
示例12: getValueRefCVarRef NameValueTableWrapper::currentRef() { if (m_pos != ArrayData::invalid_index) { return getValueRef(m_pos); } throw FatalErrorException("invalid ArrayData::m_pos");}
开发者ID:CyaLiven,项目名称:hiphop-php,代码行数:6,
示例13: FatalErrorExceptionbool TempFile::open(const String& filename, const String& mode) { throw FatalErrorException((std::string("cannot open a temp file ") + m_name).c_str());}
开发者ID:1mr3yn,项目名称:hhvm,代码行数:4,
示例14: setStatevoid c_ContinuationWaitHandle::run() { // may happen if scheduled in multiple contexts if (getState() != STATE_SCHEDULED) { return; } try { setState(STATE_RUNNING); do { // iterate continuation if (m_child.isNull()) { // first iteration or null dependency m_continuation->call_next(); } else if (m_child->isSucceeded()) { // child succeeded, pass the result to the continuation m_continuation->call_send(m_child->getResult()); } else if (m_child->isFailed()) { // child failed, raise the exception inside continuation m_continuation->call_raise(m_child->getException()); } else { throw FatalErrorException( "Invariant violation: child neither succeeded nor failed"); } // continuation finished, retrieve result from its m_value if (m_continuation->m_done) { markAsSucceeded(m_continuation->m_value.asTypedValue()); return; } // set up dependency TypedValue* value = m_continuation->m_value.asTypedValue(); if (IS_NULL_TYPE(value->m_type)) { // null dependency m_child = nullptr; } else { c_WaitHandle* child = c_WaitHandle::fromTypedValue(value); if (UNLIKELY(!child)) { Object e(SystemLib::AllocInvalidArgumentExceptionObject( "Expected yield argument to be an instance of WaitHandle")); throw e; } AsioSession* session = AsioSession::Get(); if (UNLIKELY(session->hasOnContinuationYieldCallback())) { session->onContinuationYield(this, child); } m_child = child; } } while (m_child.isNull() || m_child->isFinished()); // we are blocked on m_child so it must be WaitableWaitHandle assert(dynamic_cast<c_WaitableWaitHandle*>(m_child.get())); blockOn(static_cast<c_WaitableWaitHandle*>(m_child.get())); } catch (const Object& exception) { // process exception thrown by generator or blockOn cycle detection markAsFailed(exception); }}
开发者ID:kodypeterson,项目名称:hiphop-php,代码行数:61,
示例15: f_func_get_argVariant f_func_get_arg(int arg_num) { throw FatalErrorException("bad HPHP code generation");}
开发者ID:dipjyotighosh,项目名称:hiphop-php,代码行数:3,
示例16: f_func_get_argsArray f_func_get_args() { throw FatalErrorException("bad HPHP code generation");}
开发者ID:dipjyotighosh,项目名称:hiphop-php,代码行数:3,
示例17: FatalErrorExceptionvoid Expression::byteCodeRefval(ByteCodeProgram &code) const { throw FatalErrorException("Cannot compile %s:%d", m_loc.file, m_loc.line1);}
开发者ID:Neomeng,项目名称:hiphop-php,代码行数:4,
示例18: FatalErrorExceptionbool OutputFile::open(const String& filename, const String& mode) { throw FatalErrorException("cannot open a php://output file ");}
开发者ID:AmineCherrai,项目名称:hhvm,代码行数:3,
示例19: ASSERTvoid StringData::append(const char *s, int len) { ASSERT(!isStatic()); // never mess around with static strings! if (len == 0) return; if (UNLIKELY(uint32_t(len) > MaxSize)) { throw InvalidArgumentException("len>=2^30", len); } if (UNLIKELY(len + m_len > MaxSize)) { throw FatalErrorException(0, "String length exceeded 2^30 - 1: %u", len + m_len); } int newlen; // TODO: t1122987: in any of the cases below where we need a bigger buffer, // we can probably assume we're in a concat-loop and pick a good buffer // size to avoid O(N^2) copying cost. if (isShared() || isLiteral()) { // buffer is immutable, don't modify it. // We are mutating, so we don't need to repropagate our own taint StringSlice r = slice(); char* newdata = string_concat(r.ptr, r.len, s, len, newlen); if (isShared()) m_big.shared->decRef(); m_len = newlen; m_data = newdata; m_big.cap = newlen | IsMalloc; m_hash = 0; } else if (rawdata() == s) { // appending ourself to ourself, be conservative. // We are mutating, so we don't need to repropagate our own taint StringSlice r = slice(); char *newdata = string_concat(r.ptr, r.len, s, len, newlen); releaseData(); m_len = newlen; m_data = newdata; m_big.cap = newlen | IsMalloc; m_hash = 0; } else if (isSmall()) { // we're currently small but might not be after append. // We are mutating, so we don't need to repropagate our own taint int oldlen = m_len; newlen = oldlen + len; if (unsigned(newlen) <= MaxSmallSize) { // win. memcpy(&m_small[oldlen], s, len); m_small[newlen] = 0; m_small[MaxSmallSize] = 0; m_len = newlen; m_data = m_small; m_hash = 0; } else { // small->big string transition. char *newdata = string_concat(m_small, oldlen, s, len, newlen); m_len = newlen; m_data = newdata; m_big.cap = newlen | IsMalloc; m_hash = 0; } } else { // generic "big string concat" path. realloc buffer. int oldlen = m_len; char* oldp = m_data; ASSERT((oldp > s && oldp - s > len) || (oldp < s && s - oldp > oldlen)); // no overlapping newlen = oldlen + len; char* newdata = (char*) realloc(oldp, newlen + 1); memcpy(newdata + oldlen, s, len); newdata[newlen] = 0; m_len = newlen; m_data = newdata; m_big.cap = newlen | IsMalloc; m_hash = 0; } ASSERT(uint32_t(newlen) <= MaxSize); TAINT_OBSERVER_REGISTER_MUTATED(m_taint_data, rawdata()); ASSERT(checkSane());}
开发者ID:RepmujNetsik,项目名称:hiphop-php,代码行数:74,
示例20: FatalErrorExceptionArrayData*GlobalsArray::CopyWithStrongIterators(const ArrayData* ad) { throw FatalErrorException( "Unimplemented ArrayData::copyWithStrongIterators");}
开发者ID:shixiao,项目名称:hhvm,代码行数:5,
示例21: epvoid HttpRequestHandler::handleRequest(Transport *transport) { ExecutionProfiler ep(ThreadInfo::RuntimeFunctions); Logger::OnNewRequest(); GetAccessLog().onNewRequest(); transport->enableCompression(); ServerStatsHelper ssh("all", true); Logger::Verbose("receiving %s", transport->getCommand().c_str()); // will clear all extra logging when this function goes out of scope StackTraceNoHeap::ExtraLoggingClearer clearer; StackTraceNoHeap::AddExtraLogging("URL", transport->getUrl()); // resolve virtual host const VirtualHost *vhost = HttpProtocol::GetVirtualHost(transport); ASSERT(vhost); if (vhost->disabled() || vhost->isBlocking(transport->getCommand(), transport->getRemoteHost())) { transport->sendString("Not Found", 404); return; } ServerStats::StartRequest(transport->getCommand().c_str(), transport->getRemoteHost(), vhost->getName().c_str()); // resolve source root string host = transport->getHeader("Host"); SourceRootInfo sourceRootInfo(host.c_str()); if (sourceRootInfo.error()) { sourceRootInfo.handleError(transport); return; } // request URI string pathTranslation = m_pathTranslation ? vhost->getPathTranslation().c_str() : ""; RequestURI reqURI(vhost, transport, sourceRootInfo.path(), pathTranslation); if (reqURI.done()) { return; // already handled with redirection or 404 } string path = reqURI.path().data(); string absPath = reqURI.absolutePath().data(); // determine whether we should compress response bool compressed = transport->decideCompression(); const char *data; int len; size_t pos = path.rfind('.'); const char *ext = (pos != string::npos) && path.find('/', pos) == string::npos // no extention in ./foo or ../bar ? (path.c_str() + pos + 1) : NULL; bool cachableDynamicContent = (!RuntimeOption::StaticFileGenerators.empty() && RuntimeOption::StaticFileGenerators.find(path) != RuntimeOption::StaticFileGenerators.end()); // If this is not a php file, check the static and dynamic content caches if (ext && strcasecmp(ext, "php") != 0) { if (RuntimeOption::EnableStaticContentCache) { bool original = compressed; // check against static content cache if (StaticContentCache::TheCache.find(path, data, len, compressed)) { struct stat st; st.st_mtime = 0; String str; // (qigao) not calling stat at this point because the timestamp of // local cache file is not valuable, maybe misleading. This way // the Last-Modified header will not show in response. // stat(RuntimeOption::FileCache.c_str(), &st); if (!original && compressed) { data = gzdecode(data, len); if (data == NULL) { throw FatalErrorException("cannot unzip compressed data"); } compressed = false; str = NEW(StringData)(data, len, AttachString); } sendStaticContent(transport, data, len, st.st_mtime, compressed, path); StaticContentCache::TheFileCache->adviseOutMemory(); ServerStats::LogPage(path, 200); return; } } if (RuntimeOption::EnableStaticContentFromDisk) { String translated = File::TranslatePath(String(absPath)); if (!translated.empty()) { StringBuffer sb(translated.data()); if (sb.valid()) { struct stat st; st.st_mtime = 0; stat(translated.data(), &st); sendStaticContent(transport, sb.data(), sb.size(), st.st_mtime, false, path); ServerStats::LogPage(path, 200); return; }//.........这里部分代码省略.........
开发者ID:activeingredient,项目名称:hiphop-php,代码行数:101,
注:本文中的FatalErrorException函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ FatalErrorIn函数代码示例 C++ FatCompleteRequest函数代码示例 |