您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EXCLOG函数代码示例

51自学网 2021-06-01 20:36:00
  C++
这篇教程C++ EXCLOG函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中EXCLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ EXCLOG函数的具体用法?C++ EXCLOG怎么用?C++ EXCLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了EXCLOG函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CATCH_NEXTROW

 CATCH_NEXTROW() {     ActivityTimer t(totalCycles, timeActivities, NULL);     if(abortSoon || eof || eogNext)     {         eogNext = false;         return NULL;     }     if (refill) {         refill=false;         index=0;         try         {             group.reset(false);             loop {                 OwnedConstThorRow row = input->nextRow();                 if (!row)                     break;                 group.append(row.getClear());                 if (group.isFull()) {                     StringBuffer errStr("GROUPSORT");                     errStr.append("(").append(container.queryId()).append(") ");                     errStr.append("exceeded available memory. records=").append(group.ordinality()).append(", memory usage=").append((unsigned)(group.totalSize()/1024)).append('k');                     IException *e = MakeActivityException(this, TE_TooMuchData, "%s", errStr.str());                     EXCLOG(e, NULL);                     throw e;                 }             }             if (group.ordinality()==0) {                 eof = true;                 return NULL;             }             group.sort(*icompare,!unstable);         }         catch (IOutOfMemException *e)         {             StringBuffer errStr("GROUPSORT");             errStr.append("(").append(container.queryId()).append(") ");             errStr.append("exceeded available memory. records=").append(group.ordinality()).append(", memory usage=").append((unsigned)(group.totalSize()/1024)).append('k');             errStr.append(": ").append(e->errorCode()).append(", ");             e->errorMessage(errStr);             e->Release();             IException *e2 = MakeActivityException(this, TE_TooMuchData, "%s", errStr.str());             EXCLOG(e2, NULL);             throw e2;         }     }     if(index >= group.ordinality())     {         refill = true;         return NULL;    // eog     }     const void *row = group.itemClear(index++);     assertex(row);     dataLinkIncrement();     return row; }
开发者ID:maoge,项目名称:HPCC-Platform,代码行数:57,


示例2: ActPrintLog

void CDiskWriteSlaveActivityBase::process(){    calcFileCrc = false;    uncompressedBytesWritten = 0;    replicateDone = 0;    StringBuffer tmpStr;    fName.set(getPartFilename(*partDesc, 0, tmpStr).str());    if (diskHelperBase->getFlags() & TDXtemporary && !container.queryJob().queryUseCheckpoints())        container.queryTempHandler()->registerFile(fName, container.queryOwner().queryGraphId(), usageCount, true);    try    {        ActPrintLog("handling fname : %s", fName.get());        try        {            open();            assertex(out||outraw);            write();        }        catch (IException *)        {            abortSoon = true;            try { close(); }            catch (IException *e)            {                EXCLOG(e, "close()");                e->Release();            }            throw;        }        catch (CATCHALL)        {            abortSoon = true;            try { close(); }            catch (IException *e)            {                EXCLOG(e, "close()");                e->Release();            }            throw;        }        close();    }    catch (IException *)    {        calcFileCrc = false;        throw;    }    catch(CATCHALL)    {        calcFileCrc = false;        throw;    }    unsigned crc = compress?~0:fileCRC.get();    ActPrintLog("Wrote %" RCPF "d records%s", processed & THORDATALINK_COUNT_MASK, calcFileCrc?StringBuffer(", crc=0x").appendf("%X", crc).str() : "");}
开发者ID:psembi,项目名称:HPCC-Platform,代码行数:56,


示例3: deleteEmptyDir

static bool deleteEmptyDir(IFile *dir){    // this is a bit odd - basically we already know no files but there may be empty sub-dirs    Owned<IDirectoryIterator> iter = dir->directoryFiles(NULL,false,true);    IArrayOf<IFile> subdirs;    bool candelete = true;    ForEach(*iter) {        if (iter->isDir())             subdirs.append(iter->get());        else            candelete = false;    }    if (!candelete)        return false;    try {        ForEachItemIn(i,subdirs) {            if (!deleteEmptyDir(&subdirs.item(i)))                candelete = false;        }    }    catch (IException *e) {        EXCLOG(e,"deleteEmptyDir");        candelete = false;    }    if (!candelete)        return false;    static CriticalSection sect;    CriticalBlock block(sect);      // don't want to actually remove in parallel    dir->remove();    return !dir->exists();}
开发者ID:aa0,项目名称:HPCC-Platform,代码行数:31,


示例4: main

 virtual void main() {     running = true;     loop     {         INode *senderNode;         CMessageBuffer msg;         if (!queryWorldCommunicator().recv(msg, NULL, MPTAG_THORREGISTRATION, &senderNode))             return;         rank_t sender = queryNodeGroup().rank(senderNode);         SocketEndpoint ep = senderNode->endpoint();         StringBuffer url;         ep.getUrlStr(url);         if (RANK_NULL == sender)         {             PROGLOG("Node %s trying to deregister is not part of this cluster", url.str());             continue;         }         RegistryCode code;         msg.read((int &)code);         if (rc_deregister != code)             throwUnexpected();         Owned<IException> e = deserializeException(msg);         if (e.get())             EXCLOG(e, "Slave unregistered with exception");         registry.deregisterNode(sender-1);     }     running = false; }
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:29,


示例5: assertex

//cloned from hthor - a candidate for commoning up.static IKeyIndex *openKeyFile(IDistributedFilePart *keyFile){    unsigned numCopies = keyFile->numCopies();    assertex(numCopies);    for (unsigned copy=0; copy < numCopies; copy++)    {        RemoteFilename rfn;        try        {            OwnedIFile ifile = createIFile(keyFile->getFilename(rfn,copy));            unsigned __int64 thissize = ifile->size();            if (thissize != -1)            {                StringBuffer remotePath;                rfn.getRemotePath(remotePath);                unsigned crc = 0;                keyFile->getCrc(crc);                return createKeyIndex(remotePath.str(), crc, false, false);            }        }        catch (IException *E)        {            EXCLOG(E, "While opening index file");            E->Release();        }    }    RemoteFilename rfn;    StringBuffer url;    keyFile->getFilename(rfn).getRemotePath(url);    throw MakeStringException(1001, "Could not open key file at %s%s", url.str(), (numCopies > 1) ? " or any alternate location." : ".");}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:32,


示例6: main

int main(int argc, char * const * argv){    InitModuleObjects();    try    {        KeyPatchParams params;        getParams(argc, argv, params);        Owned<IKeyDiffApplicator> applicator;        if(params.mode == KEYPATCH_explicit)            applicator.setown(createKeyDiffApplicator(params.patch.str(), params.oldIndex.str(), params.newIndex.str(), params.newTLK.str(), params.overwrite, params.ignoreTLK));        else            applicator.setown(createKeyDiffApplicator(params.patch.str(), params.overwrite, params.ignoreTLK));        if(params.mode == KEYPATCH_info)            showInfo(params.patch.str(), applicator);        else        {            if(params.xmitTLK)                applicator->setTransmitTLK(new CNodeSender(params.tlkPort, params.xmitEp));            else if(params.recvTLK)                applicator->setReceiveTLK(new CNodeReceiver(params.tlkPort), params.recvNum);            if(params.progressFrequency)                applicator->setProgressCallback(new KeyPatchProgressCallback, params.progressFrequency);            applicator->run();        }    }    catch(IException * e)    {        EXCLOG(e);        e->Release();        releaseAtoms();        return 1;    }    releaseAtoms();    return 0;}
开发者ID:lrenn,项目名称:HPCC-Platform,代码行数:35,


示例7: main

int main(int argc, char* argv[]){    InitModuleObjects();    EnableSEHtoExceptionMapping();    if (argc<6)    {        usage();        return 0;    }    try    {        const char *filename = argv[1];        Owned<IDaliCapabilityCreator> cc = createDaliCapabilityCreator();        cc->setSystemID(argv[2]);        cc->setServerPassword(argv[3]);        for (unsigned i=4;i<argc;i++) {            const char *cmd = argv[i++];            if (i==argc)                break;            const char *param = argv[i];            if (stricmp(cmd,"THORWIDTH")==0) {                cc->setLimit(DCR_ThorSlave,atoi(param));            }            else if (stricmp(cmd,"DALINODE")==0) {                StringBuffer mac;                if (strchr(param,'.')) { // must be ip                    IpAddress ip;                    ip.set(param);                    if (!getMAC(ip,mac)) {                        printf("ERROR: could mot get MAC address for %s/n",param);                        return 1;                    }                }                else                    mac.append(param);                cc->addCapability(DCR_DaliServer,mac.str());            }            else {                printf("ERROR: unknown command %s/n",cmd);                return 1;            }        }        StringBuffer results;        cc->save(results);        Owned<IFile> ifile = createIFile(filename);        Owned<IFileIO> ifileio = ifile->open(IFOcreate);        ifileio->write(0,results.length(),results.str());        printf("Dali Capabilities sucessfully exported to %s/n", filename);    }    catch (IException *e)    {        EXCLOG(e);        e->Release();    }    releaseAtoms();    return 0;}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:60,


示例8: nextSmartEndpoint

ISmartSocket *CSmartSocketFactory::connect_timeout( unsigned timeoutms){    SmartSocketEndpoint *ss = nextSmartEndpoint();    if (!ss)        throw createSmartSocketException(0, "smartsocket failed to get nextEndpoint");    ISocket *sock = NULL;    SocketEndpoint ep;    try     {        {            synchronized block(lock);            ss->checkHost(dnsInterval);            ep = ss->ep;        }        if (timeoutms)            sock = ISocket::connect_timeout(ep, timeoutms);        else            sock = ISocket::connect(ep);        return new CSmartSocket(sock, ep, this);    }    catch (IException *e)    {        StringBuffer s("CSmartSocketFactory::connect ");        ep.getUrlStr(s);        EXCLOG(e,s.str());        ss->status=false;        if (sock)            sock->Release();        throw;    }}
开发者ID:RogerDev,项目名称:HPCC-Platform,代码行数:33,


示例9: malloc

void *CJHTreeNode::allocMem(size32_t len){    char *ret = (char *) malloc(len);    if (!ret)    {        Owned<IException> E = MakeStringException(MSGAUD_operator,0, "Out of memory in CJHTreeNode::allocMem, requesting %d bytes", len);        EXCLOG(E);        if (flushJHtreeCacheOnOOM)        {            clearKeyStoreCache(false);            ret = (char *) malloc(len);        }        if (!ret)            throw E.getClear();    }    unsigned __int64 _totalAllocatedCurrent;    unsigned __int64 _totalAllocatedEver;    unsigned _countAllocationsCurrent;    unsigned _countAllocationsEver;    {        SpinBlock b(spin);        totalAllocatedCurrent += len;        totalAllocatedEver += len;        countAllocationsCurrent ++;        countAllocationsEver ++;        _totalAllocatedCurrent = totalAllocatedCurrent;        _totalAllocatedEver = totalAllocatedEver;        _countAllocationsCurrent = countAllocationsCurrent;        _countAllocationsEver = countAllocationsEver;    }    if (traceJHtreeAllocations)        DBGLOG("JHTREE memory usage: Allocated %d - %" I64F "d currently allocated in %d allocations", len, _totalAllocatedCurrent, _countAllocationsCurrent);    return ret;}
开发者ID:kenrowland,项目名称:HPCC-Platform,代码行数:34,


示例10: Do

            void Do(unsigned i)            {                CriticalBlock block(crit);                if (parent->stopped)                    return;                CFileCrcItem &item = parent->list.item(i);                RemoteFilename &rfn = item.filename;                Owned<IFile> partfile;                StringBuffer eps;                try                {                    partfile.setown(createIFile(rfn));                    // PROGLOG("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());                    if (partfile) {                        if (parent->stopped)                            return;                        CriticalUnblock unblock(crit);                        item.crc = partfile->getCRC();                    }                    else                        ok = false;                }                catch (IException *e)                {                    StringBuffer s;                    s.appendf("VERIFY: part %s on %s",partfile->queryFilename(),rfn.queryEndpoint().getUrlStr(eps).str());                    EXCLOG(e, s.str());                    e->Release();                    ok = false;                }            }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:32,


示例11: DBGLOG

bool SafePluginMap::addPlugin(const char *path, const char *dllname){    if (!endsWithIgnoreCase(path, SharedObjectExtension))    {        if (trace)            DBGLOG("Ecl plugin %s ignored", path);        return false;    }    try    {        CriticalBlock b(crit);        ILoadedDllEntry *dll = map.getValue(dllname);        if (!dll)        {            Owned<PluginDll> n = new PluginDll(path, NULL);            if (!n->load(true, false) || !n->init(pluginCtx))                throw MakeStringException(0, "Failed to load plugin %s", path);            if (trace)                n->logLoaded();            map.setValue(dllname, n);  // note: setValue links arg            return true;        }        return false;    }    catch (IException * e) // MORE - not sure why we don't throw exceptions back here...    {        EXCLOG(e, "Loading plugin");        e->Release();        return false;    }}
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:32,


示例12: WARNLOG

void CEclAgentExecutionServer::start(StringBuffer & codeDir){    if (started)    {        WARNLOG("START called when already started/n");        assert(false);    }    codeDirectory = codeDir;    StringBuffer propertyFile = codeDirectory;    addPathSepChar(propertyFile);    propertyFile.append("agentexec.xml");    Owned<IPropertyTree> properties;    try    {        DBGLOG("AgentExec: Loading properties file '%s'/n", propertyFile.str());        properties.setown(createPTreeFromXMLFile(propertyFile.str()));    }    catch (IException *e)     {        EXCLOG(e, "Error processing properties file/n");        throwUnexpected();    }    {        //Build logfile from component properties settings        Owned<IComponentLogFileCreator> lf = createComponentLogFileCreator(properties, "eclagent");        lf->setCreateAliasFile(false);        lf->setMsgFields(MSGFIELD_timeDate | MSGFIELD_msgID | MSGFIELD_process | MSGFIELD_thread | MSGFIELD_code);        lf->beginLogging();        PROGLOG("Logging to %s",lf->queryLogFileSpec());    }    //get name of workunit job queue    StringBuffer sb;    properties->getProp("@name", sb.clear());    agentName.set(sb);    if (!agentName.length())    {        ERRLOG("'name' not specified in properties file/n");        throwUnexpected();    }    //get dali server(s)    properties->getProp("@daliServers", daliServers);    if (!daliServers.length())    {        ERRLOG("'daliServers' not specified in properties file/n");        throwUnexpected();    }    started = true;    Thread::start();    Thread::join();}
开发者ID:aa0,项目名称:HPCC-Platform,代码行数:56,


示例13: notifySelected

    bool notifySelected(ISocket *sock,unsigned selected)    {        while (!done) {            try {                if (closing) {                    closing = false;#ifdef _FULL_TRACE                    PROGLOG("notifySelected calling closedown");#endif                    closedown();#ifdef _FULL_TRACE                    PROGLOG("notifySelected called closedown");#endif                    done = true;                    donesem.signal();                    return false;                }            }            catch (IException *e) {                EXCLOG(e,"CSortMerge notifySelected.1");                exception.setown(e);                done = true;                donesem.signal();                return false;            }            try {                if (processRows())                     return false;   // false correct here            }            catch (IException *e) {                EXCLOG(e,"CSortMerge notifySelected.2");                exception.setown(e);            }            closing = true;            CriticalBlock block(crit);            if (!sock||!socket)                break;            if (sock->avail_read()==0)                break;        }        return false; // false correct here    }
开发者ID:RobertoMalatesta,项目名称:HPCC-Platform,代码行数:42,


示例14: main

int main( int argc, char *argv[] ){    int res=0;    if (argc < 3)    {        printf            ("frunssh <nodelistfile> /"command/" [options] /n"            "    options: -i:<identity-file> /n"            "             -u:<user> /n"            "             -n:<number_of_threads>/n"            "             -t:<connect-timeout-secs>/n"            "             -a:<connect-attempts>/n"            "             -d:<working_directory>/n"            "             -s                -- strict, must match known_hosts/n"            "             -b                -- background/n"            "             -pw:<password>    -- INSECURE: requires pssh (NB identity file preferred)/n"            "             -pe:<password>    -- INSECURE: as -pw except encrypted password/n"            "             -pl               -- use plink (on windows)/n"            "             -v                -- verbose, lists commands run/n"            "             -d                -- dry run (for testing, enables verbose)/n"            );        return 255;    }    InitModuleObjects();#ifndef __64BIT__    // Restrict stack sizes on 32-bit systems    Thread::setDefaultStackSize(0x10000);   // NB under windows requires linker setting (/stack:)#endif    try  {        StringBuffer logname;        splitFilename(argv[0], NULL, NULL, &logname, NULL);        Owned<IComponentLogFileCreator> lf = createComponentLogFileCreator("frunssh");        lf->setCreateAliasFile(false);        lf->setMsgFields(MSGFIELD_prefix);        lf->beginLogging();        Owned<IFRunSSH> runssh = createFRunSSH();        runssh->init(argc,argv);        runssh->exec();    }    catch(IException *e)    {        EXCLOG(e,"frunssh");        e->Release();        res=255;    }    releaseAtoms();    return res;}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:54,


示例15: done

    virtual void done()    {        StringBuffer scopedName;        OwnedRoxieString outputName(helper->getOutputName());        queryThorFileManager().addScope(container.queryJob(), outputName, scopedName);        Owned<IWorkUnit> wu = &container.queryJob().queryWorkUnit().lock();        Owned<IWUResult> r = wu->updateResultBySequence(helper->getSequence());        r->setResultStatus(ResultStatusCalculated);        r->setResultLogicalName(scopedName.str());        r.clear();        wu.clear();        IPropertyTree &patchProps = patchDesc->queryProperties();        if (0 != (helper->getFlags() & KDPexpires))            setExpiryTime(patchProps, helper->getExpiryDays());        IPropertyTree &originalProps = originalDesc->queryProperties();;        if (originalProps.queryProp("ECL"))            patchProps.setProp("ECL", originalProps.queryProp("ECL"));        if (originalProps.getPropBool("@local"))            patchProps.setPropBool("@local", true);        container.queryTempHandler()->registerFile(outputName, container.queryOwner().queryGraphId(), 0, false, WUFileStandard, &clusters);        Owned<IDistributedFile> patchFile;        // set part sizes etc        queryThorFileManager().publish(container.queryJob(), outputName, false, *patchDesc, &patchFile, 0, false);        try { // set file size            if (patchFile) {                __int64 fs = patchFile->getFileSize(true,false);                if (fs!=-1)                    patchFile->queryAttributes().setPropInt64("@size",fs);            }        }        catch (IException *e) {            EXCLOG(e,"keydiff setting file size");            e->Release();        }        // Add a new 'Patch' description to the secondary key.        DistributedFilePropertyLock lock(newIndexFile);        IPropertyTree &fileProps = lock.queryAttributes();        StringBuffer path("Patch[@name=/"");        path.append(scopedName.str()).append("/"]");        IPropertyTree *patch = fileProps.queryPropTree(path.str());        if (!patch) patch = fileProps.addPropTree("Patch", createPTree());        patch->setProp("@name", scopedName.str());        unsigned checkSum;        if (patchFile->getFileCheckSum(checkSum))            patch->setPropInt64("@checkSum", checkSum);        IPropertyTree *index = patch->setPropTree("Index", createPTree());        index->setProp("@name", originalIndexFile->queryLogicalName());        if (originalIndexFile->getFileCheckSum(checkSum))            index->setPropInt64("@checkSum", checkSum);        originalIndexFile->setAccessed();        newIndexFile->setAccessed();    }
开发者ID:eagle518,项目名称:HPCC-Platform,代码行数:54,


示例16: catch

void CSDSServerStatus::stop(){    try {        ::Release(conn);    }    catch (IException *e)   // Dali server may have stopped    {        EXCLOG(e,"CSDSServerStatus::stop");        e->Release();    }    conn = NULL;};
开发者ID:aa0,项目名称:HPCC-Platform,代码行数:12,


示例17: main

int main( int argc, char *argv[] ){    int res=0;    if (argc < 3)    {        printf            ("frunssh <nodelistfile> /"command/" [options] /n"            "    options: -i:<identity-file> /n"            "             -u:<user> /n"            "             -n:<number_of_threads>/n"            "             -t:<connect-timeout-secs>/n"            "             -a:<connect-attempts>/n"            "             -d:<working_directory>/n"            "             -s                -- strict, must match known_hosts/n"            "             -b                -- background/n"            "             -pw:<password>    -- INSECURE: requires pssh (NB identity file preferred)/n"            "             -pe:<password>    -- INSECURE: as -pw except encrypted password/n"            "             -pl               -- use plink (on windows)/n"            "             -v                -- verbose, lists commands run/n"            "             -d                -- dry run (for testing, enables verbose)/n"            );        return 255;    }    InitModuleObjects();    try  {        StringBuffer logname;        splitFilename(argv[0], NULL, NULL, &logname, NULL);        StringBuffer logdir;        if (getConfigurationDirectory(NULL,"log","frunssh",logname.str(),logdir)) {            recursiveCreateDirectory(logdir.str());            StringBuffer tmp(logname);            addPathSepChar(logname.clear().append(logdir)).append(tmp);        }        addFileTimestamp(logname, true);        logname.append(".log");        appendLogFile(logname.str(),0,false);        queryStderrLogMsgHandler()->setMessageFields(MSGFIELD_prefix);        Owned<IFRunSSH> runssh = createFRunSSH();        runssh->init(argc,argv);        runssh->exec();    }    catch(IException *e)    {        EXCLOG(e,"frunssh");        e->Release();        res=255;    }    releaseAtoms();    return res;}
开发者ID:hszander,项目名称:HPCC-Platform,代码行数:53,


示例18: stop

    void stop()    {        try {            if (server)                 server->stop();        }        catch (IException *e) {            EXCLOG(e,"dfuplus(dafilesrvstop)");            e->Release();        }        server.clear();    }
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:13,


示例19: createDigitalSignatureManagerInstanceFromFiles

//Create using given key filespecs//Caller must release when no longer neededIDigitalSignatureManager * createDigitalSignatureManagerInstanceFromFiles(const char * pubKeyFileName, const char *privKeyFileName, const char * passPhrase){#if defined(_USE_OPENSSL) && !defined(_WIN32)    Owned<CLoadedKey> pubKey, privKey;    Owned<IMultiException> exceptions;    if (!isEmptyString(pubKeyFileName))    {        try        {            pubKey.setown(loadPublicKeyFromFile(pubKeyFileName, passPhrase));        }        catch (IException * e)        {            if (!exceptions)                exceptions.setown(makeMultiException("createDigitalSignatureManagerInstanceFromFiles"));            exceptions->append(* makeWrappedExceptionV(e, -1, "createDigitalSignatureManagerInstanceFromFiles:Cannot load public key file"));            e->Release();        }    }    if (!isEmptyString(privKeyFileName))    {        try        {            privKey.setown(loadPrivateKeyFromFile(privKeyFileName, passPhrase));        }        catch (IException * e)        {            if (!exceptions)                exceptions.setown(makeMultiException("createDigitalSignatureManagerInstanceFromFiles"));            exceptions->append(* makeWrappedExceptionV(e, -1, "createDigitalSignatureManagerInstanceFromFiles:Cannot load private key file"));            e->Release();        }    }    // NB: allow it continue if 1 of the keys successfully loaded.    if (exceptions && exceptions->ordinality())    {        if (!pubKey && !privKey)            throw exceptions.getClear();        else            EXCLOG(exceptions, nullptr);    }    return new CDigitalSignatureManager(pubKey, privKey);#else    return nullptr;#endif}
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:53,


示例20: MakeActivityException

void CDiskPartHandlerBase::open() {    unsigned location;    StringBuffer filePath;    if (!(globals->getPropBool("@autoCopyBackup", true)?ensurePrimary(&activity, *partDesc, iFile, location, filePath):getBestFilePart(&activity, *partDesc, iFile, location, filePath, &activity)))    {        StringBuffer locations;        IException *e = MakeActivityException(&activity, TE_FileNotFound, "No physical file part for logical file %s, found at given locations: %s (Error = %d)", activity.logicalFilename.get(), getFilePartLocations(*partDesc, locations).str(), GetLastError());        EXCLOG(e, NULL);        throw e;    }    filename.set(iFile->queryFilename());    ActPrintLog(&activity, "%s[part=%d]: reading physical file '%s' (logical file = %s)", kindStr, which, filePath.str(), activity.logicalFilename.get());    if (checkFileCrc)    {        CDateTime createTime, modifiedTime, accessedTime;        iFile->getTime(&createTime, &modifiedTime, &accessedTime);        const char *descModTimeStr = partDesc->queryProperties().queryProp("@modified");        CDateTime descModTime;        descModTime.setString(descModTimeStr);        if (!descModTime.equals(modifiedTime, false))        {            StringBuffer diskTimeStr;            ActPrintLog(&activity, "WARNING: file (%s); modified date stamps on disk (%s) are not equal to published modified data (%s)", filePath.str(), modifiedTime.getString(diskTimeStr).str(), descModTimeStr);        }    }    ActPrintLog(&activity, "%s[part=%d]: Base offset to %"I64F"d", kindStr, which, fileBaseOffset);    if (compressed)    {        ActPrintLog(&activity, "Reading %s compressed file: %s", (NULL != activity.eexp.get())?"encrypted":blockCompressed?"block":"row", filename.get());        if (checkFileCrc)        {            checkFileCrc = false;            if (activity.crcCheckCompressed) // applies to encrypted too, (optional, default off)            {                ActPrintLog(&activity, "Calculating crc for file: %s", filename.get());                unsigned calcCrc = iFile->getCRC();                // NB: for compressed files should always be ~0                ActPrintLog(&activity, "Calculated crc = %x, storedCrc = %x", calcCrc, storedCrc);                if (calcCrc != storedCrc)                {                    IThorException *e = MakeActivityException(&activity, TE_FileCrc, "CRC Failure validating compressed file: %s", iFile->queryFilename());                    e->setAudience(MSGAUD_operator);                    throw e;                }            }        }    }}
开发者ID:smeda,项目名称:HPCC-Platform,代码行数:51,


示例21: WARNLOG

void CEclAgentExecutionServer::start(){    if (started)    {        WARNLOG("START called when already started/n");        assert(false);    }    Owned<IPropertyTree> properties;    try    {        DBGLOG("AgentExec: Loading properties file 'agentexec.xml'");        properties.setown(createPTreeFromXMLFile("agentexec.xml"));    }    catch (IException *e)     {        EXCLOG(e, "Error processing properties file/n");        throwUnexpected();    }    {        //Build logfile from component properties settings        Owned<IComponentLogFileCreator> lf = createComponentLogFileCreator(properties, "eclagent");        lf->setCreateAliasFile(false);        lf->beginLogging();        PROGLOG("Logging to %s",lf->queryLogFileSpec());    }    //get name of workunit job queue    StringBuffer sb;    properties->getProp("@name", sb.clear());    agentName.set(sb);    if (!agentName.length())    {        ERRLOG("'name' not specified in properties file/n");        throwUnexpected();    }    setStatisticsComponentName(SCThthor, agentName, true);    //get dali server(s)    properties->getProp("@daliServers", daliServers);    if (!daliServers.length())    {        ERRLOG("'daliServers' not specified in properties file/n");        throwUnexpected();    }    started = true;    Thread::start();    Thread::join();}
开发者ID:RobertoMalatesta,项目名称:HPCC-Platform,代码行数:51,


示例22: run

 int run() {     try {         server->run(listenep);     }     catch (IException *e) {         EXCLOG(e,"dfuplus(dafilesrv)");         if (exc.get())             e->Release();         else             exc.setown(e);     }     return 0; }
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:14,


示例23: main

 void main(CMessageBuffer &mb) {     if (hasexceptionhandler)         (parent->*handler)(mb);     else {         try {             (parent->*handler)(mb);         }         catch (IException *e) {             EXCLOG(e, name);             e->Release();         }     }     mb.resetBuffer(); }
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:15,


示例24: getWorkunitFactory

static IWorkUnitFactory * getWorkunitFactory(ICodeContext * ctx){    IEngineContext *engineCtx = ctx->queryEngineContext();    if (engineCtx && !engineCtx->allowDaliAccess())    {        Owned<IException> e = MakeStringException(-1, "workunitservices cannot access Dali in this context - this normally means it is being called from a thor slave");        EXCLOG(e, NULL);        throw e.getClear();    }    //MORE: These should really be set up correctly - probably should be returned from IEngineContext    ISecManager *secmgr = NULL;    ISecUser *secuser = NULL;    return getWorkUnitFactory(secmgr, secuser);}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:15,


示例25: MakeActivityException

static IKeyIndex *openKeyPart(CActivityBase *activity, const char *logicalFilename, IPartDescriptor &partDesc){    unsigned location;    StringBuffer filePath;    OwnedIFile ifile;    if (!(globals->getPropBool("@autoCopyBackup", true)?ensurePrimary(activity, partDesc, ifile, location, filePath):getBestFilePart(activity, partDesc, ifile, location, filePath, activity)))    {        StringBuffer locations;        IException *e = MakeActivityException(activity, TE_FileNotFound, "No physical file part for logical key file %s, found at given locations: %s (Error = %d)", logicalFilename, getFilePartLocations(partDesc, locations).str(), GetLastError());        EXCLOG(e, NULL);        throw e;    }    unsigned crc;    partDesc.getCrc(crc);    return createKeyIndex(filePath.str(), crc, false, false);}
开发者ID:xyuan,项目名称:HPCC-Platform,代码行数:16,


示例26: run

 void run() {     // Get params from HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/DaFileSrv/Parameters          int requireauthenticate=0;     HKEY hkey;     if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,                      "SYSTEM//CurrentControlSet//Services//DaFileSrv//Parameters",                      0,                      KEY_QUERY_VALUE,                      &hkey) == ERROR_SUCCESS) {         DWORD dwType = 0;         DWORD dwSize = sizeof(requireauthenticate);         RegQueryValueEx(hkey,                         "RequireAuthentication",                         NULL,                         &dwType,                         (BYTE*)&requireauthenticate,                         &dwSize);         RegCloseKey(hkey);     }     StringBuffer eps;     if (listenep.isNull())         eps.append(listenep.port);     else         listenep.getUrlStr(eps);     enableDafsAuthentication(requireauthenticate!=0);     PROGLOG("Opening " DAFS_SERVICE_DISPLAY_NAME " on %s%s", useSSL?"SECURE ":"",eps.str());     const char * verstring = remoteServerVersionString();     PROGLOG("Version: %s", verstring);     PROGLOG("Authentication:%s required",requireauthenticate?"":" not");     PROGLOG(DAFS_SERVICE_DISPLAY_NAME " Running");     server.setown(createRemoteFileServer(maxThreads, maxThreadsDelayMs, maxAsyncCopy));     server->setThrottle(ThrottleStd, parallelRequestLimit, throttleDelayMs, throttleCPULimit);     server->setThrottle(ThrottleSlow, parallelSlowRequestLimit, throttleSlowDelayMs, throttleSlowCPULimit);     try {         server->run(listenep, useSSL);     }     catch (IException *e) {         EXCLOG(e,DAFS_SERVICE_NAME);         e->Release();     }     PROGLOG(DAFS_SERVICE_DISPLAY_NAME " Stopped");     stopped = true; }
开发者ID:JamesDeFabia,项目名称:HPCC-Platform,代码行数:45,


示例27: while

int LogMsgChildReceiverThread::run(){    INode * sender;    char ctrl;    while(!done)    {        try        {            if(queryWorldCommunicator().recv(in, 0, MPTAG_JLOG_CONNECT_TO_PARENT, &sender))            {                in.read(ctrl);                if(ctrl=='A')                {                    MPLogId pid;                    in.read(pid);                    MPLogId cid = addChildToManager(pid, sender, false, true);                    StringBuffer buff;                    in.clear().append(cid);                    queryWorldCommunicator().reply(in, MP_ASYNC_SEND);                }                else if(ctrl=='D')                {                    MPLogId cid;                    in.read(cid);                    removeChildFromManager(cid, true);                }                else                    ERRLOG("LogMsgChildReceiverThread::run() : unknown control character on received message");                if(sender) sender->Release();            }        }        catch(IException * e)        {            EXCLOG(e, "LogMsgChildReceiverThread::run()");            e->Release();        }        catch(...)        {            ERRLOG("LogMsgChildReceiverThread::run() : unknown exception");        }    }    return 0;}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:43,


示例28: init

 int init(const char *caller,const char *_path, bool allscopes,bool allfiles) {     if (_path==NULL)         path.set("");     else         path.set(_path);     err = 0;     try {         if (!queryDistributedFileDirectory().loadScopeContents(_path,allscopes?&scopes:NULL,allfiles?&supers:NULL,allfiles?&files:NULL,true))             err = -ENOENT;         else             if (allfiles)                 donefiles = true;     }     catch (IException *e) {         EXCLOG(e,caller);         err = -EFAULT;     }        return err; }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:20,


示例29: stop

    void stop()    {        RECHECK(busy);        if (!stopped) {            stopped = true;            try {#ifdef _FULL_TRACE                PROGLOG("CSocketRowStream.stop(%x)",(unsigned)(memsize_t)socket.get());#endif                bool eof = true;                socket->write(&eof,sizeof(eof)); // confirm stop#ifdef _FULL_TRACE                PROGLOG("CSocketRowStream.stopped(%x)",(unsigned)(memsize_t)socket.get());#endif            }            catch (IException *e) {                EXCLOG(e,"CSocketRowStream::stop");                e->Release();            }        }    }
开发者ID:hszander,项目名称:HPCC-Platform,代码行数:21,


示例30: run

    int run()    {        ICoven &coven=queryCoven();        CMessageHandler<CSessionRequestServer> handler("CSessionRequestServer",this,&CSessionRequestServer::processMessage);        stopped = false;        CMessageBuffer mb;        while (!stopped) {            try {                mb.clear();                if (coven.recv(mb,RANK_ALL,MPTAG_DALI_SESSION_REQUEST,NULL))                    handler.handleMessage(mb);                else                    stopped = true;            }            catch (IException *e)            {                EXCLOG(e, "CDaliPublisherServer");                e->Release();            }        }        return 0;    }
开发者ID:deepinit-arek,项目名称:HPCC-Platform,代码行数:23,



注:本文中的EXCLOG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ EXC_TRY函数代码示例
C++ EXCL函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。