Changeset b1f2007 for src/Common/SemanticError.cc
- Timestamp:
- Dec 13, 2023, 9:17:13 AM (7 months ago)
- Branches:
- master
- Children:
- 4c2fe47
- Parents:
- c40157e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.cc
rc40157e rb1f2007 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 7 08:05:26 201813 // Update Count : 1 012 // Last Modified On : Mon Dec 11 15:59:09 2023 13 // Update Count : 14 14 14 // 15 15 … … 70 70 //----------------------------------------------------------------------------- 71 71 // Semantic Error 72 72 73 bool SemanticErrorThrow = false; 73 74 … … 101 102 std::cerr << ErrorHelpers::bold() << err.location << ErrorHelpers::error_str() << ErrorHelpers::reset_font() << err.description << std::endl; 102 103 } 104 } 105 106 void SemanticError( CodeLocation location, const char * fmt, ... ) { 107 char msg[2048]; // worst-case error-message buffer 108 va_list args; 109 va_start( args, fmt ); 110 vsnprintf( msg, sizeof(msg), fmt, args ); // always null terminated, but may be truncated 111 va_end( args ); 112 113 SemanticErrorThrow = true; 114 throw SemanticErrorException( location, msg ); // convert msg to string 103 115 } 104 116
Note: See TracChangeset
for help on using the changeset viewer.