From 7ab9703d8f041bc7a2e57b0aeba938794a136848 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 20 Nov 2007 04:16:13 +0000 Subject: [PATCH] more error output at failed compilation --- .../sics/cooja/contikimote/ContikiMoteType.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java index dd3ac5e7f..9286cf0ab 100644 --- a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java +++ b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ContikiMoteType.java,v 1.21 2007/10/22 13:21:51 fros4943 Exp $ + * $Id: ContikiMoteType.java,v 1.22 2007/11/20 04:16:13 fros4943 Exp $ */ package se.sics.cooja.contikimote; @@ -259,13 +259,22 @@ public class ContikiMoteType implements MoteType { hasSystemSymbols, commStack, taskOutput .getInputStream(MessageList.NORMAL), taskOutput .getInputStream(MessageList.ERROR)); - if (!libFile.exists() || !depFile.exists()) { - compilationSucceded = false; + if (!libFile.exists()) { + MoteTypeCreationException ex = new MoteTypeCreationException( + "Compilation error: " + libFile.getPath() + " does not exist"); + ex.setCompilationOutput(taskOutput); + throw ex; + } + if (!depFile.exists()) { + MoteTypeCreationException ex = new MoteTypeCreationException( + "Compilation error: " + depFile.getPath() + " does not exist"); + ex.setCompilationOutput(taskOutput); + throw ex; } if (!compilationSucceded) { MoteTypeCreationException ex = new MoteTypeCreationException( - "Compilation error"); + "Compilation error: Unknown error"); ex.setCompilationOutput(taskOutput); throw ex; }