MCPcopy Create free account
hub / github.com/Kitware/CMake / GetException

Method GetException

Source/cmUVProcessChain.cxx:516–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516std::pair<cmUVProcessChain::ExceptionCode, std::string>
517cmUVProcessChain::Status::GetException() const
518{
519 if (this->SpawnResult) {
520 return std::make_pair(ExceptionCode::Spawn,
521 uv_strerror(this->SpawnResult));
522 }
523#ifdef _WIN32
524 if (this->Finished && (this->ExitStatus & 0xF0000000) == 0xC0000000) {
525 // Child terminated due to exceptional behavior.
526 switch (this->ExitStatus) {
527 case STATUS_CONTROL_C_EXIT:
528 return std::make_pair(ExceptionCode::Interrupt, "User interrupt");
529
530 case STATUS_FLOAT_DENORMAL_OPERAND:
531 return std::make_pair(ExceptionCode::Numerical,
532 "Floating-point exception (denormal operand)");
533 case STATUS_FLOAT_DIVIDE_BY_ZERO:
534 return std::make_pair(ExceptionCode::Numerical, "Divide-by-zero");
535 case STATUS_FLOAT_INEXACT_RESULT:
536 return std::make_pair(ExceptionCode::Numerical,
537 "Floating-point exception (inexact result)");
538 case STATUS_FLOAT_INVALID_OPERATION:
539 return std::make_pair(ExceptionCode::Numerical,
540 "Invalid floating-point operation");
541 case STATUS_FLOAT_OVERFLOW:
542 return std::make_pair(ExceptionCode::Numerical,
543 "Floating-point overflow");
544 case STATUS_FLOAT_STACK_CHECK:
545 return std::make_pair(ExceptionCode::Numerical,
546 "Floating-point stack check failed");
547 case STATUS_FLOAT_UNDERFLOW:
548 return std::make_pair(ExceptionCode::Numerical,
549 "Floating-point underflow");
550# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
551 case STATUS_FLOAT_MULTIPLE_FAULTS:
552 return std::make_pair(ExceptionCode::Numerical,
553 "Floating-point exception (multiple faults)");
554# endif
555# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
556 case STATUS_FLOAT_MULTIPLE_TRAPS:
557 return std::make_pair(ExceptionCode::Numerical,
558 "Floating-point exception (multiple traps)");
559# endif
560 case STATUS_INTEGER_DIVIDE_BY_ZERO:
561 return std::make_pair(ExceptionCode::Numerical,
562 "Integer divide-by-zero");
563 case STATUS_INTEGER_OVERFLOW:
564 return std::make_pair(ExceptionCode::Numerical, "Integer overflow");
565
566 case STATUS_DATATYPE_MISALIGNMENT:
567 return std::make_pair(ExceptionCode::Fault, "Datatype misalignment");
568 case STATUS_ACCESS_VIOLATION:
569 return std::make_pair(ExceptionCode::Fault, "Access violation");
570 case STATUS_IN_PAGE_ERROR:
571 return std::make_pair(ExceptionCode::Fault, "In-page error");
572 case STATUS_INVALID_HANDLE:
573 return std::make_pair(ExceptionCode::Fault, "Invalid handle");

Callers 13

operator==Function · 0.80
printResultsFunction · 0.80
RunMakeCommandMethod · 0.80
RunCommandMethod · 0.80
cmExecuteProcessCommandFunction · 0.80
RunSingleCommandMethod · 0.80
WorkflowMethod · 0.80
ExecuteLinkScriptMethod · 0.80
RunChildMethod · 0.80
ExecuteScriptMethod · 0.80
WriteXMLResultMethod · 0.80
RunMakeCommandMethod · 0.80

Calls 2

uv_strerrorFunction · 0.85
snprintfFunction · 0.50

Tested by 9

operator==Function · 0.64
printResultsFunction · 0.64
RunMakeCommandMethod · 0.64
RunCommandMethod · 0.64
RunChildMethod · 0.64
ExecuteScriptMethod · 0.64
WriteXMLResultMethod · 0.64
RunMakeCommandMethod · 0.64
RunTestMethod · 0.64