Changeset 185 in dev for trunk/abdev/BasicCompiler_Common/src
- Timestamp:
- Jun 25, 2007, 4:22:29 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/ClassImpl.cpp
r184 r185 93 93 const CClass *pInheritsClass = Smoothie::GetMeta().GetClasses().Find(temporary); 94 94 if( !pInheritsClass ){ 95 throw SmoothieException(106,temporary,nowLine);95 SmoothieException::Throw(106,temporary,nowLine); 96 96 return false; 97 97 } … … 109 109 } 110 110 else{ 111 throw SmoothieException(135,NULL,nowLine);111 SmoothieException::Throw(135,NULL,nowLine); 112 112 return false; 113 113 } … … 123 123 const CClass *pObjectClass = Smoothie::GetMeta().GetClasses().Find("Object"); 124 124 if( !pObjectClass ){ 125 throw SmoothieException(106,"Object",i);125 SmoothieException::Throw(106,"Object",i); 126 126 return false; 127 127 } … … 147 147 const CClass *pInheritsClass = Smoothie::GetMeta().GetClasses().Find(temporary); 148 148 if( !pInheritsClass ){ 149 throw SmoothieException(106,temporary,nowLine);149 SmoothieException::Throw(106,temporary,nowLine); 150 150 return false; 151 151 } … … 161 161 } 162 162 else{ 163 throw SmoothieException(135,NULL,nowLine);163 SmoothieException::Throw(135,NULL,nowLine); 164 164 return false; 165 165 } … … 177 177 //ループ継承でないかをチェック 178 178 if(pobj_LoopRefCheck->check(inheritsClass)){ 179 throw SmoothieException(123,inheritsClass.GetName(),nowLine);179 SmoothieException::Throw(123,inheritsClass.GetName(),nowLine); 180 180 return false; 181 181 } … … 239 239 //ループ継承でないかをチェック 240 240 if(pobj_LoopRefCheck->check(inheritsInterface)){ 241 throw SmoothieException(123,inheritsInterface.GetName(),nowLine);241 SmoothieException::Throw(123,inheritsInterface.GetName(),nowLine); 242 242 return false; 243 243 } … … 459 459 if(pMethod->IsAbstract()){ 460 460 extern int cp; 461 throw SmoothieException(300,NULL,cp);461 SmoothieException::Throw(300,NULL,cp); 462 462 463 463 ppsi[i2]=0; … … 532 532 else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){ 533 533 if( namespaceScopes.size() <= 0 ){ 534 throw SmoothieException(12, "End Namespace", i );534 SmoothieException::Throw(12, "End Namespace", i ); 535 535 } 536 536 else{ … … 551 551 if( !importedNamespaces.Imports( temporary ) ) 552 552 { 553 throw SmoothieException(64,temporary,i );553 SmoothieException::Throw(64,temporary,i ); 554 554 } 555 555 -
trunk/abdev/BasicCompiler_Common/src/ProcedureImpl.cpp
r184 r185 21 21 //パラメータ 22 22 if(sourceOfParams[i]!='('){ 23 throw SmoothieException(1,NULL,nowLine);23 SmoothieException::Throw(1,NULL,nowLine); 24 24 return 0; 25 25 } … … 28 28 //クラスのメンバ関数の場合のみ、デストラクタにパラメータがある場合にエラーをだす 29 29 if(this->GetName()[0]=='~'){ 30 throw SmoothieException(114,NULL,nowLine);30 SmoothieException::Throw(114,NULL,nowLine); 31 31 i=JumpStringInPare(sourceOfParams,i); 32 32 } … … 77 77 if(sw){ 78 78 //配列パラメータ 79 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);79 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 80 80 isArray = true; 81 81 … … 132 132 133 133 if( type.IsNull() ){ 134 throw SmoothieException(3,temporary,nowLine);134 SmoothieException::Throw(3,temporary,nowLine); 135 135 type.SetBasicType( DEF_PTR_VOID ); 136 136 } … … 145 145 else{ 146 146 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 147 throw SmoothieException(-103,temporary,nowLine);147 SmoothieException::Throw(-103,temporary,nowLine); 148 148 } 149 149 … … 162 162 else if(sourceOfParams[i]==')') continue; 163 163 else{ 164 throw SmoothieException(1,NULL,nowLine);164 SmoothieException::Throw(1,NULL,nowLine); 165 165 break; 166 166 } … … 215 215 if(sw){ 216 216 //配列パラメータ 217 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);217 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 218 218 isArray = true; 219 219 … … 260 260 261 261 if( type.IsNull() ){ 262 throw SmoothieException(3,temporary,nowLine);262 SmoothieException::Throw(3,temporary,nowLine); 263 263 type.SetBasicType( DEF_PTR_VOID ); 264 264 } … … 266 266 else{ 267 267 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 268 throw SmoothieException(-103,temporary,nowLine);268 SmoothieException::Throw(-103,temporary,nowLine); 269 269 } 270 270 … … 283 283 else if(sourceOfParams[i]==')') continue; 284 284 else{ 285 throw SmoothieException(1,NULL,nowLine);285 SmoothieException::Throw(1,NULL,nowLine); 286 286 break; 287 287 } … … 297 297 if( !this->IsFunction() ){ 298 298 // Sub/Macroの場合 299 throw SmoothieException(38,this->GetName(),nowLine);299 SmoothieException::Throw(38,this->GetName(),nowLine); 300 300 } 301 301 … … 304 304 this->GetName()[0]=='~'){ 305 305 //クラスのコンストラクタ、デストラクタがFunction定義の場合はエラーをだす 306 throw SmoothieException(115,NULL,nowLine);306 SmoothieException::Throw(115,NULL,nowLine); 307 307 } 308 308 } … … 327 327 } 328 328 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); 330 330 331 331 sw_as=1; … … 335 335 336 336 if(!sw_as){ 337 throw SmoothieException(-104,this->GetName().c_str(),nowLine);337 SmoothieException::Throw(-104,this->GetName().c_str(),nowLine); 338 338 339 339 this->returnType.SetBasicType( DEF_DOUBLE ); … … 412 412 //パラメータ 413 413 if(sourceOfParams[i]!='('){ 414 throw SmoothieException(1,NULL,nowLine);414 SmoothieException::Throw(1,NULL,nowLine); 415 415 return 0; 416 416 } … … 462 462 if(sw){ 463 463 //配列パラメータ 464 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);464 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 465 465 isArray = true; 466 466 … … 508 508 509 509 if( type.IsNull() ){ 510 throw SmoothieException(3,temporary,nowLine);510 SmoothieException::Throw(3,temporary,nowLine); 511 511 type.SetBasicType( DEF_PTR_VOID ); 512 512 } … … 514 514 else{ 515 515 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 516 throw SmoothieException(-103,temporary,nowLine);516 SmoothieException::Throw(-103,temporary,nowLine); 517 517 } 518 518 … … 531 531 else if(sourceOfParams[i]==')') continue; 532 532 else{ 533 throw SmoothieException(1,NULL,nowLine);533 SmoothieException::Throw(1,NULL,nowLine); 534 534 break; 535 535 } … … 560 560 } 561 561 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); 563 563 564 564 sw_as=1; … … 585 585 //パラメータ 586 586 if(sourceOfParams[i]!='('){ 587 throw SmoothieException(1,NULL,nowLine);587 SmoothieException::Throw(1,NULL,nowLine); 588 588 return 0; 589 589 } … … 634 634 if(sw){ 635 635 //配列パラメータ 636 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);636 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 637 637 isArray = true; 638 638 … … 679 679 680 680 if( type.IsNull() ){ 681 throw SmoothieException(3,temporary,nowLine);681 SmoothieException::Throw(3,temporary,nowLine); 682 682 type.SetBasicType( DEF_PTR_VOID ); 683 683 } … … 685 685 else{ 686 686 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 687 throw SmoothieException(-103,temporary,nowLine);687 SmoothieException::Throw(-103,temporary,nowLine); 688 688 } 689 689 … … 702 702 else if(sourceOfParams[i]==')') continue; 703 703 else{ 704 throw SmoothieException(1,NULL,nowLine);704 SmoothieException::Throw(1,NULL,nowLine); 705 705 break; 706 706 } … … 731 731 } 732 732 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); 734 734 735 735 sw_as=1; … … 749 749 if( this->ReturnType().IsNull() ){ 750 750 // 戻り値がない 751 throw SmoothieException(26,this->GetName(),nowLine);751 SmoothieException::Throw(26,this->GetName(),nowLine); 752 752 } 753 753 } … … 755 755 if( !this->ReturnType().IsNull() ){ 756 756 // Sub定義なのに、戻り値がある 757 throw SmoothieException(38,this->GetName(),nowLine);757 SmoothieException::Throw(38,this->GetName(),nowLine); 758 758 } 759 759 }
Note:
See TracChangeset
for help on using the changeset viewer.