- Timestamp:
- Jun 25, 2007, 4:22:39 AM (17 years ago)
- Location:
- trunk/jenga
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/include/smoothie/SmoothieException.h
r181 r186 3 3 #include <string> 4 4 #include <vector> 5 6 void SetError(int ErrorNum,const std::string &keyWord,int pos); 7 void SetError(int num,const char *KeyWord,int pos); 8 void SetError(); 5 9 6 10 class SmoothieException … … 9 13 std::string keyword; 10 14 int nowLine; 15 static void Throwing() 16 { 17 //ここでブレークポイント 18 int dummy=0; 19 } 11 20 public: 21 static void Throw( int errorCode, const std::string &keyword, int nowLine ) 22 { 23 Throwing(); 24 SetError( errorCode, keyword, nowLine ); 25 } 26 static void Throw( int errorCode, const std::string &keyword ) 27 { 28 Throwing(); 29 SetError( errorCode, keyword,-1 ); 30 } 31 static void Throw( int errorCode ) 32 { 33 Throwing(); 34 SetError( errorCode,"",-1 ); 35 } 36 static void Throw() 37 { 38 Throwing(); 39 SetError(); 40 } 41 12 42 SmoothieException( int errorCode, const std::string &keyword, int nowLine ) 13 43 : errorCode( errorCode ) -
trunk/jenga/src/smoothie/Class.cpp
r181 r186 10 10 , Prototype( namespaceScopes, name ) 11 11 , importedNamespaces( importedNamespaces ) 12 , ConstructorMemberSubIndex( 0)13 , DestructorMemberSubIndex( 0)12 , ConstructorMemberSubIndex( -1 ) 13 , DestructorMemberSubIndex( -1 ) 14 14 , classType( Class ) 15 15 , pobj_InheritsClass( NULL ) … … 450 450 if( pobj_c2->IsEqualSymbol( namespaceScopes, name ) ){ 451 451 //名前空間及びクラス名が重複した場合 452 throw SmoothieException(15,name,nowLine);452 SmoothieException::Throw(15,name,nowLine); 453 453 return 0; 454 454 } … … 471 471 { 472 472 if( !pStringClass ){ 473 throw SmoothieException();473 SmoothieException::Throw(); 474 474 return NULL; 475 475 } … … 479 479 { 480 480 if( !pObjectClass ){ 481 throw SmoothieException();481 SmoothieException::Throw(); 482 482 return NULL; 483 483 } … … 494 494 pCompilingMethod = pCompilingClass->GetStaticMethods().GetMethodPtr( pUserProc ); 495 495 if( !pCompilingMethod ){ 496 throw SmoothieException(300);496 SmoothieException::Throw(300); 497 497 } 498 498 } -
trunk/jenga/src/smoothie/LexicalScoping.cpp
r174 r186 56 56 void CLexicalScopes::End(){ 57 57 if( level <= 0 ){ 58 throw SmoothieException();58 SmoothieException::Throw(); 59 59 return; 60 60 } -
trunk/jenga/src/smoothie/Namespace.cpp
r181 r186 145 145 else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){ 146 146 if( namespaceScopes.size() <= 0 ){ 147 throw SmoothieException( 12, "End Namespace", i );147 SmoothieException::Throw( 12, "End Namespace", i ); 148 148 isSuccessful = false; 149 149 } … … 158 158 159 159 if( namespaceScopes.size() > 0 ){ 160 throw SmoothieException( 63 );160 SmoothieException::Throw( 63 ); 161 161 isSuccessful = false; 162 162 } -
trunk/jenga/src/smoothie/Procedure.cpp
r181 r186 20 20 { 21 21 if( !pParentClass ){ 22 throw SmoothieException();22 SmoothieException::Throw(); 23 23 } 24 24 return pParentClass->GetNamespaceScopes(); … … 27 27 { 28 28 if( !pParentClass ){ 29 throw SmoothieException();29 SmoothieException::Throw(); 30 30 } 31 31 return pParentClass->GetImportedNamespaces(); … … 33 33 bool UserProc::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const 34 34 { 35 throw SmoothieException();35 SmoothieException::Throw(); 36 36 return false; 37 37 } -
trunk/jenga/src/smoothie/Source.cpp
r181 r186 650 650 if( !source.ReadFile_InIncludeDirective( temporary ) ){ 651 651 sprintf(temp2,"インクルードファイル \"%s\" をオープンできません",temporary); 652 throw SmoothieException(-1,temp2,i);652 SmoothieException::Throw(-1,temp2,i); 653 653 break; 654 654 } -
trunk/jenga/src/smoothie/Type.cpp
r181 r186 169 169 } 170 170 171 throw SmoothieException();171 SmoothieException::Throw(); 172 172 173 173 return 0; … … 241 241 if( basicType == DEF_STRUCT ){ 242 242 if( !pClass ){ 243 throw SmoothieException();243 SmoothieException::Throw(); 244 244 return 0; 245 245 } … … 257 257 } 258 258 259 throw SmoothieException();259 SmoothieException::Throw(); 260 260 return 0; 261 261 } … … 533 533 } 534 534 535 throw SmoothieException( 1 );535 SmoothieException::Throw( 1 ); 536 536 537 537 return (string)"(null)"; -
trunk/jenga/src/smoothie/TypeDef.cpp
r181 r186 10 10 { 11 11 if( !Type::StringToType( baseName, baseType ) ){ 12 throw SmoothieException(3, baseName, nowLine );12 SmoothieException::Throw(3, baseName, nowLine ); 13 13 return; 14 14 } … … 89 89 90 90 if(expression[i]!='='){ 91 throw SmoothieException(10,"TypeDef",nowLine);91 SmoothieException::Throw(10,"TypeDef",nowLine); 92 92 return; 93 93 } … … 100 100 if(temporary[i]=='\0') break; 101 101 if(!IsVariableChar(temporary[i])){ 102 throw SmoothieException(10,"TypeDef",nowLine);102 SmoothieException::Throw(10,"TypeDef",nowLine); 103 103 return; 104 104 } … … 109 109 //関数ポインタ 110 110 if(pTemp[3]!='('){ 111 throw SmoothieException(10,"TypeDef",nowLine);111 SmoothieException::Throw(10,"TypeDef",nowLine); 112 112 return; 113 113 } … … 119 119 if(pTemp[i]=='\0') break; 120 120 if(!IsVariableChar(pTemp[i])){ 121 throw SmoothieException(10,"TypeDef",nowLine);121 SmoothieException::Throw(10,"TypeDef",nowLine); 122 122 return; 123 123 } … … 127 127 //識別子が重複している場合はエラーにする 128 128 if(lstrcmp(temporary,pTemp)==0){ 129 throw SmoothieException(1,NULL,nowLine);129 SmoothieException::Throw(1,NULL,nowLine); 130 130 return; 131 131 } … … 173 173 else if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENDNAMESPACE ){ 174 174 if( namespaceScopes.size() <= 0 ){ 175 throw SmoothieException(12, "End Namespace", i );175 SmoothieException::Throw(12, "End Namespace", i ); 176 176 } 177 177 else{ … … 192 192 if( !importedNamespaces.Imports( temporary ) ) 193 193 { 194 throw SmoothieException(64,temporary,i );194 SmoothieException::Throw(64,temporary,i ); 195 195 } 196 196
Note:
See TracChangeset
for help on using the changeset viewer.