X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fcomm%2FINetAddress.cpp;h=2a6bd187566ce93394c8515ead09231c97a5a11a;hb=f34b8069233e9e09208339bb79d8576c1ff962e1;hp=924c3bd59e678458f6e40b80e280e3c6af32af0d;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/comm/INetAddress.cpp b/source/comm/INetAddress.cpp index 924c3bd..2a6bd18 100644 --- a/source/comm/INetAddress.cpp +++ b/source/comm/INetAddress.cpp @@ -18,7 +18,7 @@ using namespace std; using namespace anna; const comm::Device* comm::INetAddress::getDevice(const bool exceptionWhenNull) const -throw(RuntimeException) { +noexcept(false) { if(a_device == NULL && exceptionWhenNull == true) { string msg(asString()); msg += " | No device attached"; @@ -29,27 +29,27 @@ throw(RuntimeException) { } string comm::INetAddress::asString() const -throw() { +{ string result("comm::INetAddress { "); result += functions::asString(a_device); return result += anna::functions::asString(" | Port: %d }", a_port); } string comm::INetAddress::serialize() const -throw() { +{ in_addr_t inaddr = (a_device) ? a_device->getAddress() : 0; string result(Device::asString(inaddr)); return result += anna::functions::asString(".%d", a_port); } xml::Node* comm::INetAddress::asXML(xml::Node* parent) const -throw(RuntimeException) { +noexcept(false) { xml::Node* result = parent->createChild("comm.INetAddress"); if(a_device != NULL) a_device->asAttribute(result); else - result->createAttribute("Device", ""); + result->createAttribute("Device", "[null]"); result->createAttribute("Port", a_port); return result;