本文整理汇总了C++中FatalErrorException函数的典型用法代码示例。如果您正苦于以下问题:C++ FatalErrorException函数的具体用法?C++ FatalErrorException怎么用?C++ FatalErrorException使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FatalErrorException函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FatalErrorException
Variant ThisExpression::set(VariableEnvironment &env, CVarRef val) const {
throw FatalErrorException("Cannot re-assign $this");
}
开发者ID:Neomeng,项目名称:hiphop-php,代码行数:3,代码来源:this_expression.cpp
示例2: getValueRef
CVarRef 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,代码来源:array_data.cpp
示例3: FatalErrorException
void ArrayData::uasort(CVarRef cmp_function) {
throw FatalErrorException("Unimplemented ArrayData::uasort");
}
开发者ID:CyaLiven,项目名称:hiphop-php,代码行数:3,代码来源:array_data.cpp
示例4: File
OutputFile::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,代码来源:output-file.cpp
示例5: getValueRef
CVarRef ArrayData::endRef() {
if (m_pos != invalid_index) {
return getValueRef(iter_end());
}
throw FatalErrorException("invalid ArrayData::m_pos");
}
开发者ID:jbinfo,项目名称:hiphop-php,代码行数:6,代码来源:array-data.cpp
示例6: FatalErrorException
void ArrayData::ZSetStr(ArrayData* ad, StringData* k, RefData* v) {
throw FatalErrorException("Unimplemented ArrayData::ZSetStr");
}
开发者ID:jbinfo,项目名称:hiphop-php,代码行数:3,代码来源:array-data.cpp
示例7: FatalErrorException
ObjectData *FrameInjectionFunction::getThisForArrow() {
if (ObjectData *obj = getThis()) {
return obj;
}
throw FatalErrorException("Using $this when not in object context");
}
开发者ID:HyeongKyu,项目名称:hiphop-php,代码行数:6,代码来源:frame_injection.cpp
示例8: FatalErrorException
int64 MemFile::writeImpl(const char *buffer, int64 length) {
throw FatalErrorException((string("cannot write a mem stream: ") +
m_name).c_str());
}
开发者ID:beride,项目名称:hiphop-php,代码行数:4,代码来源:mem_file.cpp
示例9: assert
void 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,代码来源:asio-context.cpp
示例10: assert
void 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,代码来源:asio_context.cpp
示例11: FatalErrorException
bool 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,代码来源:function_call_expression.cpp
示例12: getValueRef
CVarRef NameValueTableWrapper::currentRef() {
if (m_pos != ArrayData::invalid_index) {
return getValueRef(m_pos);
}
throw FatalErrorException("invalid ArrayData::m_pos");
}
开发者ID:CyaLiven,项目名称:hiphop-php,代码行数:6,代码来源:name_value_table_wrapper.cpp
示例13: FatalErrorException
bool 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,代码来源:temp-file.cpp
示例14: setState
void 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,代码来源:continuation_wait_handle.cpp
示例15: f_func_get_arg
Variant f_func_get_arg(int arg_num) {
throw FatalErrorException("bad HPHP code generation");
}
开发者ID:dipjyotighosh,项目名称:hiphop-php,代码行数:3,代码来源:ext_function.cpp
示例16: f_func_get_args
Array f_func_get_args() {
throw FatalErrorException("bad HPHP code generation");
}
开发者ID:dipjyotighosh,项目名称:hiphop-php,代码行数:3,代码来源:ext_function.cpp
示例17: FatalErrorException
void Expression::byteCodeRefval(ByteCodeProgram &code) const {
throw FatalErrorException("Cannot compile %s:%d", m_loc.file, m_loc.line1);
}
开发者ID:Neomeng,项目名称:hiphop-php,代码行数:4,代码来源:expression.cpp
示例18: FatalErrorException
bool OutputFile::open(const String& filename, const String& mode) {
throw FatalErrorException("cannot open a php://output file ");
}
开发者ID:AmineCherrai,项目名称:hhvm,代码行数:3,代码来源:output-file.cpp
示例19: ASSERT
void 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,代码来源:string_data.cpp
示例20: FatalErrorException
ArrayData*
GlobalsArray::CopyWithStrongIterators(const ArrayData* ad) {
throw FatalErrorException(
"Unimplemented ArrayData::copyWithStrongIterators");
}
开发者ID:shixiao,项目名称:hhvm,代码行数:5,代码来源:globals-array.cpp
注:本文中的FatalErrorException函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论