mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-27 21:54:30 +01:00
Adding some error checking code related to the launching of avr-size because some people were having trouble on Windows.
This commit is contained in:
parent
f723bfbe56
commit
1433c517cf
@ -66,6 +66,8 @@ public class RunnerException extends Exception {
|
|||||||
* in each of the constructors above.
|
* in each of the constructors above.
|
||||||
*/
|
*/
|
||||||
static public final String massage(String msg) {
|
static public final String massage(String msg) {
|
||||||
|
if (msg == null)
|
||||||
|
return "";
|
||||||
if (msg.indexOf("java.lang.") == 0) {
|
if (msg.indexOf("java.lang.") == 0) {
|
||||||
//int dot = msg.lastIndexOf('.');
|
//int dot = msg.lastIndexOf('.');
|
||||||
msg = msg.substring("java.lang.".length());
|
msg = msg.substring("java.lang.".length());
|
||||||
|
@ -72,7 +72,11 @@ public class Sizer implements MessageConsumer {
|
|||||||
} catch (InterruptedException intExc) { }
|
} catch (InterruptedException intExc) { }
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
exception = new RunnerException(e.toString());
|
// The default Throwable.toString() never returns null, but apparently
|
||||||
|
// some sub-class has overridden it to do so, thus we need to check for
|
||||||
|
// it. See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166589459
|
||||||
|
exception = new RunnerException(
|
||||||
|
(e.toString() == null) ? e.getClass().getName() : e.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user