Beispiel #1
0
int printError(SciErr* _psciErr, int _iLastMsg)
{
    if (_psciErr->iErr == 0)
    {
        return 0;
    }

    SciStoreError(_psciErr->iErr);

    if (getPromptMode() != PROMPTMODE_SILENT && getSilentError() == VERBOSE_ERROR)
    {
        if (_iLastMsg)
        {
            sciprint(_("API Error:\n"));
            sciprint(_("\tin %s\n"), _psciErr->pstMsg[0]);
        }
        else
        {
            sciprint(_("API Error:\n"));

            for (int i = _psciErr->iMsgCount - 1; i >= 0; i--)
            {
                sciprint(_("\tin %s\n"), _psciErr->pstMsg[i]);
            }
        }
    }

    sciErrClean(_psciErr);
    return 0;
}
Beispiel #2
0
int printError(SciErr* _psciErr, int _iLastMsg)
{
	int iMode = getExecMode();

	if(_psciErr->iErr == 0)
	{
		return 0;
	}

	SciStoreError(_psciErr->iErr);

	if(iMode == SILENT_EXEC_MODE)
	{
		return 0;
	}

	if(_iLastMsg)
	{
		sciprint(_("API Error:\n"));
		sciprint(_("\tin %s\n"), _psciErr->pstMsg[0]);
	}
	else
	{
		sciprint(_("API Error:\n"));

		//		for(int i = 0 ;  i < _psciErr->iMsgCount ;i++)
		for(int i = _psciErr->iMsgCount - 1 ;  i >= 0 ; i--)
		{
//			if(i == 0)
			sciprint(_("\tin %s\n"), _psciErr->pstMsg[i]);
		}
	}
	return 0;
}