From 0ccb368fbad92148ef4a24def607cbd644376078 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 28 Oct 2008 17:01:15 +0000 Subject: [PATCH] checking that mote interface class was actually loaded --- .../sics/cooja/contikimote/ContikiMoteTypeDialog.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteTypeDialog.java b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteTypeDialog.java index 6e02016af..7c88c8a52 100644 --- a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteTypeDialog.java +++ b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteTypeDialog.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ContikiMoteTypeDialog.java,v 1.46 2008/10/03 15:43:44 fros4943 Exp $ + * $Id: ContikiMoteTypeDialog.java,v 1.47 2008/10/28 17:01:15 fros4943 Exp $ */ package se.sics.cooja.contikimote; @@ -2493,10 +2493,15 @@ public class ContikiMoteTypeDialog extends JDialog { try { Class newMoteInterfaceClass = myGUI.tryLoadClass(this, MoteInterface.class, moteInterface); - moteIntfClasses.add(newMoteInterfaceClass); + + if (newMoteInterfaceClass == null) { + logger.fatal("Failed to load mote interface: " + moteInterface); + } else { + moteIntfClasses.add(newMoteInterfaceClass); + } // logger.info("Loaded mote interface: " + newMoteInterfaceClass); } catch (Exception ce) { - logger.warn("Failed to load mote interface: " + moteInterface); + logger.fatal("Failed to load mote interface: " + moteInterface); } }