checking that mote interface class was actually loaded
This commit is contained in:
parent
5d90dcdd11
commit
0ccb368fba
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -2493,10 +2493,15 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
try {
|
try {
|
||||||
Class<? extends MoteInterface> newMoteInterfaceClass =
|
Class<? extends MoteInterface> newMoteInterfaceClass =
|
||||||
myGUI.tryLoadClass(this, MoteInterface.class, moteInterface);
|
myGUI.tryLoadClass(this, MoteInterface.class, moteInterface);
|
||||||
|
|
||||||
|
if (newMoteInterfaceClass == null) {
|
||||||
|
logger.fatal("Failed to load mote interface: " + moteInterface);
|
||||||
|
} else {
|
||||||
moteIntfClasses.add(newMoteInterfaceClass);
|
moteIntfClasses.add(newMoteInterfaceClass);
|
||||||
|
}
|
||||||
// logger.info("Loaded mote interface: " + newMoteInterfaceClass);
|
// logger.info("Loaded mote interface: " + newMoteInterfaceClass);
|
||||||
} catch (Exception ce) {
|
} catch (Exception ce) {
|
||||||
logger.warn("Failed to load mote interface: " + moteInterface);
|
logger.fatal("Failed to load mote interface: " + moteInterface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue