From 6ad49b9caec564598f72640200a01079326082ce Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 23 Aug 2010 22:52:08 +0200 Subject: [PATCH] excitation: warning for unknown types fixed... --- FDTD/excitation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index bbd2f8e..7b2a95b 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -91,13 +91,14 @@ bool Excitation::setupExcitation( TiXmlElement* Excite, unsigned int maxTS ) Excite->QueryDoubleAttribute("f0",&f0); CalcCustomExcitation(f0,maxTS,Excite->Attribute("Function")); break; + default: + cerr << "Excitation::setupExcitation: Unknown excitation type: \"" << Excit_Type<< "\" !!" << endl; + return false; } - if (GetNyquistNum() == 0) { - cerr << "openEMS: excitation setup failed!!" << endl; - cerr << " Frequent causes include:" << endl; - cerr << " - invalid excitation type (curently supported: 0,1,2,3,10)" << endl; - cerr << " - missing/invalid attributes for selected excitation type" << endl; + if (GetNyquistNum() == 0) + { + cerr << "Excitation::setupExcitation: Unknown error... excitation setup failed!!" << endl; return false; }