From bcc62fbb658551b03c4a7067bc85d5d0cbb79ad7 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Fri, 13 Aug 2010 09:53:33 +0000 Subject: [PATCH] no error dialog for mspsim breakpoints --- .../cooja/java/se/sics/cooja/Simulation.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/Simulation.java b/tools/cooja/java/se/sics/cooja/Simulation.java index d953f864c..0b2305fe8 100644 --- a/tools/cooja/java/se/sics/cooja/Simulation.java +++ b/tools/cooja/java/se/sics/cooja/Simulation.java @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: Simulation.java,v 1.64 2010/03/26 09:26:22 fros4943 Exp $ + * $Id: Simulation.java,v 1.65 2010/08/13 09:53:33 fros4943 Exp $ */ package se.sics.cooja; @@ -277,14 +277,19 @@ public class Simulation extends Observable implements Runnable { } } } catch (RuntimeException e) { - logger.fatal("Simulation stopped due to error: " + e.getMessage(), e); + if ("MSPSim requested simulation stop".equals(e.getMessage())) { + /* XXX Should be*/ + logger.info("Simulation stopped due to MSPSim breakpoint"); + } else { - if (!GUI.isVisualized()) { - /* Quit simulator if in test mode */ - System.exit(1); - } else { - GUI.showErrorDialog(GUI.getTopParentContainer(), "Simulation error", e, false); - } + logger.fatal("Simulation stopped due to error: " + e.getMessage(), e); + if (!GUI.isVisualized()) { + /* Quit simulator if in test mode */ + System.exit(1); + } else { + GUI.showErrorDialog(GUI.getTopParentContainer(), "Simulation error", e, false); + } + } } isRunning = false; simulationThread = null;