showing custom made error dialog instead of JOptionPane's
This commit is contained in:
parent
86f50ae5ce
commit
79144edde6
|
@ -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.26 2007/04/02 12:45:19 fros4943 Exp $
|
* $Id: ContikiMoteTypeDialog.java,v 1.27 2007/05/10 17:02:04 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.contikimote;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -1250,7 +1250,7 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
String libString = CoreComm.getAvailableClassName();
|
String libString = CoreComm.getAvailableClassName();
|
||||||
if (libString == null) {
|
if (libString == null) {
|
||||||
logger.fatal("No more libraries can be loaded!");
|
logger.fatal("No more libraries can be loaded!");
|
||||||
throw new Exception("Maximum number of mote types already exist");
|
throw new MoteTypeCreationException("Maximum number of mote types already exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
// GENERATE NEW FILE
|
// GENERATE NEW FILE
|
||||||
|
@ -2059,10 +2059,11 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
try {
|
try {
|
||||||
myMoteType.doInit(textID.getText());
|
myMoteType.doInit(textID.getText());
|
||||||
} catch (MoteTypeCreationException ex) {
|
} catch (MoteTypeCreationException ex) {
|
||||||
JOptionPane.showMessageDialog(myDialog,
|
GUI.showErrorDialog(
|
||||||
ex.getMessage(),
|
myDialog,
|
||||||
"Mote type creation error",
|
"Mote type creation error",
|
||||||
JOptionPane.ERROR_MESSAGE);
|
ex
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
myMoteType.setDescription(textDescription.getText());
|
myMoteType.setDescription(textDescription.getText());
|
||||||
|
|
Loading…
Reference in a new issue