Changeset 185 in dev for trunk


Ignore:
Timestamp:
Jun 25, 2007, 4:22:29 AM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/abdev/BasicCompiler_Common/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/src/ClassImpl.cpp

    r184 r185  
    9393        const CClass *pInheritsClass = Smoothie::GetMeta().GetClasses().Find(temporary);
    9494        if( !pInheritsClass ){
    95             throw SmoothieException(106,temporary,nowLine);
     95            SmoothieException::Throw(106,temporary,nowLine);
    9696            return false;
    9797        }
     
    109109        }
    110110        else{
    111             throw SmoothieException(135,NULL,nowLine);
     111            SmoothieException::Throw(135,NULL,nowLine);
    112112            return false;
    113113        }
     
    123123        const CClass *pObjectClass = Smoothie::GetMeta().GetClasses().Find("Object");
    124124        if( !pObjectClass ){
    125             throw SmoothieException(106,"Object",i);
     125            SmoothieException::Throw(106,"Object",i);
    126126            return false;
    127127        }
     
    147147        const CClass *pInheritsClass = Smoothie::GetMeta().GetClasses().Find(temporary);
    148148        if( !pInheritsClass ){
    149             throw SmoothieException(106,temporary,nowLine);
     149            SmoothieException::Throw(106,temporary,nowLine);
    150150            return false;
    151151        }
     
    161161        }
    162162        else{
    163             throw SmoothieException(135,NULL,nowLine);
     163            SmoothieException::Throw(135,NULL,nowLine);
    164164            return false;
    165165        }
     
    177177    //ループ継承でないかをチェック
    178178    if(pobj_LoopRefCheck->check(inheritsClass)){
    179         throw SmoothieException(123,inheritsClass.GetName(),nowLine);
     179        SmoothieException::Throw(123,inheritsClass.GetName(),nowLine);
    180180        return false;
    181181    }
     
    239239    //ループ継承でないかをチェック
    240240    if(pobj_LoopRefCheck->check(inheritsInterface)){
    241         throw SmoothieException(123,inheritsInterface.GetName(),nowLine);
     241        SmoothieException::Throw(123,inheritsInterface.GetName(),nowLine);
    242242        return false;
    243243    }
     
    459459            if(pMethod->IsAbstract()){
    460460                extern int cp;
    461                 throw SmoothieException(300,NULL,cp);
     461                SmoothieException::Throw(300,NULL,cp);
    462462
    463463                ppsi[i2]=0;
     
    532532        else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){
    533533            if( namespaceScopes.size() <= 0 ){
    534                 throw SmoothieException(12, "End Namespace", i );
     534                SmoothieException::Throw(12, "End Namespace", i );
    535535            }
    536536            else{
     
    551551            if( !importedNamespaces.Imports( temporary ) )
    552552            {
    553                 throw SmoothieException(64,temporary,i );
     553                SmoothieException::Throw(64,temporary,i );
    554554            }
    555555
  • trunk/abdev/BasicCompiler_Common/src/ProcedureImpl.cpp

    r184 r185  
    2121    //パラメータ
    2222    if(sourceOfParams[i]!='('){
    23         throw SmoothieException(1,NULL,nowLine);
     23        SmoothieException::Throw(1,NULL,nowLine);
    2424        return 0;
    2525    }
     
    2828        //クラスのメンバ関数の場合のみ、デストラクタにパラメータがある場合にエラーをだす
    2929        if(this->GetName()[0]=='~'){
    30             throw SmoothieException(114,NULL,nowLine);
     30            SmoothieException::Throw(114,NULL,nowLine);
    3131            i=JumpStringInPare(sourceOfParams,i);
    3232        }
     
    7777        if(sw){
    7878            //配列パラメータ
    79             if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
     79            if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine);
    8080            isArray = true;
    8181
     
    132132
    133133            if( type.IsNull() ){
    134                 throw SmoothieException(3,temporary,nowLine);
     134                SmoothieException::Throw(3,temporary,nowLine);
    135135                type.SetBasicType( DEF_PTR_VOID );
    136136            }
     
    145145        else{
    146146            type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
    147             throw SmoothieException(-103,temporary,nowLine);
     147            SmoothieException::Throw(-103,temporary,nowLine);
    148148        }
    149149
     
    162162        else if(sourceOfParams[i]==')') continue;
    163163        else{
    164             throw SmoothieException(1,NULL,nowLine);
     164            SmoothieException::Throw(1,NULL,nowLine);
    165165            break;
    166166        }
     
    215215            if(sw){
    216216                //配列パラメータ
    217                 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
     217                if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine);
    218218                isArray = true;
    219219
     
    260260
    261261                if( type.IsNull() ){
    262                     throw SmoothieException(3,temporary,nowLine);
     262                    SmoothieException::Throw(3,temporary,nowLine);
    263263                    type.SetBasicType( DEF_PTR_VOID );
    264264                }
     
    266266            else{
    267267                type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
    268                 throw SmoothieException(-103,temporary,nowLine);
     268                SmoothieException::Throw(-103,temporary,nowLine);
    269269            }
    270270
     
    283283            else if(sourceOfParams[i]==')') continue;
    284284            else{
    285                 throw SmoothieException(1,NULL,nowLine);
     285                SmoothieException::Throw(1,NULL,nowLine);
    286286                break;
    287287            }
     
    297297        if( !this->IsFunction() ){
    298298            // Sub/Macroの場合
    299             throw SmoothieException(38,this->GetName(),nowLine);
     299            SmoothieException::Throw(38,this->GetName(),nowLine);
    300300        }
    301301
     
    304304                this->GetName()[0]=='~'){
    305305                //クラスのコンストラクタ、デストラクタがFunction定義の場合はエラーをだす
    306                 throw SmoothieException(115,NULL,nowLine);
     306                SmoothieException::Throw(115,NULL,nowLine);
    307307            }
    308308        }
     
    327327                }
    328328                Type::StringToType( temporary, this->returnType );
    329                 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
     329                if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine);
    330330
    331331                sw_as=1;
     
    335335
    336336        if(!sw_as){
    337             throw SmoothieException(-104,this->GetName().c_str(),nowLine);
     337            SmoothieException::Throw(-104,this->GetName().c_str(),nowLine);
    338338
    339339            this->returnType.SetBasicType( DEF_DOUBLE );
     
    412412    //パラメータ
    413413    if(sourceOfParams[i]!='('){
    414         throw SmoothieException(1,NULL,nowLine);
     414        SmoothieException::Throw(1,NULL,nowLine);
    415415        return 0;
    416416    }
     
    462462        if(sw){
    463463            //配列パラメータ
    464             if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
     464            if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine);
    465465            isArray = true;
    466466
     
    508508
    509509            if( type.IsNull() ){
    510                 throw SmoothieException(3,temporary,nowLine);
     510                SmoothieException::Throw(3,temporary,nowLine);
    511511                type.SetBasicType( DEF_PTR_VOID );
    512512            }
     
    514514        else{
    515515            type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
    516             throw SmoothieException(-103,temporary,nowLine);
     516            SmoothieException::Throw(-103,temporary,nowLine);
    517517        }
    518518
     
    531531        else if(sourceOfParams[i]==')') continue;
    532532        else{
    533             throw SmoothieException(1,NULL,nowLine);
     533            SmoothieException::Throw(1,NULL,nowLine);
    534534            break;
    535535        }
     
    560560                }
    561561                Type::StringToType( temporary, this->returnType );
    562                 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
     562                if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine);
    563563
    564564                sw_as=1;
     
    585585    //パラメータ
    586586    if(sourceOfParams[i]!='('){
    587         throw SmoothieException(1,NULL,nowLine);
     587        SmoothieException::Throw(1,NULL,nowLine);
    588588        return 0;
    589589    }
     
    634634        if(sw){
    635635            //配列パラメータ
    636             if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
     636            if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine);
    637637            isArray = true;
    638638
     
    679679
    680680            if( type.IsNull() ){
    681                 throw SmoothieException(3,temporary,nowLine);
     681                SmoothieException::Throw(3,temporary,nowLine);
    682682                type.SetBasicType( DEF_PTR_VOID );
    683683            }
     
    685685        else{
    686686            type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
    687             throw SmoothieException(-103,temporary,nowLine);
     687            SmoothieException::Throw(-103,temporary,nowLine);
    688688        }
    689689
     
    702702        else if(sourceOfParams[i]==')') continue;
    703703        else{
    704             throw SmoothieException(1,NULL,nowLine);
     704            SmoothieException::Throw(1,NULL,nowLine);
    705705            break;
    706706        }
     
    731731                }
    732732                Type::StringToType( temporary, this->returnType );
    733                 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
     733                if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine);
    734734
    735735                sw_as=1;
     
    749749        if( this->ReturnType().IsNull() ){
    750750            // 戻り値がない
    751             throw SmoothieException(26,this->GetName(),nowLine);
     751            SmoothieException::Throw(26,this->GetName(),nowLine);
    752752        }
    753753    }
     
    755755        if( !this->ReturnType().IsNull() ){
    756756            // Sub定義なのに、戻り値がある
    757             throw SmoothieException(38,this->GetName(),nowLine);
     757            SmoothieException::Throw(38,this->GetName(),nowLine);
    758758        }
    759759    }
Note: See TracChangeset for help on using the changeset viewer.