From fdc275f3ada9c9a4ca71adeff0d6fc949905a71e Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 29 Oct 2018 16:00:09 +0300 Subject: [PATCH] Replace NS_LOG_ERROR and exit(1) with NS_FATAL_ERROR in ht-wifi-network example --- examples/wireless/ht-wifi-network.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/wireless/ht-wifi-network.cc b/examples/wireless/ht-wifi-network.cc index cc095ab89..1409bce83 100644 --- a/examples/wireless/ht-wifi-network.cc +++ b/examples/wireless/ht-wifi-network.cc @@ -262,8 +262,7 @@ int main (int argc, char *argv[]) { if (throughput < minExpectedThroughput) { - NS_LOG_ERROR ("Obtained throughput " << throughput << " is not expected!"); - exit (1); + NS_FATAL_ERROR ("Obtained throughput " << throughput << " is not expected!"); } } //test last element @@ -271,8 +270,7 @@ int main (int argc, char *argv[]) { if (maxExpectedThroughput > 0 && throughput > maxExpectedThroughput) { - NS_LOG_ERROR ("Obtained throughput " << throughput << " is not expected!"); - exit (1); + NS_FATAL_ERROR ("Obtained throughput " << throughput << " is not expected!"); } } //test previous throughput is smaller (for the same mcs) @@ -282,8 +280,7 @@ int main (int argc, char *argv[]) } else { - NS_LOG_ERROR ("Obtained throughput " << throughput << " is not expected!"); - exit (1); + NS_FATAL_ERROR ("Obtained throughput " << throughput << " is not expected!"); } //test previous throughput is smaller (for the same channel width and GI) if (throughput > prevThroughput [index]) @@ -292,8 +289,7 @@ int main (int argc, char *argv[]) } else { - NS_LOG_ERROR ("Obtained throughput " << throughput << " is not expected!"); - exit (1); + NS_FATAL_ERROR ("Obtained throughput " << throughput << " is not expected!"); } index++;