Skip to content

Commit

Permalink
Added constructor to exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nfi committed May 31, 2012
1 parent 4c1cff3 commit d2c8cef
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ public boolean configureAndInit(Container parentContainer, Simulation simulation
/* Handle multiple compilation commands one by one */
String[] arr = getCompileCommands().split("\n");
for (String cmd: arr) {
if (cmd.trim().isEmpty()) {
cmd = cmd.trim();
if (cmd.isEmpty()) {
continue;
}

Expand All @@ -143,8 +144,7 @@ public boolean configureAndInit(Container parentContainer, Simulation simulation
);
} catch (Exception e) {
MoteTypeCreationException newException =
new MoteTypeCreationException("Mote type creation failed: " + e.getMessage());
newException = (MoteTypeCreationException) newException.initCause(e);
new MoteTypeCreationException("Mote type creation failed: " + e.getMessage(), e);
newException.setCompilationOutput(compilationOutput);

/* Print last 10 compilation errors to console */
Expand Down

0 comments on commit d2c8cef

Please sign in to comment.