Added constructor to exception
This commit is contained in:
parent
4c1cff310c
commit
d2c8cefa18
|
@ -126,7 +126,8 @@ public abstract class AbstractMspMoteType extends MspMoteType {
|
||||||
/* Handle multiple compilation commands one by one */
|
/* Handle multiple compilation commands one by one */
|
||||||
String[] arr = getCompileCommands().split("\n");
|
String[] arr = getCompileCommands().split("\n");
|
||||||
for (String cmd: arr) {
|
for (String cmd: arr) {
|
||||||
if (cmd.trim().isEmpty()) {
|
cmd = cmd.trim();
|
||||||
|
if (cmd.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,8 +144,7 @@ public abstract class AbstractMspMoteType extends MspMoteType {
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MoteTypeCreationException newException =
|
MoteTypeCreationException newException =
|
||||||
new MoteTypeCreationException("Mote type creation failed: " + e.getMessage());
|
new MoteTypeCreationException("Mote type creation failed: " + e.getMessage(), e);
|
||||||
newException = (MoteTypeCreationException) newException.initCause(e);
|
|
||||||
newException.setCompilationOutput(compilationOutput);
|
newException.setCompilationOutput(compilationOutput);
|
||||||
|
|
||||||
/* Print last 10 compilation errors to console */
|
/* Print last 10 compilation errors to console */
|
||||||
|
|
Loading…
Reference in a new issue