Changeset 51:dd94eb0ccc61 in finroc_plugins_rpc_ports


Ignore:
Timestamp:
01.11.2021 10:04:59 (19 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Children:
52:79e3aca936e4, 53:0a3d0077cbfe
Phase:
public
Message:

Fixes several throw expressions - and moves them to .cpp files where appropriate

Location:
internal
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • internal/tAbstractCall.cpp

    r11 r51  
    7575{} 
    7676 
     77void tAbstractCall::ReturnValue(rrlib::serialization::tInputStream& stream, tResponseSender& response_sender) 
     78{ 
     79  throw std::runtime_error("This is a call without return value"); 
     80} 
     81 
    7782//---------------------------------------------------------------------- 
    7883// End of namespace declaration 
  • internal/tAbstractCall.h

    r11 r51  
    9090   * Deserializes/receives return value from stream 
    9191   */ 
    92   virtual void ReturnValue(rrlib::serialization::tInputStream& stream, tResponseSender& response_sender) 
    93   { 
    94     throw new std::runtime_error("This is a call without return value"); 
    95   } 
     92  virtual void ReturnValue(rrlib::serialization::tInputStream& stream, tResponseSender& response_sender); 
    9693 
    9794  /*! 
  • internal/tRPCPort.cpp

    r49 r51  
    192192} 
    193193 
     194void tRPCPort::SendCall(tCallPointer && call_to_send) 
     195{ 
     196  throw std::runtime_error("Not a network port"); 
     197} 
     198 
    194199//---------------------------------------------------------------------- 
    195200// End of namespace declaration 
  • internal/tRPCPort.h

    r49 r51  
    209209   * To be overridden by network port subclass 
    210210   */ 
    211   virtual void SendCall(tCallPointer && call_to_send) 
    212   { 
    213     throw std::runtime_error("Not a network port"); 
    214   } 
     211  virtual void SendCall(tCallPointer && call_to_send); 
    215212}; 
    216213 
  • internal/tRPCRequest.h

    r42 r51  
    282282  static void DeserializeAndExecuteCallImplementation(rrlib::serialization::tInputStream& stream, tRPCPort& port, uint8_t function_id, tResponseSender& response_sender) 
    283283  { 
    284     throw new std::runtime_error("Not supported for functions returning void"); 
     284    throw std::runtime_error("Not supported for functions returning void"); 
    285285  } 
    286286}; 
  • internal/tRPCResponse.h

    r42 r51  
    326326      uint8_t function_id, tResponseSender& response_sender, tCallStorage* request) 
    327327  { 
    328     throw new std::runtime_error("Not supported for functions returning void"); 
     328    throw std::runtime_error("Not supported for functions returning void"); 
    329329  } 
    330330}; 
Note: See TracChangeset for help on using the changeset viewer.