print compilation error stream if not visualized

This commit is contained in:
fros4943 2008-10-03 15:43:44 +00:00
parent 2a2b764ee6
commit 74dcd17875

View file

@ -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.45 2008/10/03 13:39:49 fros4943 Exp $ * $Id: ContikiMoteTypeDialog.java,v 1.46 2008/10/03 15:43:44 fros4943 Exp $
*/ */
package se.sics.cooja.contikimote; package se.sics.cooja.contikimote;
@ -1607,7 +1607,7 @@ public class ContikiMoteTypeDialog extends JDialog {
String readLine; String readLine;
try { try {
while ((readLine = input.readLine()) != null) { while ((readLine = input.readLine()) != null) {
if (outputStream != null && readLine != null) { if (outputStream != null) {
outputStream.println(readLine); outputStream.println(readLine);
} }
} }
@ -1622,8 +1622,12 @@ public class ContikiMoteTypeDialog extends JDialog {
String readLine; String readLine;
try { try {
while ((readLine = err.readLine()) != null) { while ((readLine = err.readLine()) != null) {
if (errorStream != null && readLine != null) { if (errorStream != null) {
errorStream.println(readLine); errorStream.println(readLine);
if (!GUI.isVisualized()) {
logger.warn("COMPILATION OUTPUT: " + readLine);
}
} }
} }
} catch (IOException e) { } catch (IOException e) {