mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Removed some printStackTrace in favour of throwing RuntimeExceptions. DefaultUncoughtExceptionHandler will handle them
This commit is contained in:
@ -719,6 +719,8 @@ public class BaseNoGui {
|
||||
initParameters(args);
|
||||
|
||||
init(args);
|
||||
|
||||
Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler());
|
||||
}
|
||||
|
||||
static public void onBoardOrPortChange() {
|
||||
@ -765,7 +767,7 @@ public class BaseNoGui {
|
||||
populateImportToLibraryTable();
|
||||
}
|
||||
|
||||
static protected void loadContributedHardware(ContributionsIndexer indexer) {
|
||||
static protected void loadContributedHardware(ContributionsIndexer indexer) throws TargetPlatformException {
|
||||
for (TargetPackage pack : indexer.createTargetPackages()) {
|
||||
packages.put(pack.getId(), pack);
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
package processing.app;
|
||||
|
||||
public class DefaultUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread t, Throwable e) {
|
||||
System.out.println(t);
|
||||
System.out.println(e);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user