Changeset 117:d095ce4d8a1e in rrlib_rtti


Ignore:
Timestamp:
27.02.2019 18:29:23 (8 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Children:
118:f2cc18e90383, 119:fa21e787e72f
Phase:
public
Message:

Adds helpful error messages when type renaming issues occur.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • detail/tTypeInfo.cpp

    r109 r117  
    691691      if (strcmp(e.first.Get(), entry.first.Get()) == 0) 
    692692      { 
    693         abort(); 
     693        if (strcmp(e.second, new_name.Get()) == 0) 
     694        { 
     695          RRLIB_LOG_PRINT(WARNING, "Type '", e.first.Get(), "' was already renamed to '", e.second, "'. Initializing and renaming at two different locations is deprecated."); 
     696          return; 
     697        } 
     698        else 
     699        { 
     700          RRLIB_LOG_PRINT(ERROR, "Type '", e.first.Get(), "' was already renamed to '", e.second, "'. Cannot rename twice (to '", new_name.Get(), "' now)"); 
     701          abort(); 
     702        } 
    694703      } 
    695704    } 
Note: See TracChangeset for help on using the changeset viewer.