Changeset 89:8f0126072587 in finroc_plugins_data_ports


Ignore:
Timestamp:
05.02.2015 13:08:20 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Made warning message more helpful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/tPublishOperation.h

    r73 r89  
    9696    if (!(port.IsReady() || BROWSER_PUBLISH)) 
    9797    { 
    98       FINROC_LOG_PRINT(WARNING, "Port is not ready. Ignoring publishing request."); 
     98      PrintWarning(port, "is not ready. Ignoring publishing request."); 
    9999      return; 
    100100    } 
     
    191191private: 
    192192 
     193  /*! 
     194   * Put to separate method as it expands to quite a lot of code that does not need to be inlined 
     195   * 
     196   * \param port Port to print message for 
     197   * \param warning Message to print 
     198   */ 
     199  __attribute__((noinline)) 
     200  void PrintWarning(TPort& port, const char* warning) 
     201  { 
     202    FINROC_LOG_PRINT_STATIC(WARNING, "Port '", port.GetQualifiedName(), "' ", warning); 
     203  } 
     204 
    193205}; 
    194206 
Note: See TracChangeset for help on using the changeset viewer.