Ignore:
Timestamp:
Mar 24, 2008, 8:05:20 PM (16 years ago)
Author:
dai_9181
Message:

Messenger/ErrorMessengerクラスを導入。SetError関数によるエラー生成を廃止した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp

    r461 r465  
    199199        const CClass *pInheritsClass = compiler.GetObjectModule().meta.GetClasses().Find(className);
    200200        if( !pInheritsClass ){
    201             SetError(106,className,nowLine);
     201            compiler.errorMessenger.Output(106,className,nowLine);
    202202            return false;
    203203        }
     
    212212        }
    213213        else{
    214             SetError(135,pInheritsClass->GetFullName().c_str(),nowLine);
     214            compiler.errorMessenger.Output(135,pInheritsClass->GetFullName().c_str(),nowLine);
    215215            return false;
    216216        }
     
    236236    if( !compiler.GetObjectModule().meta.GetClasses().LoopRefCheck(inheritsClass) )
    237237    {
    238         SetError(123,inheritsClass.GetName(),nowLine);
     238        compiler.errorMessenger.Output(123,inheritsClass.GetName(),nowLine);
    239239        return false;
    240240    }
     
    296296    {
    297297        // インターフェイスではないとき
    298         SetError(138,interfaceClass.GetName().c_str(),nowLine );
     298        compiler.errorMessenger.Output(138,interfaceClass.GetName().c_str(),nowLine );
    299299        return false;
    300300    }
     
    379379        const CClass *pInterfaceClass = compiler.GetObjectModule().meta.GetClasses().Find( className );
    380380        if( !pInterfaceClass ){
    381             SetError(106,paramStr.c_str(),nowLine);
     381            compiler.errorMessenger.Output(106,paramStr.c_str(),nowLine);
    382382            continue;
    383383        }
     
    404404    //重複チェック
    405405    if(this->DupliCheckAll(VarName)){
    406         SetError(15,VarName,cp);
     406        compiler.errorMessenger.Output(15,VarName,cp);
    407407    }
    408408
     
    466466        //デストラクタの場合はその名前が正しいかチェックを行う
    467467        if(lstrcmp(temporary+1,pobj_c->GetName().c_str())!=0)
    468             SetError(117,NULL,nowLine);
     468            compiler.errorMessenger.Output(117,NULL,nowLine);
    469469        else
    470470            bDestructor=1;
     
    489489
    490490    if(pobj_c->DupliCheckMember(temporary)){
    491         SetError(15,temporary,nowLine);
     491        compiler.errorMessenger.Output(15,temporary,nowLine);
    492492        return;
    493493    }
     
    502502        {
    503503            //関数名、パラメータ、戻り値が合致したとき
    504             SetError(15,pUserProc->GetName().c_str(),nowLine);
     504            compiler.errorMessenger.Output(15,pUserProc->GetName().c_str(),nowLine);
    505505            return;
    506506        }
     
    549549    if( interfaceName[0] )
    550550    {
    551         SetError(139,interfaceName,nowLine);
     551        compiler.errorMessenger.Output(139,interfaceName,nowLine);
    552552    }
    553553
     
    557557
    558558    if( isOverride ){
    559         SetError(12,"Override",nowLine);
     559        compiler.errorMessenger.Output(12,"Override",nowLine);
    560560    }
    561561
     
    757757                if( !pMember->GetType().IsStruct() )
    758758                {
    759                     SetError();
     759                    compiler.errorMessenger.OutputFatalError();
    760760                }
    761761
     
    863863                if( !pMember->GetType().IsStruct() )
    864864                {
    865                     SetError();
     865                    compiler.errorMessenger.OutputFatalError();
    866866                }
    867867
     
    985985    }
    986986
    987     SetError();
     987    compiler.errorMessenger.OutputFatalError();
    988988    return;
    989989}
     
    10021002    }
    10031003
    1004     SetError();
     1004    compiler.errorMessenger.OutputFatalError();
    10051005    return 0;
    10061006}
     
    10141014    if( vtblMasterListOffset == -1 )
    10151015    {
    1016         SetError();
     1016        compiler.errorMessenger.OutputFatalError();
    10171017    }
    10181018
     
    10421042    if( vtblMasterList.size() )
    10431043    {
    1044         SetError();
     1044        compiler.errorMessenger.OutputFatalError();
    10451045    }
    10461046
     
    10621062            if( this->comVtblOffset )
    10631063            {
    1064                 SetError();
     1064                compiler.errorMessenger.OutputFatalError();
    10651065            }
    10661066            this->comVtblOffset = tempVtblOffset;
     
    11671167    if( !Put( pClass ) )
    11681168    {
    1169         SetError(15,pClass->GetName(), nowLine);
     1169        compiler.errorMessenger.Output(15,pClass->GetName(), nowLine);
    11701170        return false;
    11711171    }
     
    14651465            pCompilingMethod = pParentClass->GetStaticMethods().GetMethodPtr( pUserProc );
    14661466            if( !pCompilingMethod ){
    1467                 SetError();
     1467                compiler.errorMessenger.OutputFatalError();
    14681468            }
    14691469        }
     
    14821482        if( !pStringClass )
    14831483        {
    1484             SetError(400, "System.String", cp);
     1484            compiler.errorMessenger.Output(400, "System.String", cp);
    14851485            static CClass dummy;
    14861486            return &dummy;
     
    14981498        if( !pObjectClass )
    14991499        {
    1500             SetError(400, "System.Object", cp);
     1500            compiler.errorMessenger.Output(400, "System.Object", cp);
    15011501            static CClass dummy;
    15021502            return &dummy;
     
    15141514        if( !pInterfaceInfo )
    15151515        {
    1516             SetError(400, "ActiveBasic.Core.InterfaceInfo", cp);
     1516            compiler.errorMessenger.Output(400, "ActiveBasic.Core.InterfaceInfo", cp);
    15171517            static CClass dummy;
    15181518            return &dummy;
Note: See TracChangeset for help on using the changeset viewer.