当前位置: 首页>>代码示例>>C++>>正文


C++ ERROR_MESSAGE函数代码示例

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


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


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