Changes in src/Common/SemanticError.cc [b1f2007d:ddcedfe]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.cc
rb1f2007d rddcedfe 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 11 15:59:09 202313 // Update Count : 1 412 // Last Modified On : Thu Jun 7 08:05:26 2018 13 // Update Count : 10 14 14 // 15 15 … … 70 70 //----------------------------------------------------------------------------- 71 71 // Semantic Error 72 73 72 bool SemanticErrorThrow = false; 74 73 … … 102 101 std::cerr << ErrorHelpers::bold() << err.location << ErrorHelpers::error_str() << ErrorHelpers::reset_font() << err.description << std::endl; 103 102 } 104 }105 106 void SemanticError( CodeLocation location, const char * fmt, ... ) {107 char msg[2048]; // worst-case error-message buffer108 va_list args;109 va_start( args, fmt );110 vsnprintf( msg, sizeof(msg), fmt, args ); // always null terminated, but may be truncated111 va_end( args );112 113 SemanticErrorThrow = true;114 throw SemanticErrorException( location, msg ); // convert msg to string115 103 } 116 104
Note:
See TracChangeset
for help on using the changeset viewer.