• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ERROR_MESSAGE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: printLastError

/*
 * Print the last transport error
 */
static void
printLastError(jdwpTransportEnv *t, jdwpTransportError err)
{
    char  *msg;
    jbyte *utf8msg;
    jdwpTransportError rv;

    msg     = NULL;
    utf8msg = NULL;
    rv = (*t)->GetLastError(t, &msg); /* This is a platform encoded string */
    if ( msg != NULL ) {
        int len;
        int maxlen;

        /* Convert this string to UTF8 */
        len = (int)strlen(msg);
        maxlen = len+len/2+2; /* Should allow for plenty of room */
        utf8msg = (jbyte*)jvmtiAllocate(maxlen+1);
        (void)(gdata->npt->utf8FromPlatform)(gdata->npt->utf,
            msg, len, utf8msg, maxlen);
        utf8msg[maxlen] = 0;
    }
    if (rv == JDWPTRANSPORT_ERROR_NONE) {
        ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
    } else if ( msg!=NULL ) {
        ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
    } else {
        ERROR_MESSAGE(("transport error %d: %s",err, "UNKNOWN"));
    }
    jvmtiDeallocate(msg);
    jvmtiDeallocate(utf8msg);
}
开发者ID:digideskio,项目名称:openjdk-fontfix,代码行数:35,代码来源:transport.c


示例2: DP_MultipleLocalBlockAlignGeneric

int DP_MultipleLocalBlockAlignGeneric(
    const DP_BlockInfo *blocks, DP_BlockScoreFunction BlockScore, DP_LoopPenaltyFunction LoopScore,
    unsigned int queryFrom, unsigned int queryTo,
    DP_MultipleAlignmentResults **alignments, unsigned int maxAlignments)
{
    if (!blocks || blocks->nBlocks < 1 || !blocks->blockSizes || !BlockScore || queryTo < queryFrom) {
        ERROR_MESSAGE("DP_MultipleLocalBlockAlignGeneric() - invalid parameters");
        return STRUCT_DP_PARAMETER_ERROR;
    }
    for (unsigned int block=0; block<blocks->nBlocks; ++block) {
        if (blocks->freezeBlocks[block] != DP_UNFROZEN_BLOCK) {
            WARNING_MESSAGE("DP_MultipleLocalBlockAlignGeneric() - frozen block specifications are ignored...");
            break;
        }
    }

    Matrix matrix(blocks->nBlocks, queryTo - queryFrom + 1);

    int status = CalculateLocalMatrixGeneric(matrix, blocks, BlockScore, LoopScore, queryFrom, queryTo);
    if (status != STRUCT_DP_OKAY) {
        ERROR_MESSAGE("DP_MultipleLocalBlockAlignGeneric() - CalculateLocalMatrixGeneric() failed");
        return status;
    }

    return TracebackMultipleLocalAlignments(matrix, blocks, queryFrom, queryTo, alignments, maxAlignments);
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:26,代码来源:block_align.cpp


示例3: DP_GlobalBlockAlign

int DP_GlobalBlockAlign(
    const DP_BlockInfo *blocks, DP_BlockScoreFunction BlockScore,
    unsigned int queryFrom, unsigned int queryTo,
    DP_AlignmentResult **alignment)
{
    if (!blocks || blocks->nBlocks < 1 || !blocks->blockSizes || !BlockScore || queryTo < queryFrom) {
        ERROR_MESSAGE("DP_GlobalBlockAlign() - invalid parameters");
        return STRUCT_DP_PARAMETER_ERROR;
    }

    unsigned int i, sumBlockLen = 0;
    for (i=0; i<blocks->nBlocks; ++i)
        sumBlockLen += blocks->blockSizes[i];
    if (sumBlockLen > queryTo - queryFrom + 1) {
        ERROR_MESSAGE("DP_GlobalBlockAlign() - sum of block lengths longer than query region");
        return STRUCT_DP_PARAMETER_ERROR;
    }

    int status = ValidateFrozenBlockPositions(blocks, queryFrom, queryTo, true);
    if (status != STRUCT_DP_OKAY) {
        ERROR_MESSAGE("DP_GlobalBlockAlign() - ValidateFrozenBlockPositions() returned error");
        return status;
    }

    Matrix matrix(blocks->nBlocks, queryTo - queryFrom + 1);

    status = CalculateGlobalMatrix(matrix, blocks, BlockScore, queryFrom, queryTo);
    if (status != STRUCT_DP_OKAY) {
        ERROR_MESSAGE("DP_GlobalBlockAlign() - CalculateGlobalMatrix() failed");
        return status;
    }

    return TracebackGlobalAlignment(matrix, blocks, queryFrom, queryTo, alignment);
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:34,代码来源:block_align.cpp


示例4: TracebackGlobalAlignment

int TracebackGlobalAlignment(const Matrix& matrix,
    const DP_BlockInfo *blocks, unsigned int queryFrom, unsigned int queryTo,
    DP_AlignmentResult **alignment)
{
    if (!alignment) {
        ERROR_MESSAGE("TracebackGlobalAlignment() - NULL alignment handle");
        return STRUCT_DP_PARAMETER_ERROR;
    }
    *alignment = NULL;

    // find max score (e.g., best-scoring position of last block)
    int score = DP_NEGATIVE_INFINITY;
    unsigned int residue, lastBlockPos = 0;
    for (residue=queryFrom; residue<=queryTo; ++residue) {
        if (matrix[blocks->nBlocks - 1][residue - queryFrom].score > score) {
            score = matrix[blocks->nBlocks - 1][residue - queryFrom].score;
            lastBlockPos = residue;
        }
    }

    if (score == DP_NEGATIVE_INFINITY) {
        ERROR_MESSAGE("TracebackGlobalAlignment() - somehow failed to find any allowed global alignment");
        return STRUCT_DP_ALGORITHM_ERROR;
    }

//    INFO_MESSAGE("Score of best global alignment: " << score);
    *alignment = new DP_AlignmentResult;
    return TracebackAlignment(matrix, blocks->nBlocks - 1, lastBlockPos, queryFrom, *alignment);
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:29,代码来源:block_align.cpp


示例5: get

INTERNAL_TYPE_GRID_PA GridPA :: get(INTERNAL_SIZE_GRID_PA seq, INTERNAL_SIZE_SEQ_GRID_PA pos){
	if(seq>size()){
		ERROR_MESSAGE("Invalid sequence ("<< seq <<").");
	}
	if(pos>size(seq)){
		ERROR_MESSAGE("Invalid pos in sequence ("<< pos <<").");
	}
	return v_sequences[seq][pos];
}
开发者ID:rahya,项目名称:simple-precedence-checker,代码行数:9,代码来源:Grid.cpp


示例6: CHKMerror

/** <!--******************************************************************-->
 *
 * @fn CHKMerror
 *
 * @brief Touched the node and its sons/attributes
 *
 * @param arg_node Error node to process
 * @param arg_info pointer to info structure
 *
 * @return processed node
 *
 ***************************************************************************/
node *
CHKMerror (node * arg_node, info * arg_info)
{
  DBUG_ENTER ("CHKMerror");
  NODE_ERROR (arg_node) = CHKMTRAV (NODE_ERROR (arg_node), arg_info);
  ERROR_NEXT (arg_node) = CHKMTRAV (ERROR_NEXT (arg_node), arg_info);
  ERROR_MESSAGE (arg_node) =
    CHKMattribString (ERROR_MESSAGE (arg_node), arg_info);
  DBUG_RETURN (arg_node);
}
开发者ID:ksbhat,项目名称:CoCoKS,代码行数:22,代码来源:check_node.c


示例7: createGIF

	bool createGIF(string fileName, bool show) {
		if (!createImage(fileName, "gif")) {
			ERROR_MESSAGE("FSMmodel::createGIF - unable to create GIF from DOT file. Check Graphviz\bin is your PATH.");
			return false;
		}
		if (show && !showImage(fileName + ".gif")) {
			ERROR_MESSAGE("FSMmodel::createGIF - unable to show GIF");
			return false;
		}
		return true;
	}
开发者ID:Soucha,项目名称:FSMlib,代码行数:11,代码来源:FSMmodel.cpp


示例8: createPNG

	bool createPNG(string fileName, bool show) {
		if (!createImage(fileName, "png")) {
			ERROR_MESSAGE("FSMmodel::createPNG - unable to create PNG from DOT file. Check Graphviz\bin is your PATH.");
			return false;
		}
		if (show && !showImage(fileName + ".png")) {
			ERROR_MESSAGE("FSMmodel::createPNG - unable to show PNG");
			return false;
		}
		return true;
	}
开发者ID:Soucha,项目名称:FSMlib,代码行数:11,代码来源:FSMmodel.cpp


示例9: yacc_at

void
yacc_at (location loc, const char *message, ...)
{
  if (yacc_flag)
    {
      ERROR_MESSAGE (&loc, NULL, message);
      complaint_issued = true;
    }
  else if (warnings_flag & warnings_yacc)
    {
      set_warning_issued ();
      ERROR_MESSAGE (&loc, _("warning"), message);
    }
}
开发者ID:blipvert,项目名称:bison-php,代码行数:14,代码来源:complain.c


示例10: COPYerror

/** <!--******************************************************************-->
 *
 * @fn COPYerror
 *
 * @brief Copies the node and its sons/attributes
 *
 * @param arg_node Error node to process
 * @param arg_info pointer to info structure
 *
 * @return processed node
 *
 ***************************************************************************/
node *
COPYerror (node * arg_node, info * arg_info)
{
  node *result = TBmakeError (NULL, PH_initial, NULL);
  DBUG_ENTER ("COPYerror");
  LUTinsertIntoLutP (INFO_LUT (arg_info), arg_node, result);
  /* Copy attributes */
  ERROR_MESSAGE (result) = STRcpy (ERROR_MESSAGE (arg_node));
  ERROR_ANYPHASE (result) = ERROR_ANYPHASE (arg_node);
  /* Copy sons */
  ERROR_NEXT (result) = COPYTRAV (ERROR_NEXT (arg_node), arg_info);
  /* Return value */
  DBUG_RETURN (result);
}
开发者ID:ksbhat,项目名称:CoCoKS,代码行数:26,代码来源:copy_node.c


示例11: LoadFile

void Shader::Init()
{
  std::string tmp_vertexShaderSourceCode    = "";
  std::string tmp_geometryShaderSourceCode  = "";
  std::string tmp_fragmentShaderSourceCode  = "";

  try
  {
    tmp_vertexShaderSourceCode = LoadFile( m_vertexShaderFile );
  }
  catch(std::string &e){ ERROR_MESSAGE(e);}

  try
  {
    tmp_geometryShaderSourceCode = LoadFile( m_geometryShaderFile );
  }
  catch(std::string &e){ ERROR_MESSAGE(e);}

  try
  {
    tmp_fragmentShaderSourceCode = LoadFile( m_fragmentShaderFile );
  }
  catch(std::string &e){ ERROR_MESSAGE(e);}

  // TODO: geometry shader
  GLuint tmp_vertexShaderObject = glCreateShader(GL_VERTEX_SHADER);
  GLuint tmp_fragmentShaderObject = glCreateShader(GL_FRAGMENT_SHADER);

  // attach shader source code to shader
  // https://stackoverflow.com/questions/6047527/how-to-convert-stdstring-to-const-char
  const char *c_str = tmp_vertexShaderSourceCode.c_str();
  glShaderSource(tmp_vertexShaderObject,1,&c_str,NULL);
  c_str = tmp_fragmentShaderSourceCode.c_str();
  glShaderSource(tmp_fragmentShaderObject,1,&c_str,NULL);

  glCompileShader(tmp_vertexShaderObject);
  glCompileShader(tmp_fragmentShaderObject);

  // now check for errors:
  CheckShader(tmp_vertexShaderObject);
  CheckShader(tmp_fragmentShaderObject);

  m_program = glCreateProgram();

  glAttachShader(m_program,tmp_vertexShaderObject);
  glAttachShader(m_program,tmp_fragmentShaderObject);

  glLinkProgram(m_program);
}
开发者ID:inosms,项目名称:innocence,代码行数:49,代码来源:Shader.cpp


示例12: ERROR_MESSAGE

/*-------------------------------------------------------------------------------
*	関数説明
*	 ベクトルを正規化する
*	引数
*	 p_Vector		:[I/ ] ベクトル
*	戻り値
*	 正常終了		:正規化されたベクトル
*	 異常終了		:全要素[0.0]
*-------------------------------------------------------------------------------*/
vec3 Math::Normalize(const vec3 &p_Vector)
{
	vec3 normalize = { 0.0f };		//正規化されたベクトル

	//計算しやすいように代入(誤差を少なくするために[double]で計算)
	double x = (double)(p_Vector.x);
	double y = (double)(p_Vector.y);
	double z = (double)(p_Vector.z);

	//引数チェック
	if (0.0 == x && 0.0 == y && 0.0 == z)
	{
		ERROR_MESSAGE("ベクトルを正規化 引数エラー ベクトルが[0]です。\n");
		return normalize;
	}

	//ベクトルの長さを求める
	double length = sqrt(x * x + y * y + z * z);

	//正規化する
	length = 1.0 / length;
	x *= length;
	y *= length;
	z *= length;

	//戻り値を設定
	normalize.x = (float)x;
	normalize.y = (float)y;
	normalize.z = (float)z;

	return normalize;
}
开发者ID:kazuma-628,项目名称:OpenGLES_Study,代码行数:41,代码来源:old_Maths.cpp


示例13: PRTerror

node *
PRTerror (node * arg_node, info * arg_info)
{
  bool first_error;

  DBUG_ENTER ("PRTerror");

  if (NODE_ERROR (arg_node) != NULL) {
    NODE_ERROR (arg_node) = TRAVdo (NODE_ERROR (arg_node), arg_info);
  }

  first_error = INFO_FIRSTERROR( arg_info);

  if( (global.outfile != NULL)
      && (ERROR_ANYPHASE( arg_node) == global.compiler_anyphase)) {

    if ( first_error) {
      printf ( "\n/******* BEGIN TREE CORRUPTION ********\n");
      INFO_FIRSTERROR( arg_info) = FALSE;
    }

    printf ( "%s\n", ERROR_MESSAGE( arg_node));

    if (ERROR_NEXT (arg_node) != NULL) {
      TRAVopt (ERROR_NEXT (arg_node), arg_info);
    }

    if ( first_error) {
      printf ( "********  END TREE CORRUPTION  *******/\n");
      INFO_FIRSTERROR( arg_info) = TRUE;
    }
  }

  DBUG_RETURN (arg_node);
}
开发者ID:ksbhat,项目名称:CoCoKS,代码行数:35,代码来源:print.c


示例14: TracebackLocalAlignment

int TracebackLocalAlignment(const Matrix& matrix,
    const DP_BlockInfo *blocks, unsigned int queryFrom, unsigned int queryTo,
    DP_AlignmentResult **alignment)
{
    if (!alignment) {
        ERROR_MESSAGE("TracebackLocalAlignment() - NULL alignment handle");
        return STRUCT_DP_PARAMETER_ERROR;
    }
    *alignment = NULL;

    // find max score (e.g., best-scoring position of any block)
    int score = DP_NEGATIVE_INFINITY;
    unsigned int block, residue, lastBlock = 0, lastBlockPos = 0;
    for (block=0; block<blocks->nBlocks; ++block) {
        for (residue=queryFrom; residue<=queryTo; ++residue) {
            if (matrix[block][residue - queryFrom].score > score) {
                score = matrix[block][residue - queryFrom].score;
                lastBlock = block;
                lastBlockPos = residue;
            }
        }
    }

    if (score <= 0) {
//        INFO_MESSAGE("No positive-scoring local alignment found.");
        return STRUCT_DP_NO_ALIGNMENT;
    }

//    INFO_MESSAGE("Score of best local alignment: " << score);
    *alignment = new DP_AlignmentResult;
    return TracebackAlignment(matrix, lastBlock, lastBlockPos, queryFrom, *alignment);
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:32,代码来源:block_align.cpp


示例15: CreateBlastMatrix

BLAST_Matrix * CreateBlastMatrix(const BlockMultipleAlignment *bma)
{
#ifdef DEBUG_PSSM
    {{
        CNcbiOfstream ofs("psimsa.txt", IOS_BASE::out);
    }}
#endif

    BLAST_Matrix *matrix = NULL;
    try {

        SU_PSSMInput input(bma);
        CPssmEngine engine(&input);
        CRef < CPssmWithParameters > pssm = engine.Run();

#ifdef DEBUG_PSSM
        CNcbiOfstream ofs("psimsa.txt", IOS_BASE::out | IOS_BASE::app);
        if (ofs) {
            CObjectOStreamAsn oosa(ofs, false);
            oosa << *pssm;
        }
#endif

        matrix = ConvertPSSMToBLASTMatrix(*pssm);

    } catch (exception& e) {
        ERROR_MESSAGE("CreateBlastMatrix() failed with exception: " << e.what());
    }
    return matrix;
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:30,代码来源:su_pssm.cpp


示例16: glGetShaderiv

void Shader::CheckShader(GLuint n_shader)
{
  GLint tmp_hasCompiled;

  glGetShaderiv(n_shader, GL_COMPILE_STATUS, &tmp_hasCompiled);
  if( !tmp_hasCompiled )
  {
    // get length of info buffer
    GLint tmp_lengthOfInfoLog;
    glGetShaderiv(n_shader, GL_INFO_LOG_LENGTH, &tmp_lengthOfInfoLog );

    // create temporary buffer for info log
    std::vector<char> tmp_logBuffer;
    tmp_logBuffer.resize(tmp_lengthOfInfoLog);

    // get the info log
    GLint tmp_finalLength;
    glGetShaderInfoLog(n_shader,tmp_lengthOfInfoLog,&tmp_finalLength,&tmp_logBuffer[0]);

    std::string tmp_finalLog(&tmp_logBuffer[0],tmp_finalLength);
    ERROR_MESSAGE(tmp_finalLog);

    throw std::string("failed to compile shader");
    // TODO: find out the concrete error
  }
}
开发者ID:inosms,项目名称:innocence,代码行数:26,代码来源:Shader.cpp


示例17: parse_block_map

void parse_block_map(BYTE *d, DEPLINT block_number)
{
	DEPLINT array_size=0;
	DEPLINT i;

	segment_number_counter = 0;
	for (i = block_number + 1; i < (block_number+0x80); i += 2)
	{
		if ((d[i]==0x02)||(d[i+1]==0x02))
			array_size++;
	}
	for (i = block_number + 1; i < (block_number+0x80); i += 2)
	{
		if ((d[i]==0x02)||(d[i+1]==0x02))
		{
			segment_number[segment_number_counter] = (((i - block_number) + 1)/2);
			segment_number_counter++;
		}
	}
	segment_number[segment_number_counter] = 0;

	if (segment_number_counter != (array_size))
		ERROR_MESSAGE("Error: Problem parsing block map");

	segment_number_counter = 0;
}
开发者ID:Vincentxiaojie,项目名称:xpenology,代码行数:26,代码来源:edid_parse.c


示例18: LookupCharacterFromNCBIStdaaNumber

char LookupCharacterFromNCBIStdaaNumber(unsigned char n)
{
    if (n < 28)
        return NCBIStdaaResidues[n];
    ERROR_MESSAGE("LookupCharacterFromNCBIStdaaNumber() - valid values are 0 - 27");
    return '?';
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:7,代码来源:su_pssm.cpp


示例19: strcpy

bool Interface::load_tex(const char *name, int idx)
{
    char fn[MAX_PATH];
    strcpy(fn, name);
    if (!strstr(name, ".png"))
    {
        strcat(fn, ".png");
    }

    Stream *str = global.fs->open(fn);
    if ((str == NULL) || (str->getFileStreamHandle() == INVALID_HANDLE_VALUE))
    {
        ERROR_MESSAGE("Interface: Doesn\'t load texture %s\n", fn);
        return false;
    }
    uint32_t sz = str->getSize();
    char buf[sz];
    str->read(buf, sz);
    delete str;

    bool ret = this->load_tex(buf, sz, idx);
#ifdef SD_DEBUG
    if (ret)
        printf("Game: Texture %s loaded\n", fn);
    else
    {
        red_color();
        printf("Game: Doesn\'t load texture %s\n", fn);
        normal_color();
    }
#endif
    return ret;
}
开发者ID:andreili,项目名称:School-Days,代码行数:33,代码来源:interface.cpp


示例20: loadFSM

	unique_ptr<DFSM> loadFSM(string filename) {
		/*
		tr2::sys::path fn(filename);
		if (fn.extension().compare(".fsm") != 0) {
			ERROR_MESSAGE("FSMmodel::loadFSM - the extension of file %s is not '.fsm'", filename.c_str());
			return nullptr;
		}*/
		ifstream file(filename.c_str());
		if (!file.is_open()) {
			ERROR_MESSAGE("FSMmodel::loadFSM - unable to open file %s", filename.c_str());
			return nullptr;
		}
		machine_type_t type;
		file >> type;
		unique_ptr<DFSM> fsm;
		switch (type) {
		case TYPE_DFSM:
			fsm = move(make_unique<DFSM>());
			break;
		case TYPE_MEALY:
			fsm = move(make_unique<Mealy>());
			break;
		case TYPE_MOORE:
			fsm = move(make_unique<Moore>());
			break;
		case TYPE_DFA:
			fsm = move(make_unique<DFA>());
			break;
		default:
			return nullptr;
		}
		if (!fsm->load(filename)) return nullptr;
		return fsm;
	}
开发者ID:Soucha,项目名称:FSMlib,代码行数:34,代码来源:FSMmodel.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERROR_MSG函数代码示例发布时间:2022-05-30
下一篇:
C++ ERROR_LOG_REPORT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap