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/Exception.cpp

    r391 r465  
    120120        if( isDefinedFinally )
    121121        {
    122             SetError(71,NULL,cp);
     122            compiler.errorMessenger.Output(71,NULL,cp);
    123123            return;
    124124        }
     
    146146        if( isDefinedFinally )
    147147        {
    148             SetError(70,NULL,cp);
     148            compiler.errorMessenger.Output(70,NULL,cp);
    149149            return;
    150150        }
     
    173173        if( !isDefinedFinally )
    174174        {
    175             SetError();
     175            compiler.errorMessenger.OutputFatalError();
    176176        }
    177177
     
    259259    if( tryScopes.size() == 0 )
    260260    {
    261         SetError(1,NULL,cp);
     261        compiler.errorMessenger.Output(1,NULL,cp);
    262262        return;
    263263    }
     
    271271        if( !typeName[0] )
    272272        {
    273             SetError(72,NULL,cp);
     273            compiler.errorMessenger.Output(72,NULL,cp);
    274274        }
    275275        else
     
    277277            if( !compiler.StringToType( typeName, paramType ) )
    278278            {
    279                 SetError(74,typeName,cp);
     279                compiler.errorMessenger.Output(74,typeName,cp);
    280280            }
    281281            else
     
    283283                if( !paramType.IsObject() )
    284284                {
    285                     SetError(73,typeName,cp);
     285                    compiler.errorMessenger.Output(73,typeName,cp);
    286286                }
    287287            }
     
    296296    if( paramType.IsObject() )
    297297    {
    298         sprintf( temporary, "Dim %s = Thread.CurrentThread().__GetThrowintParamObject() As %s", varName, paramType.GetClass().GetFullName().c_str() );
     298        sprintf( temporary, "Dim %s = System.Threading.Thread.CurrentThread().__GetThrowintParamObject() As %s", varName, paramType.GetClass().GetFullName().c_str() );
    299299        MakeMiddleCode( temporary );
    300300        ChangeOpcode( temporary );
    301301    }
    302     lstrcpy( temporary, "Thread.CurrentThread().__Catched()" );
     302    lstrcpy( temporary, "System.Threading.Thread.CurrentThread().__Catched()" );
    303303    MakeMiddleCode( temporary );
    304304    ChangeOpcode( temporary );
     
    326326    if( tryScopes.size() == 0 )
    327327    {
    328         SetError(12,"End Try",cp);
     328        compiler.errorMessenger.Output(12,"End Try",cp);
    329329        return;
    330330    }
     
    333333    {
    334334        // CatchもFinallyも存在しないとき
    335         SetError(-108,NULL,tryScopes.back().GetSourceCodePos() );
     335        compiler.errorMessenger.Output(-108,NULL,tryScopes.back().GetSourceCodePos() );
    336336    }
    337337
     
    364364    while( tryScopes.size() > 0 )
    365365    {
    366         SetError(22, "Try", tryScopes.back().GetSourceCodePos() );
     366        compiler.errorMessenger.Output(22, "Try", tryScopes.back().GetSourceCodePos() );
    367367
    368368        EndTryCommand( true );
     
    393393    if( tryScopes.size() == 0 )
    394394    {
    395         SetError(1,NULL,cp);
     395        compiler.errorMessenger.Output(1,NULL,cp);
    396396        return;
    397397    }
     
    424424    if( tryScopes.size() == 0 )
    425425    {
    426         SetError(1,NULL,cp);
     426        compiler.errorMessenger.Output(1,NULL,cp);
    427427        return;
    428428    }
Note: See TracChangeset for help on using the changeset viewer.