Changeset b2de2e0
- Timestamp:
- May 26, 2020, 11:24:55 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c19bc90
- Parents:
- c1dfa4e
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ExceptTranslate.cc
rc1dfa4e rb2de2e0 10 10 // Created On : Wed Jun 14 16:49:00 2017 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T hr May 21 13:18:00 202013 // Update Count : 1 512 // Last Modified On : Tue May 26 10:56:00 2020 13 // Update Count : 16 14 14 // 15 15 … … 134 134 ObjectDecl * decl = dynamic_cast<ObjectDecl *>( catchStmt->get_decl() ); 135 135 // Also checking the type would be nice. 136 if ( decl ) { 137 // Pass. 138 } else if ( CatchStmt::Terminate == catchStmt->get_kind() ) { 139 SemanticError(catchStmt->location, "catch must have exception type"); 140 } else { 141 SemanticError(catchStmt->location, "catchResume must have exception type"); 136 if ( !decl || !dynamic_cast<PointerType *>( decl->type ) ) { 137 std::string kind = (CatchStmt::Terminate == catchStmt->kind) ? "catch" : "catchResume"; 138 SemanticError( catchStmt->location, kind + " must have pointer to an exception type" ); 142 139 } 143 140
Note: See TracChangeset
for help on using the changeset viewer.